https://mcp.swarms.world/mcp
Overview
Authentication
The server holds no API key of its own. Every caller supplies their own key on the MCP request via thex-api-key header, and the server forwards it upstream. Your key is never passed as a tool argument, so it is never visible to the model driving the tools.
Get a key from the API Keys page.
Calling a tool without a key returns a normal MCP error result rather than a transport failure:
tools/list works without a key, so agents can discover the tool surface before you authenticate. Only tools/call requires credentials.Setup by Client
Claude Code
Claude Desktop
Add to~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
Cursor
Add to Cursor Settings → MCP, or to your project-level.cursor/mcp.json:
Windsurf, Codex, and other MCP clients
Any client that supports remote MCP servers over Streamable HTTP works with the same two values — the URL and thex-api-key header.
Available Tools
Tool names mirror the underlying API operation IDs, so a tool maps one-to-one onto an endpoint you can find in the API Reference.Agents
Swarms
Specialized Workflows
Models and Tools
Account and Monitoring
Two tool names are truncated with a hash suffix (
..._comple_a8b363, ..._comple_0dda3b). MCP caps tool-name length, so the server truncates and appends a stable hash to keep names unique. Copy them exactly as written.Reading a Tool Result
Every tool call returns both representations of the upstream response:structuredContent— the parsed JSON object. Use this. No string parsing.content[0].text— a human-readable rendering: an HTTP status line, then the pretty-printed JSON body.
isError: true with the message in content[0].text — it is a tool-level error, not a transport exception, so your client will not throw.
Core Tool Parameters
run_agent_v1_agent_completions_post
Common
agent_config fields:
run_swarm_v1_swarm_completions_post
Valid
swarm_type values:
AgentRearrange, MixtureOfAgents, SequentialWorkflow, ConcurrentWorkflow, GroupChat, MultiAgentRouter, HierarchicalSwarm, MajorityVoting, CouncilAsAJudge, HeavySwarm, BatchedGridWorkflow, LLMCouncil, DebateWithJudge, RoundRobin, PlannerWorkerSwarm, auto
TypeScript
Install the official MCP SDK:Agent Completions
Swarm Completions
Discovering Tools
Rust
Add the official Rust MCP SDK toCargo.toml:
Agent Completions
Swarm Completions
Discovering Tools
Python
The official Python SDK follows the same shape:Verifying the Connection with curl
The server speaks plain JSON-RPC over HTTP POST, so you can exercise it without any SDK:data: frame. Because the server is stateless, there is no session to establish first and no Mcp-Session-Id to echo back.
Error Handling
Because failures arrive as
isError: true rather than thrown exceptions, always check that flag before reading structuredContent.
Best Practices
Alternative: Local stdio Server
If you need to run the bridge yourself — for network-isolated environments or custom tool filtering — theswarms-ts-mcp npm package runs a local stdio MCP server against the same API.