Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

apollo-mcp-server

БесплатноБез исполняемых скриптовНе проверен

Guide for using Apollo MCP Server to connect AI agents with GraphQL APIs. Use this skill when: (1) setting up or configuring Apollo MCP Server, (2) defining…

apollographqlот apollographql★ 139 звёзд на GitHub1 установка в других каталогах

Об этом скилле

Apollo MCP Server Guide

Apollo MCP Server exposes GraphQL operations as MCP tools, enabling AI agents to interact with GraphQL APIs through the Model Context Protocol.

Quick Start

Step 1: Install

# Linux / MacOS
curl -sSL https://mcp.apollo.dev/download/nix/latest | sh

# Windows
iwr 'https://mcp.apollo.dev/download/win/latest' | iex

Step 2: Configure

Create config.yaml in your project root:

transport:
  type: streamable_http
schema:
  source: local
  path: ./schema.graphql
operations:
  source: local
  paths:
    - ./operations/
introspection:
  introspect:
    enabled: true
  search:
    enabled: true
  validate:
    enabled: true
  execute:
    enabled: true

Start the server:

apollo-mcp-server ./config.yaml

The MCP endpoint is available at http://127.0.0.1:8000/mcp (streamable_http defaults: address 127.0.0.1, port 8000, path /mcp). The GraphQL endpoint defaults to http://localhost:4000/ — override with the endpoint key if your API runs elsewhere.

The server serves MCP at the exact transport.path only — subpaths return 404. Set transport.path: / to serve at root.

The server watches the config file for changes and automatically restarts with updated configuration.

Step 3: Connect

Add to your MCP client configuration:

Streamable HTTP (recommended):

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "graphql-api": {
      "command": "npx",
      "args": ["mcp-remote", "http://127.0.0.1:8000/mcp"]
    }
  }
}

Claude Code:

claude mcp add graphql-api -- npx mcp-remote http://127.0.0.1:8000/mcp

Stdio (client launches the server directly):

{
  "mcpServers": {
    "graphql-api": {
      "command": "./apollo-mcp-server",
      "args": ["./config.yaml"]
    }
  }
}

Built-in Tools

Tool Purpose When to Use
introspect Explore schema types in detail Need type definitions, fields, relationships
search Find types in schema Looking for specific types or fields
validate Check operation validity Before executing operations
execute Run ad-hoc GraphQL operations Testing or one-off queries
explorer Open operation in Apollo Explorer Generate Explorer URLs (requires GraphOS graph ref)

Defining Custom Tools

MCP tools are created from GraphQL operations:

1. Operation Files (Recommended)

operations:
  source: local
  paths:
    - ./operations/

2. Operation Collections

operations:
  source: collection
  id: your-collection-id

3. Persisted Queries

operations:
  source: manifest
  path: ./persisted-query-manifest.json

4. Schema Introspection

operations:
  source: introspect

5. GraphOS Uplink

operations:
  source: uplink

Reference Files

  • Tools - Introspection tools, explorer, minify notation, tool annotations
  • Configuration - All configuration options including tasks and caching
  • Authentication - OAuth 2.1, scopes, token validation, rate limiting, per-operation scopes
  • Rhai Scripting - Lifecycle hooks and built-in functions
  • MCP Prompts - Reusable prompt templates
  • MCP Apps - Interactive mini-applications for MCP-compatible hosts
  • Deployment - Docker, Kubernetes, Apollo Runtime Container, scaling
  • Error Handling - Protocol errors, tool errors, GraphQL error mapping
  • Best Practices - Security guidance, mutation gating, tool poisoning, token passthrough
  • Telemetry - OpenTelemetry metrics, traces, and dashboards
  • Troubleshooting - Common issues and solutions

Key Rules

Security

Security: Sensitive operations. Configure authentication before exposing to AI agents. Use headers for API keys, OAuth for user-scoped access.

  • Disable introspection tools in production (they are disabled by default)
  • Use overrides.mutation_mode to control mutation exposure

Authentication

# Static header
headers:
  Authorization: "Bearer ${env.API_TOKEN}"

# Dynamic header forwarding
forward_headers:
  - x-tenant-id

# OAuth (streamable_http transport)
transport:
  type: streamable_http
  auth:
    servers:
      - https://auth.example.com
    audiences:
      - https://api.example.com
    scopes:
      - read
    scope_mode: require_all

Schema Sources

# Local file
schema:
  source: local
  path: ./schema.graphql

# Federated graphs (uplink)
schema:
  source: uplink

# Non-federated graphs (graphos)
schema:
  source: graphos

Mutations

Control mutation behavior via overrides.mutation_mode:

| Mode | Predefined mutations | Ad hoc mutations (`exe

Полный SKILL.md на GitHub

Установить apollo-mcp-server в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(rover:*)
Bash(npx:*)
Read
Write
Edit
Glob
Grep

Вложенные файлы

references/auth.mdreferences/best-practices.mdreferences/configuration.mdreferences/deploy.mdreferences/error-handling.mdreferences/mcp-apps.mdreferences/prompts.mdreferences/rhai-scripting.mdreferences/telemetry.mdreferences/tools.mdreferences/troubleshooting.md

FAQ

Что делает скилл apollo-mcp-server?

Guide for using Apollo MCP Server to connect AI agents with GraphQL APIs. Use this skill when: (1) setting up or configuring Apollo MCP Server, (2) defining MCP tools from GraphQL operations, (3) using introspection tools (introspect, search, validate, execute, explorer), (4) configuring authentication, CORS, health checks, or telemetry, (5) writing Rhai scripts for request lifecycle hooks, (6) defining MCP prompts, (7) troubleshooting MCP server connectivity or tool execution issues, (8) building MCP Apps for interactive UI experiences, (9) deploying Apollo MCP Server to production.

Как установить скилл apollo-mcp-server?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл apollo-mcp-server запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить apollo-mcp-server с