Skip to content
GitHub

Agent Setup

Gatelet works with any MCP-compatible agent. The admin dashboard generates the correct configuration snippet for each supported agent, or you can configure manually using the guides below.

AgentConfig fileSetup
OpenClaw./config/mcporter.jsonFull guide
Claude Code~/.claude.jsonJump to section
Gemini CLI~/.gemini/settings.jsonJump to section
Codex~/.codex/config.tomlJump to section

OpenClaw agents access MCP servers through the mcporter CLI skill. Agents can run unsandboxed on the host or inside Docker sandboxes — the setup differs depending on the mode.

See the full OpenClaw setup guide for detailed instructions covering both modes.

Quick reference — the mcporter config at ./config/mcporter.json:

{
"mcpServers": {
"gatelet": {
"description": "Gatelet MCP proxy",
"baseUrl": "http://localhost:4000/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}

Claude Code stores MCP server configuration in ~/.claude.json. You can add Gatelet via the CLI or by editing the file directly.

Terminal window
claude mcp add --transport http gatelet http://localhost:4000/mcp \
--header "Authorization: Bearer YOUR_API_KEY"

Add to ~/.claude.json (merging with existing mcpServers if present):

{
"mcpServers": {
"gatelet": {
"type": "http",
"url": "http://localhost:4000/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}

After editing, restart Claude Code and verify with claude mcp list or the /mcp command inside a session.

Gemini CLI stores MCP configuration in ~/.gemini/settings.json. For HTTP-based servers like Gatelet, use the httpUrl field.

Add to ~/.gemini/settings.json (merging with existing mcpServers if present):

{
"mcpServers": {
"gatelet": {
"httpUrl": "http://localhost:4000/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}

Restart Gemini CLI after editing the settings file.

Codex uses TOML configuration at ~/.codex/config.toml. For remote HTTP servers, use the url and http_headers fields.

Terminal window
codex mcp add gatelet --url http://localhost:4000/mcp

Then manually add the auth header to ~/.codex/config.toml.

Add to ~/.codex/config.toml:

[mcp_servers.gatelet]
url = "http://localhost:4000/mcp"
http_headers = { "Authorization" = "Bearer YOUR_API_KEY" }

Verify with codex mcp list.

If your agent runs in a container on the gatelet-internal Docker network (not the case for OpenClaw — see above), use Docker’s internal DNS:

{
"mcpServers": {
"gatelet": {
"url": "http://gatelet:4000/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}

Once configured, the agent sees only the tools allowed by your policies. For example, if you’ve connected a Google Calendar account with the default policy:

  • calendar_list_calendars — visible
  • calendar_list_events — visible
  • calendar_get_event — visible
  • calendar_create_event — hidden (disabled by default policy)
  • calendar_update_event — hidden (disabled by default policy)
  • calendar_delete_event — doesn’t exist (not implemented in code)

The agent will naturally use the visible tools and has no awareness of hidden or unimplemented operations.

If you connect multiple accounts (e.g. both Google Calendar and Gmail), the agent sees all allowed tools from all connections in a single MCP endpoint. Tool names include the provider prefix to avoid collisions:

  • calendar_list_events (Google Calendar)
  • outlook_list_events (Outlook Calendar)
  • gmail_search (Gmail)

Each API key provides access to all enabled connections and their allowed tools. You can create multiple API keys for different agents in the API Keys page.

API keys can be revoked at any time. Revoked keys are rejected immediately on the next request.