Installation
Installing OctoMCP
Prerequisites
Node.js (v16 or higher)
npm or yarn
A Solana wallet with some SOL for transaction fees
Build from source
# Clone the repository
git clone https://github.com/octonetai/octomcp.git
cd octomcp
# Install dependencies
npm install
# Build the project
npm run build
Setup
Build the project to generate the
build
folder:
npm run build
Configure your AI assistant's MCP host to use OctoMCP by creating a configuration file (e.g.,
claude_desktop_config.json
):
{
"mcpServers": {
"OctoMCP": {
"command": "node",
"args": [
"/path/to/your/octomcp/build/index.js"
],
"env": {
"SOLANA_WALLET_PUBLIC_KEY": "YOUR_WALLET_PUBLIC_KEY",
"SOLANA_WALLET_PRIVATE_KEY_BS58": "YOUR_BS58_PRIVATE_KEY",
"SOLANA_DEFAULT_CLUSTER": "devnet"
}
}
}
}
Replace the placeholders:
/path/to/your/octomcp/build/index.js
- The full path to the built index.js fileYOUR_WALLET_PUBLIC_KEY
- Your Solana wallet public key (e.g.,GsAqi6PLSjfDX271Rf3u8wtecidWEpYoYFswmG9wF4QW
)YOUR_BS58_PRIVATE_KEY
- Your Solana wallet private key in BS58 format (see instructions below)devnet
- The default Solana cluster (can bedevnet
ormainnet
)
How to Get Solana Devnet Funds
You can use these two faucets to receive free SOL on Devnet:
Visit: https://faucet.solana.com
Paste your Devnet wallet address
Click Login with GitHub
Choose Devnet
Click Request Airdrop
2. SOL Faucet (Community Faucet)
Visit: https://solfaucet.com
Paste your wallet address
Set airdrop amount to
4
or5
Select Devnet
Click Airdrop
After a few seconds, your wallet will be funded with Devnet SOL — enough to deploy and test programs.
Getting Your BS58 Private Key
From Phantom Wallet
1)Open Phantom 2)Click the gear icon 3)Select Manage Accounts 4)Choose your wallet 5)Click Show Private Key 6)Enter your password 7)Copy the private key and paste it into the OctoMCP config
From Solflare Wallet
Open Solflare wallet
Click on your wallet name at the top
Click "Export Private Key"
Enter your password
Copy the private key (this is in BS58 format)
From Solana CLI Keypair
If you have a Solana CLI keypair file, you can convert it to BS58 format:
# First, get the byte array from your keypair
solana-keygen dump-keypair --keypair /path/to/your/keypair.json
# Then use this Node.js script to convert to BS58:
node -e "
const bs58 = require('bs58');
const secretKey = [YOUR_SECRET_KEY_ARRAY_HERE]; // Replace with actual array
console.log(bs58.encode(Buffer.from(secretKey)));
"
From Secret Key Array (Legacy Support)
If you have your secret key as an array of numbers, you can convert it to BS58:
const bs58 = require('bs58');
const secretKeyArray = [/* your 64-number array */];
const bs58PrivateKey = bs58.encode(Buffer.from(secretKeyArray));
console.log(bs58PrivateKey);
Security Best Practices
⚠️ IMPORTANT SECURITY WARNING ⚠️
Never share your private key with anyone
Keep your MCP configuration file secure and never commit it to public repositories
Consider using environment variables instead of hardcoding keys in config files
Use devnet for testing before deploying to mainnet
Regularly rotate your keys if they may have been compromised
Environment Variables Setup
For enhanced security, you can set environment variables instead of putting keys in config files:
export SOLANA_WALLET_PUBLIC_KEY="your_public_key_here"
export SOLANA_WALLET_PRIVATE_KEY_BS58="your_bs58_private_key_here"
export SOLANA_DEFAULT_CLUSTER="devnet"
Then use a simpler config file:
{
"mcpServers": {
"OctoMCP": {
"command": "node",
"args": [
"/path/to/your/octomcp/build/index.js"
]
}
}
}
Last updated