SuperAPIAI Directory

mcp

github.com · AI developer platforms

Gagarin MCP server is the Model Context Protocol (MCP) implementation of the Gagarin cloud platform, enabling MCP-compatible AI agents to deploy and operate applications through a single URL. It provides 57 tools covering creating applications, configuring Postgres, Qdrant, Valkey, queues, buckets, network access rules, rollbacks, alerts, logs, metrics, backups, and project memory. The server itself holds no credentials and stores no data; all operations are performed by calling the Gagarin API, and permissions are determined by the engine. It supports three access methods: remote OAuth login, remote credential headers, and local stdio, and is suitable for integrating Gagarin platform capabilities into clients such as Claude, ChatGPT, and Codex.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Gagarin MCP server is the Model Context Protocol (MCP) server provided by the Gagarin cloud platform, designed to let any MCP-compatible AI agent deploy and operate applications by adding a single URL, without installing additional software.

Purpose The server wraps the Gagarin platform API as 57 MCP tools, enabling agents to perform operations such as application deployment, resource provisioning, network configuration, rollbacks, and monitoring. Its core design is as a “translator”: it holds no credentials, stores no data, and makes no decisions that the API does not make; every tool call carries the caller’s token and is forwarded to api.gagarin.cloud, and all denials are returned as-is by the engine.

Main capabilities

  • Deploy images already in the Gagarin image registry and run them at an HTTPS address.
  • Provision resources such as Postgres, Qdrant, Valkey, queues, or buckets.
  • Configure network access rules (who can access whom).
  • Perform rollbacks.
  • Provide alerts, logs, metrics, backups, and project memory.
  • Project memory: agents can save persistent facts about the codebase (decisions and reasons, conventions, caveats), accessible only through MCP tools, with no standalone address or command line.
  • All deletion operations require email approval and are not performed automatically.

Usage Three access methods are provided, sharing the same implementation:

  1. Remote OAuth: provide a URL to the client; Claude, ChatGPT, Codex, and Claude Code will prompt for login when connecting, and authentication is completed through GitHub or Google. In ChatGPT and Codex, this URL is provided through the Gagarin plugin.
  2. Remote credential headers: suitable for clients or machines that cannot use OAuth, using gg login or gg creds create the obtained credentials are placed in request headers.
  3. Local stdio: run from a cloned repository npm run stdio, use the same tools through a pipe, reading gg login the written file or GAGARIN_TOKEN environment variables. This method is for development only and is not published to npm.

Use cases

  • Directly deploy and manage Gagarin applications in AI coding assistants (such as Claude Code and Codex).
  • Operate cloud resources in conversations through the ChatGPT plugin.
  • Have agents perform tasks such as resource provisioning and monitoring queries in automated operations workflows.

Limitations The following operations require a local machine environment and are not provided by the MCP server:

  • Build and push images (requires using gg ship, depends on docker and source code).
  • Open a tunnel (requires using gg connect).
  • Wait for task completion (run only submits and returns a revision number; the status must be polled).
  • Click approve (must be completed manually via email). In addition, the server does not provide lists of resource types, sizes, or ranges; these are handled by the engine and specified in denials. Export and import have no corresponding tools and are for manual and script use only.

Technical details

  • Each request first calls the engine /v1/whoami Validates tokens; expired or revoked credentials return 401.
  • The server has no database and no cache, and stores no tokens.
  • Deployed within a Kubernetes cluster, adjacent to the control plane, and accesses the API through an in-cluster Service.
  • Pods run with a ServiceAccount that has no RBAC and no mounted token, and the root filesystem is read-only.
  • Every handshake, tool list, and tool call is reported to PostHog (requires setting POSTHOG_PROJECT_TOKEN), the report includes the tool name, duration, whether it failed, error code, parameter names, and client type; it does not include parameter values, response content, or agent reasoning.
  • Pushing to the main branch triggers an image build and rolling deployment.

How to extend In src/tools.ts via server.registerTool add a tool: name, description, zod shape, and a single api.call, and in src/tools.test.ts add tests that assert the path, method, and request body. Do not add tools for features the API does not support.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools