Stellar MCP Server

Configuration

Environment variables and MCP client setup.

Environment variables

Create a .env file in the project root:

STELLAR_SERVER_URL=https://horizon-testnet.stellar.org

STELLAR_SERVER_URL is required — the server throws on startup if it is not set.

Available networks

NetworkURL
Testnethttps://horizon-testnet.stellar.org
Publichttps://horizon.stellar.org
Futurenethttps://horizon-futurenet.stellar.org

The target network is inferred from the URL: a URL containing testnet selects Testnet, futurenet selects Futurenet, and anything else defaults to the public network.

MCP client configuration

Configure your MCP client (Cursor, Windsurf, Claude Desktop, etc.) to launch the server. Choose one of the following.

Local installation

{
  "mcpServers": {
    "stellar-mcp": {
      "command": "node",
      "args": ["/path/to/stellar-mcp/dist/index.js"]
    }
  }
}

NPX installation

{
  "mcpServers": {
    "stellar-mcp": {
      "command": "npx",
      "args": ["-y", "stellar-mcp"]
    }
  }
}

Docker installation

{
  "mcpServers": {
    "stellar-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--init",
        "-e",
        "STELLAR_SERVER_URL=https://horizon-testnet.stellar.org",
        "stellar-mcp-server"
      ]
    }
  }
}

The server communicates over stdio. Do not print to stdout from custom code — it is reserved for the MCP protocol. Logs are written to stderr.

On this page