xiaohongshu
xiaohongshu
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), (4) troubleshooting MCP server con...
Full skill instructions
Apollo MCP Server exposes GraphQL operations as MCP tools, enabling AI agents to interact with GraphQL APIs through the Model Context Protocol.
# Using npm
npm install -g @apollo/mcp-server
# Or run directly with npx
npx @apollo/mcp-server
Create mcp.yaml in your project root:
# mcp.yaml
endpoint: https://api.example.com/graphql
schema:
type: local
path: ./schema.graphql
operations:
type: local
paths:
- ./operations/**/*.graphql
introspection:
enabled: true
Add to your MCP client configuration:
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"graphql-api": {
"command": "npx",
"args": ["@apollo/mcp-server", "--config", "./mcp.yaml"]
}
}
}
Claude Code (.mcp.json):
{
"mcpServers": {
"graphql-api": {
"command": "npx",
"args": ["@apollo/mcp-server", "--config", "./mcp.yaml"]
}
}
}
Apollo MCP Server provides four introspection 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 |
MCP tools are created from GraphQL operations. Three methods:
operations:
type: local
paths:
- ./operations/**/*.graphql
# operations/users.graphql
query GetUser($id: ID!) {
user(id: $id) {
id
name
email
}
}
mutation CreateUser($input: CreateUserInput!) {
createUser(input: $input) {
id
name
}
}
Each named operation becomes an MCP tool.
operations:
type: collection
id: your-collection-id
Use GraphOS Studio to manage operations collaboratively.
operations:
type: manifest
path: ./persisted-query-manifest.json
For production environments with pre-approved operations.
Detailed documentation for specific topics:
headers configuration for API keys and tokensintrospection.enabled: false in productionintrospection.mutationMode: prompt to require confirmation for mutations# Static header
headers:
Authorization: "Bearer ${APOLLO_API_KEY}"
# Dynamic header passthrough
headers:
X-User-Token:
from: x-forwarded-token
Enable minification to reduce token usage:
introspection:
minify: true
Minified output uses compact notation:
Control mutation behavior:
introspection:
mutationMode: allowed # Execute directly
mutationMode: prompt # Require confirmation (default)
mutationMode: disabled # Block all mutations
schema:
type: uplink
graphos:
key: ${APOLLO_KEY}
graph_ref: my-graph@production
endpoint: http://localhost:4000/graphql
schema:
type: local
path: ./schema.graphql
introspection:
enabled: true
mutationMode: allowed
endpoint: https://api.production.com/graphql
schema:
type: uplink
operations:
type: manifest
path: ./persisted-query-manifest.json
introspection:
enabled: false
mutationMode: prompt in shared environmentsxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience