MCP Template
MCP Server

Setup

Configure your MCP client to connect to the server

The server runs as a single process (mymcp-serve) that exposes both the HTTP API and the MCP streamable-HTTP endpoint at /mcp. Most modern MCP clients (Claude Cowork/Desktop 0.7+, Cursor, etc.) can connect directly:

{
  "mcpServers": {
    "mycli": {
      "url": "https://YOUR-DEPLOYMENT/mcp",
      "headers": { "X-API-KEY": "sk_..." }
    }
  }
}

Authentication accepts an OAuth 2.1 access token (see OAuth 2.1 for zero-provisioning connections from Claude and other clients), a Bearer JWT (WorkOS), or an API key via X-API-KEY, same as the REST API. See Deployment for hosting.

Local (stdio, legacy)

The stdio transport is supported for local Claude Desktop / dev use only. Replace /path/to/MCP-Template with the actual path to your cloned repo.

Add to your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mycli": {
      "command": "uv",
      "args": ["--directory", "/path/to/MCP-Template", "run", "mycli-mcp"],
      "env": {}
    }
  }
}

Restart Claude Desktop after saving the config.

Add to your project's .mcp.json:

{
  "mcpServers": {
    "mycli": {
      "command": "uv",
      "args": ["--directory", "/path/to/MCP-Template", "run", "mycli-mcp"],
      "env": {}
    }
  }
}

Open Cursor Settings > MCP and add a new server with:

  • Name: mycli
  • Type: command
  • Command: uv --directory /path/to/MCP-Template run mycli-mcp

Or add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "mycli": {
      "command": "uv",
      "args": ["--directory", "/path/to/MCP-Template", "run", "mycli-mcp"],
      "env": {}
    }
  }
}

Add to your VS Code settings (settings.json) or workspace settings:

{
  "mcp": {
    "servers": {
      "mycli": {
        "command": "uv",
        "args": ["--directory", "/path/to/MCP-Template", "run", "mycli-mcp"],
        "env": {}
      }
    }
  }
}

Or add to .vscode/mcp.json in your project root:

{
  "servers": {
    "mycli": {
      "command": "uv",
      "args": ["--directory", "/path/to/MCP-Template", "run", "mycli-mcp"],
      "env": {}
    }
  }
}

Add to your project's codex.json or pass via CLI:

codex --mcp-config '{"mycli": {"command": "uv", "args": ["--directory", "/path/to/MCP-Template", "run", "mycli-mcp"]}}'

Or create a mcp.json in your project root:

{
  "mcpServers": {
    "mycli": {
      "command": "uv",
      "args": ["--directory", "/path/to/MCP-Template", "run", "mycli-mcp"],
      "env": {}
    }
  }
}

Add to your Gemini CLI settings file (~/.gemini/settings.json):

{
  "mcpServers": {
    "mycli": {
      "command": "uv",
      "args": ["--directory", "/path/to/MCP-Template", "run", "mycli-mcp"],
      "env": {}
    }
  }
}

Add to your OpenCode config (opencode.json in your project root):

{
  "mcp": {
    "mycli": {
      "command": "uv",
      "args": ["--directory", "/path/to/MCP-Template", "run", "mycli-mcp"]
    }
  }
}

Add to your OpenClaw MCP config:

{
  "mcpServers": {
    "mycli": {
      "command": "uv",
      "args": ["--directory", "/path/to/MCP-Template", "run", "mycli-mcp"],
      "env": {}
    }
  }
}

Other MCP Clients

Any MCP-compatible client can connect by spawning uv --directory /path/to/MCP-Template run mycli-mcp as a subprocess using stdio transport.

On this page