Claude Code & Claude Desktop

Claude Code

Add the server with claude mcp add, passing your Stellar testnet credentials as environment variables:

bash
claude mcp add --transport stdio wasit \
  --env MPP_STELLAR_NETWORK=stellar:testnet \
  --env STELLAR_PRIVATE_KEY=S... \
  --env MPP_PAYER_SECRET=S... \
  --env COMMITMENT_SECRET_HEX=... \
  -- npx -y @wasit-dev/server

This registers the server at local scope (current project only). Add --scope user instead if you want it available in every project, or --scope project to commit a shared .mcp.json for a team. Verify it connected with claude mcp list, then ask Claude Code directly, for example "run wasit_x402_test against https://my-service.example.com".

To remove it later: claude mcp remove wasit.

Claude Desktop

Open Settings, go to the Developer tab, and click "Edit Config". This opens (or creates) the config file at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add a wasit entry under mcpServers:

json
{
  "mcpServers": {
    "wasit": {
      "command": "npx",
      "args": ["-y", "@wasit-dev/server"],
      "env": {
        "MPP_STELLAR_NETWORK": "stellar:testnet",
        "STELLAR_PRIVATE_KEY": "S...",
        "MPP_PAYER_SECRET": "S...",
        "COMMITMENT_SECRET_HEX": "..."
      }
    }
  }
}

Save the file and fully quit and restart Claude Desktop (not just close the window — use the Claude menu, Quit). The wasit tools then appear under the connectors indicator in the message box. If the server doesn't show up, check ~/Library/Logs/Claude/mcp-server-wasit.log (macOS) or %APPDATA%\Claude\logs\mcp-server-wasit.log (Windows) for the stderr output.