Claude Desktop Setup

This guide covers everything you need to know about connecting Station to Claude Desktop via the Model Context Protocol (MCP). Once connected, you’ll be able to create, manage, and run Station agents directly through Claude conversations.

Prerequisites

  • Station installed and initialized (stn init completed)
  • Claude Desktop application installed
  • At least one Station agent or bundle installed

Configuration File Location

The Claude Desktop MCP configuration file is located at:

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

Linux

~/.config/Claude/claude_desktop_config.json

Station MCP Configuration

Station supports two connection modes with Claude Desktop:

Direct process communication via stdin/stdout:

{
  "mcpServers": {
    "station": {
      "command": "stn",
      "args": ["stdio"]
    }
  }
}

Option 2: SSE Mode (Server-Sent Events)

HTTP-based connection for remote or containerized setups:

1. Start Station MCP server:

stn serve --port 3000

2. Configure Claude Desktop:

{
  "mcpServers": {
    "station": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

For remote Station instances:

{
  "mcpServers": {
    "station-remote": {
      "url": "https://your-station-server.com:3000/mcp"
    }
  }
}

Advanced Configuration Options

Custom Station Path (stdio mode)

If Station is not in your PATH or you want to specify a particular installation:

{
  "mcpServers": {
    "station": {
      "command": "/usr/local/bin/stn",
      "args": ["stdio"]
    }
  }
}

Multiple Station Instances

For different environments, you’ll need separate Station instances or configurations:

stdio mode with different Station workspaces:

{
  "mcpServers": {
    "station-prod": {
      "command": "stn",
      "args": ["stdio"],
      "env": {
        "XDG_CONFIG_HOME": "/opt/station-prod"
      }
    },
    "station-dev": {
      "command": "stn", 
      "args": ["stdio"],
      "env": {
        "XDG_CONFIG_HOME": "/opt/station-dev"
      }
    }
  }
}

SSE mode with different ports/instances:

# Start servers with different configs
XDG_CONFIG_HOME=/opt/station-prod stn serve --mcp-port 3000
XDG_CONFIG_HOME=/opt/station-dev stn serve --mcp-port 3001
{
  "mcpServers": {
    "station-prod": {
      "url": "http://localhost:3000/mcp"
    },
    "station-dev": {
      "url": "http://localhost:3001/mcp"
    }
  }
}

Debug Mode

stdio mode:

{
  "mcpServers": {
    "station": {
      "command": "stn",
      "args": ["stdio", "--debug"]
    }
  }
}

SSE mode:

stn serve --debug --mcp-port 3000

Mixed Mode Configuration

You can combine stdio and SSE modes as needed:

{
  "mcpServers": {
    "station-local": {
      "command": "stn",
      "args": ["stdio"]
    },
    "station-remote": {
      "url": "https://remote-station.company.com:3000/mcp"
    },
    "station-docker": {
      "command": "docker",
      "args": ["exec", "station-container", "stn", "stdio"]
    },
    "station-k8s": {
      "url": "https://station-service.namespace.svc.cluster.local:3000/mcp"
    }
  }
}

Remote Station Access

For remote Station instances, use SSE mode instead of stdio:

# On remote server
stn serve --mcp-port 3000

# In Claude Desktop config
{
  "mcpServers": {
    "station-remote": {
      "url": "https://remote-server.com:3000/mcp"
    }
  }
}

Verification

After updating the configuration and restarting Claude Desktop:

1. Test Connection

Ask Claude Desktop:

Are Station MCP tools available?

Claude should respond with a list of available Station tools.

2. Test Agent Listing

List my Station agents

You should see a list of your configured agents.

3. Test Agent Execution

Create a test agent and run it with a simple task

4. Verify SSE Mode (if using stn serve)

Check that Station server is running:

# Check if server is responding
curl http://localhost:3000/mcp

# View server logs
stn serve --port 3000 --debug

You should see MCP protocol messages in the server logs when Claude Desktop connects.

Available MCP Tools

Once connected, these Station tools become available in Claude Desktop:

Agent Management

  • call_agent - Execute any Station agent with a task
  • create_agent - Create new agents with specific tools and configuration
  • list_agents - Browse available agents across environments
  • get_agent_details - Get detailed information about a specific agent
  • update_agent - Modify existing agent configuration

Tool & Environment Discovery

  • discover_tools - Find available tools in your Station setup
  • list_tools - Browse all MCP tools by environment
  • list_environments - Show available Station environments
  • list_mcp_configs - View loaded MCP server configurations

System Integration

  • Plus all tools configured in your Station bundles (filesystem, AWS, databases, etc.)

Common Use Cases

Infrastructure Management

Create a Station agent that monitors disk usage and alerts when any partition exceeds 80% capacity

Deployment Automation

Run my deployment agent to update the staging environment with the latest code

Security Operations

List all Station agents related to security scanning and run a full security audit

Development Workflow

Create an agent that can manage my development database - backing up before schema changes and restoring if needed

Troubleshooting

Station Not Appearing

  1. Verify Station is working:

    stn --version
    stn agent list
  2. Test MCP connection directly:

    stdio mode:

    echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | stn stdio

    SSE mode:

    # Start server
    stn serve --port 3000 --debug
    
    # Test endpoint (in another terminal)
    curl -X POST http://localhost:3000/mcp \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
  3. Check configuration file syntax: Use a JSON validator to ensure your claude_desktop_config.json is valid.

  4. Restart Claude Desktop completely: Quit the application entirely and relaunch.

Permission Issues

# Ensure Station binary has execute permissions
chmod +x $(which stn)

# Check Station workspace permissions
ls -la ~/.station/

Connection Timeouts

If Station MCP responses are slow:

stdio mode:

{
  "mcpServers": {
    "station": {
      "command": "stn",
      "args": ["stdio"]
    }
  }
}

SSE mode:

# Check server configuration - no timeout flags available in current CLI
stn serve --mcp-port 3000 --debug

SSE Mode Issues

Server not starting:

# Check if port is already in use
netstat -tulpn | grep :3000

# Try a different port
stn serve --mcp-port 3001

Connection refused:

# Check server status
curl -v http://localhost:3000/mcp

# Check server logs
stn serve --mcp-port 3000 --debug

Multiple Environments Not Working

Ensure each environment is properly configured:

stn env list
stn sync production
stn sync development

Security Considerations

Network Access

Station MCP connections are local-only by default. For remote Station instances, use secure protocols like SSH.

Environment Isolation

Use separate MCP server entries for different environments to prevent accidental cross-environment operations.

Audit Logging

All MCP interactions are logged in Station’s audit trail:

stn logs audit --filter mcp

Next Steps


Pro Tip: You can bookmark common agent tasks in Claude Desktop by saving conversations with Station agent commands. This creates reusable workflows for infrastructure management, deployment, and monitoring tasks.