Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
dist
dist
.env
app.log
111 changes: 109 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ If you have `ts-node`:
"mcpServers": {
"solana-dev": {
"command": "ts-node",
"args": ["<full-path-to-repo>/index.ts"]
"args": ["/path/to/your/solana-dev-mcp/index.ts"],
"env": {
"PAYER_PRIVATE_KEY": "${PAYER_PRIVATE_KEY}",
"DUNE_API_KEY": "${DUNE_API_KEY}",
"HELIUS_RPC_URL": "${HELIUS_RPC_URL}"
}
}
}
}
Expand All @@ -72,7 +77,12 @@ If you don't have `ts-node` installed globally:
"mcpServers": {
"solana-dev": {
"command": "node",
"args": ["<full-path-to-repo>/dist/index.js"]
"args": ["/path/to/your/solana-dev-mcp/index.ts"],
"env": {
"PAYER_PRIVATE_KEY": "${PAYER_PRIVATE_KEY}",
"DUNE_API_KEY": "${DUNE_API_KEY}",
"HELIUS_RPC_URL": "${HELIUS_RPC_URL}"
}
}
}
}
Expand Down Expand Up @@ -130,3 +140,100 @@ Please be extremely careful when installing & trying out MCP servers
from unknown developers.

Please use a sandboxed environment when trying out MCP servers, with no crucial information in it to prevent potential damage.


## Tools
### 1. getPriorityFee
- **Description**: Look up priority fee for a transaction.
- **Input**:
- `serealizedTransaction`: Serialized transaction.
- **Output**: Priority fee estimate.

### 2. generateSecurityTxt
- **Description**: Generate security.txt content for Solana programs.
- **Input**: Various fields including `name`, `project_url`, `contacts`, `policy`, etc.
- **Output**: Generated security.txt content and macro.

### 3. getProgramIdl
- **Description**: Fetch the IDL for a Solana program.
- **Input**:
- `programId`: Program ID.
- **Output**: IDL in JSON format.

### 4. createGPAFilters
- **Description**: Create getProgramAccounts filters based on a program's IDL.
- **Input**:
- `programId`: Program ID.
- **Output**: GPA filters and account types.

### 5. testProgramIdl
- **Description**: Test a Solana program IDL with input JSON and simulate the transaction onchain.
- **Input**:
- `programId`: Program ID.
- `inputJson`: JSON input for the instruction.
- `instructionName`: Name of the instruction to test.
- **Output**: Simulation result.

### 6. lookupProgramAuth
- **Description**: Check the program authority for a given program ID.
- **Input**:
- `programId`: Program ID.
- **Output**: Program authority public key.

### 7. checkupProgram
- **Description**: Check if a program has verified build and security.txt.
- **Input**:
- `programId`: Program ID.
- **Output**: Verification status and security.txt content.

### 8. checkProgramDeployment
- **Description**: Check various aspects of a Solana program deployment.
- **Input**:
- `programId`: Program ID.
- **Output**: Detailed report on program deployment.

### 9. createCPI
- **Description**: Generate an example CPI statement for a given Solana program.
- **Input**:
- `programId`: Program ID.
- `instructionName`: Name of the instruction.
- **Output**: CPI example, program IDL, and cluster information.

### 10. getDuneSolanaData
- **Description**: Fetch Solana program data from Dune Analytics. Instruction count, program calls, and CPI program calls data, and top 1000 signers.
- **Input**:
- `programId`: Program ID.
- `days`: Number of days to look back (default: 10).
- **Output**: Top 1000 signers, program calls, and CPI program calls data.

### 11. buildTransaction
- **Description**: Build a transaction from a list of instructions.
- **Input**:
- `instructions`: An array of instruction objects, each containing:
- `programId`: The program ID (as a string)
- `keys`: An array of account key objects, each containing:
- `pubkey`: The public key (as a string)
- `isSigner`: Boolean indicating if the account is a signer
- `isWritable`: Boolean indicating if the account is writable
- `data`: Base58 encoded instruction data
- `recentBlockhash` (optional): Recent blockhash to use for the transaction

- **Output**:
- Serialized transaction (base64 encoded)
- Transaction details in JSON format

### 12. analyzeTransaction
- **Description**: Fetch and analyze transaction details using the Helius API.
- **Input**:
- `signature`: The transaction signature (a 64-byte base58 encoded string).
- **Output**:
- Transaction analysis including signature, timestamp, success status, fee, number of instructions, and involved accounts.
- Full transaction data as returned by the Helius API.

**Note**: This tool requires the `HELIUS_RPC_URL` to be set in the environment variables.



To use these tools, you need to set up the necessary environment variables and dependencies. Each tool can be called with the required input parameters, and it will return the specified output.

For tools that require API keys or specific setup (like Dune Analytics or Helius RPC), make sure to configure those properly in your environment.
Loading