Claude Code Setup
Connect Claude Code to Swarm AI to control lab devices from your terminal.
Prerequisites
- Claude Code installed (
npm install -g @anthropic/claude-code) - API key from Cheshire Labs
- swarm-client running in your lab (devices already connected)
Configuration
Option 1: Using the CLI
Run:
claude mcp add swarm https://swarm.cheshirelabs.io/mcp --transport streamable-http
Then add your API key to the config file (see Option 2).
Option 2: Manual Configuration
Edit your Claude Code config file:
Config file locations:
- macOS/Linux:
~/.claude.json - Windows:
%USERPROFILE%\.claude.json
Add Swarm AI to the mcpServers section:
{
"mcpServers": {
"swarm": {
"url": "https://swarm.cheshirelabs.io/mcp",
"transport": "streamable-http",
"headers": {
"X-API-Key": "your-api-key-here"
}
}
}
}
Replace your-api-key-here with your actual API key.
Restart Claude Code
Exit and restart Claude Code to load the configuration:
exit
claude
Verify Connection
Ask Claude:
"What Swarm AI tools do you have access to?"
Claude should list device control, transporter, and teachpoint tools.
Then ask:
"What devices are connected to Swarm AI?"
You should see your lab's devices.
Example Usage
Check devices:
> What devices are available in my lab?
Run operations:
> Shake the plate shaker at 800 RPM for 60 seconds
Multi-step workflows:
> Pick the plate from source_rack, shake it for 30 seconds at 500 RPM, then place it in destination_rack
What's Next?
- Using Claude with Swarm AI - Example workflows
- MCP Tools Reference - Available tools
- Troubleshooting - Common issues