Skip to main content
ClaudeWave
Slash Command97 repo starsupdated 1mo ago

setup-mcp

The setup-mcp command guides users through configuring MCP server API keys in the project's .env file. It verifies or creates the .env file, prompts for three optional credentials (Helius RPC API, Colosseum Copilot PAT, and Mistral API key), writes provided values to .env while skipping omitted ones, and displays a summary of configured versus skipped keys. Use this command when initially setting up the Solana AI Kit or when adding MCP integrations that require external API authentication.

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/solanabr/solana-ai-kit/HEAD/.claude/commands/setup-mcp.md -o ~/.claude/commands/setup-mcp.md
Then start a new Claude Code session; the slash command loads automatically.

setup-mcp.md

You are guiding the user through MCP API key setup. All secrets go in `.env` (never in `mcp.json`).

## Step 1: Ensure .env exists

Check if `.env` exists in the project root. If not, copy from `.env.example`:

```bash
if [ ! -f ".env" ] && [ -f ".env.example" ]; then
  cp .env.example .env
  echo "Created .env from .env.example"
elif [ ! -f ".env" ]; then
  touch .env
  echo "Created empty .env"
else
  echo "Found existing .env"
fi
```

## Step 2: Configure secrets

For each key below, ask the user to paste a value or say "skip":

1. **HELIUS_API_KEY** — Helius RPC + DAS API (get one at https://dev.helius.xyz)
2. **COLOSSEUM_COPILOT_PAT** — Colosseum Copilot for startup research (optional, get at https://arena.colosseum.org/copilot)
3. **MISTRAL_API_KEY** — QEDGen formal verification (optional, get at https://console.mistral.ai)

For each value provided, write or update the line in `.env`. Skip means leave it empty.

**Note — Surfpool MCP is keyless** (no `.env` entry), but its server (`surfpool mcp`) requires the `surfpool` CLI binary on PATH. Install is the user's responsibility — do not run it for them: `curl -L https://surfpool.run/install | sh` or `brew install txtx/taps/surfpool`. Verify with `command -v surfpool`.

## Step 3: Summary

Print which keys are configured vs skipped:

```
MCP secrets (.env):
  HELIUS_API_KEY        [configured / skipped]
  COLOSSEUM_COPILOT_PAT [configured / skipped]
  MISTRAL_API_KEY       [configured / skipped]
```

Remind the user: restart Claude Code to pick up changes.
anchor-engineerSubagent

Anchor framework specialist for rapid Solana program development. Use for building programs with Anchor macros, IDL generation, account validation, and standardized patterns. Prioritizes developer experience while maintaining security.\\n\\nUse when: Building new programs quickly, team projects needing standardization, projects requiring IDL for client generation, or when developer experience is prioritized over maximum CU optimization.

defi-engineerSubagent

DeFi integration specialist for composing with Solana protocols including Jupiter, Drift, Kamino, Raydium, Orca, Meteora, Marginfi, and Sanctum. Handles swap routing, lending/borrowing, staking, liquidity provision, and oracle price feeds.\n\nUse when: Integrating DeFi protocols, building swap interfaces, implementing lending/borrowing, setting up yield strategies, working with Pyth/Switchboard oracles, or composing multi-protocol transactions.

devops-engineerSubagent

CI/CD, infrastructure, and deployment specialist for Solana projects. Handles GitHub Actions, Docker, monitoring, RPC management, and Cloudflare Workers edge deployment.\n\nUse when: Setting up CI/CD pipelines, containerizing Solana validators or programs, configuring monitoring and alerting, managing RPC infrastructure, deploying edge workers, or automating build and deploy workflows.

game-architectSubagent

Senior Solana game architect for game system design, Unity/C# architecture, on-chain game state, player progression, NFT integration, and PlaySolana ecosystem. Use for high-level game design decisions, architecture reviews, and planning complex game systems.\n\nUse when: Designing new Solana games from scratch, planning game state on-chain, Unity project architecture, integrating with PlaySolana/PSG1, or deciding between implementation approaches.

mobile-engineerSubagent

React Native and Expo specialist for building Solana mobile dApps. Handles mobile wallet adapter integration, transaction signing UX, deep linking, and mobile-specific performance optimization.\n\nUse when: Building React Native or Expo mobile apps with Solana integration, implementing mobile wallet adapter flows, setting up deep links for transaction signing, or optimizing mobile dApp performance.

pinocchio-engineerSubagent

CU optimization specialist using Pinocchio framework. Use for performance-critical programs requiring 80-95% CU reduction vs Anchor. Specializes in zero-copy access, manual validation, and minimal binary size.\\n\\nUse when: CU limits are being hit, transaction costs are significant at scale, binary size must be minimized, or maximum throughput is required.

rust-backend-engineerSubagent

Rust backend specialist for building async services that interact with Solana blockchain. Builds APIs, indexing services, and off-chain processing using Axum, Tokio, and modern async patterns.\n\nUse when: Building REST/WebSocket APIs for Solana dApps, implementing transaction indexers, creating webhook services, or any Rust backend that interacts with Solana.

solana-architectSubagent

Senior Solana program architect for system design, account structures, PDA schemes, token economics, and cross-program composability. Use for high-level design decisions, architecture reviews, and planning complex multi-program systems.\n\nUse when: Designing new programs from scratch, planning account structures, optimizing PDA schemes, reviewing architecture for security, or deciding between implementation approaches.