KosmoKrator

productivity

OpenRouter MCP Gateway for AI Agents

Expose OpenRouter tools to Claude Code, Cursor, Codex, and other MCP clients through the local KosmoKrator MCP gateway.

OpenRouter MCP Gateway

Expose OpenRouter to MCP clients with `kosmokrator mcp:serve --integration=openrouter`.

If the client has never used KosmoKrator before, install it first, then register this integration as a stdio MCP server.

Install KosmoKrator
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
Install gateway entry
kosmokrator mcp:gateway:install --integration=openrouter --write=deny --json
MCP configuration
{
  "mcpServers": {
    "kosmokrator-openrouter": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=openrouter",
        "--write=deny"
      ]
    }
  }
}
Serve manually
kosmokrator mcp:serve --integration=openrouter --write=deny

Client Notes

Use one scoped MCP gateway entry, then adapt the config location to the client or framework.

Claude Code Connect local KosmoKrator integrations to Claude Code through one scoped MCP gateway entry. Claude Code can launch the local kosmo binary directly from the project MCP config.
Cursor Expose selected local integrations to Cursor through KosmoKrator without configuring each service as its own MCP server. Use the same KosmoKrator install and integration credentials that power terminal and headless runs.
Codex Use KosmoKrator as a local MCP proxy for Codex so coding sessions can reach selected integrations with explicit write policy. Keep write access denied or ask-based unless the workspace is trusted.
OpenAI Agents SDK Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway. Use headless JSON commands for CI-style execution and MCP for agent tool discovery.
Claude Agent SDK Give Claude Agent SDK workflows access to KosmoKrator integrations through a local MCP server. Use a narrow integration list so the agent does not load unrelated tools.
Vercel AI SDK Use KosmoKrator as a local integration gateway for Vercel AI SDK agents and scripts. Prefer CLI JSON calls when a workflow only needs one deterministic integration operation.
LangChain Bridge LangChain agents to local KosmoKrator integration tools through MCP or headless CLI calls. Keep the gateway scoped to the integration and operation class needed by the chain.
LangGraph Run KosmoKrator integration calls from LangGraph nodes while preserving local credentials and permissions. Headless CLI calls fit repeatable graph edges; MCP fits exploratory agent nodes.
CrewAI Expose KosmoKrator integrations to CrewAI workers as scoped local tools. Use per-worker integration scopes to avoid giving every worker every tool.
Generic MCP Clients Connect any stdio-compatible MCP client to local KosmoKrator integration tools. Start with read-only write policy and expand only for trusted projects.

MCP Tool Names

KosmoKrator exposes integration tools through the gateway with stable names.

MCP toolSource functionType
integration__openrouter__openrouter_list_models openrouter.openrouter_list_models Read read
integration__openrouter__openrouter_create_completion openrouter.openrouter_create_completion Write write
integration__openrouter__openrouter_create_response openrouter.openrouter_create_response Write write
integration__openrouter__openrouter_create_message openrouter.openrouter_create_message Write write
integration__openrouter__openrouter_create_embedding openrouter.openrouter_create_embedding Write write
integration__openrouter__openrouter_list_embedding_models openrouter.openrouter_list_embedding_models Read read
integration__openrouter__openrouter_rerank openrouter.openrouter_rerank Write write
integration__openrouter__openrouter_list_generations openrouter.openrouter_list_generations Read read
integration__openrouter__openrouter_get_generation openrouter.openrouter_get_generation Read read
integration__openrouter__openrouter_get_generation_content openrouter.openrouter_get_generation_content Read read
integration__openrouter__openrouter_count_models openrouter.openrouter_count_models Read read
integration__openrouter__openrouter_list_user_models openrouter.openrouter_list_user_models Read read
integration__openrouter__openrouter_list_model_endpoints openrouter.openrouter_list_model_endpoints Read read
integration__openrouter__openrouter_list_providers openrouter.openrouter_list_providers Read read
integration__openrouter__openrouter_get_credits openrouter.openrouter_get_credits Read read
integration__openrouter__openrouter_get_activity openrouter.openrouter_get_activity Read read
integration__openrouter__openrouter_list_api_keys openrouter.openrouter_list_api_keys Read read
integration__openrouter__openrouter_get_api_key openrouter.openrouter_get_api_key Read read
integration__openrouter__openrouter_create_api_key openrouter.openrouter_create_api_key Write write
integration__openrouter__openrouter_update_api_key openrouter.openrouter_update_api_key Write write
integration__openrouter__openrouter_delete_api_key openrouter.openrouter_delete_api_key Write write
integration__openrouter__openrouter_get_usage openrouter.openrouter_get_usage Read read
integration__openrouter__openrouter_get_current_user openrouter.openrouter_get_current_user Read read
integration__openrouter__openrouter_list_organization_members openrouter.openrouter_list_organization_members Read read
integration__openrouter__openrouter_list_workspaces openrouter.openrouter_list_workspaces Read read
integration__openrouter__openrouter_get_workspace openrouter.openrouter_get_workspace Read read
integration__openrouter__openrouter_create_workspace openrouter.openrouter_create_workspace Write write
integration__openrouter__openrouter_update_workspace openrouter.openrouter_update_workspace Write write
integration__openrouter__openrouter_delete_workspace openrouter.openrouter_delete_workspace Write write
integration__openrouter__openrouter_list_guardrails openrouter.openrouter_list_guardrails Read read
integration__openrouter__openrouter_list_video_models openrouter.openrouter_list_video_models Read read
integration__openrouter__openrouter_create_video openrouter.openrouter_create_video Write write
integration__openrouter__openrouter_get_video openrouter.openrouter_get_video Read read
integration__openrouter__openrouter_api_get openrouter.openrouter_api_get Read read
integration__openrouter__openrouter_api_post openrouter.openrouter_api_post Write write
integration__openrouter__openrouter_api_patch openrouter.openrouter_api_patch Write write
integration__openrouter__openrouter_api_delete openrouter.openrouter_api_delete Write write

Write Access

Start with --write=deny for read-only MCP clients. Use --write=ask or --write=allow only when the client and workspace are trusted.