MCP Servers Cheatsheet

View Source

Quick Reference

Configuration Format (.claude.exs)

%{
  mcp_servers: [
    # Simple format
    :tidewave,
    
    # With options
    {:tidewave, [port: 5000]},
    
    # Disabled
    {:tidewave, [enabled?: false]}
  ]
}

Server Options

OptionTypeDefaultDescription
portintegervariesCustom port number
enabled?booleantrueEnable/disable server

Available Servers

ServerAuto-InstallDescriptionLink
:tidewavePhoenix projectsPhoenix dev toolstidewave.ai

Installation Flow

# Step 1: Configure in .claude.exs
# Step 2: Run install to sync
mix claude.install

# Creates/updates .mcp.json

Generated .mcp.json

{
  "mcpServers": {
    "tidewave": {
      "command": "npx",
      "args": ["-y", "@bradleygolden/mcp-server-tidewave"],
      "env": {
        "PORT": "4000"
      }
    }
  }
}

Phoenix Auto-Configuration

# Automatically added when Phoenix detected:
%{
  mcp_servers: [:tidewave]
}

Custom Port Configuration

# Development
{:tidewave, [port: 4000]}

# Staging  
{:tidewave, [port: 4001]}

# Local testing
{:tidewave, [port: 5000]}

Disable Without Removing

# Temporarily disable
{:tidewave, [enabled?: false]}

# Re-enable later
{:tidewave, [enabled?: true]}  # or just :tidewave

Manual .mcp.json

If you need custom MCP servers not managed by Claude:

{
  "mcpServers": {
    "custom-server": {
      "command": "node",
      "args": ["path/to/server.js"],
      "env": {
        "API_KEY": "secret"
      }
    }
  }
}

Troubleshooting

IssueSolution
Server not startingCheck port availability
Port conflictUse custom port option
Server not foundCheck .mcp.json exists
Changes not appliedRun mix claude.install

Port Defaults

Project TypeDefault Port
Phoenix4000
LiveView4000
Custom PhoenixFrom config/dev.exs

Environment Variables

MCP servers receive these env vars:

# From .mcp.json
"env": {
  "PORT": "4000",           # Server port
  "PROJECT_DIR": "/path/to/project"
}

Common Patterns

Development Setup

%{
  mcp_servers: [
    {:tidewave, [port: 4000]}  # Match Phoenix dev port
  ]
}

Multi-Environment

%{
  mcp_servers: [
    # Use environment variable
    {:tidewave, [port: System.get_env("MCP_PORT", "4000")]}
  ]
}

Request New Servers

Want support for a new MCP server?

Request here →

See Also