Skip to main content

MCP Servers

The Compound Engineering plugin bundles 1 MCP server that provides access to framework documentation and API references.

What Are MCP Servers?

MCP (Model Context Protocol) servers extend Claude’s capabilities by providing access to external data sources and APIs. They expose tools that Claude can invoke to fetch information, query databases, or interact with third-party services. How they work:
  1. MCP server runs as a separate process (HTTP or SSE)
  2. Claude discovers available tools from the server
  3. When needed, Claude calls tools to fetch data
  4. Results are incorporated into Claude’s context
MCP servers in this plugin start automatically when the plugin is enabled.

Context7 Server

The Context7 MCP server provides access to documentation for 100+ frameworks and libraries.

Configuration

The server is configured in .mcp.json:
{
  "mcpServers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp"
    }
  }
}

Tools Provided

The Context7 server exposes two tools:
ToolDescriptionExample Usage
resolve-library-idFind library ID for a framework/packageGet ID for “rails”, “react”, “next.js”
get-library-docsGet documentation for a specific libraryFetch API docs for a library ID

Supported Frameworks

Context7 supports 100+ frameworks including: Backend:
  • Ruby on Rails
  • Django
  • Laravel
  • Express.js
  • FastAPI
  • Spring Boot
  • ASP.NET Core
Frontend:
  • React
  • Vue
  • Angular
  • Svelte
  • Next.js
  • Nuxt.js
  • Remix
Mobile:
  • React Native
  • Flutter
  • SwiftUI
  • Jetpack Compose
Databases:
  • PostgreSQL
  • MySQL
  • MongoDB
  • Redis
  • Elasticsearch
And many more…

Usage Examples

You: How do I use Rails ActiveRecord includes to prevent N+1 queries?

Claude internally:
1. Calls resolve-library-id with "rails"
2. Gets library ID: "rails-7.1"
3. Calls get-library-docs with query: "ActiveRecord includes N+1"
4. Receives documentation snippets
5. Answers your question with accurate, version-specific docs
You: What's the difference between useMemo and useCallback?

Claude internally:
1. Calls resolve-library-id with "react"
2. Gets library ID: "react-18"
3. Calls get-library-docs with query: "useMemo useCallback"
4. Receives React docs on hooks
5. Explains the difference with official examples

When Context7 Is Used

Context7 is automatically queried during:
  • /ce:plan - When researching framework-specific patterns
  • /deepen-plan - Via framework-docs-researcher agent
  • Ad-hoc questions - When you ask about framework APIs
You don’t need to explicitly invoke it—Claude uses it automatically when relevant.

Known Issues

MCP Servers Not Auto-Loading

Issue: The bundled Context7 MCP server may not load automatically when the plugin is installed.Symptoms:
  • Context7 tools not available
  • Framework documentation queries fail
  • No MCP server listed in Claude’s tool inventory
Workaround: Manually add the server to your project’s .claude/settings.json:
{
  "mcpServers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp"
    }
  }
}
Global configuration (applies to all projects):Add to ~/.claude/settings.json instead:
{
  "mcpServers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp"
    }
  }
}
This is a known limitation and will be fixed in a future plugin release.

Verifying MCP Server Status

To check if the Context7 server is loaded:
Ask Claude: "What MCP servers are available?"
Claude will list active MCP servers and their tools. You should see:
Available MCP servers:
- context7
  - resolve-library-id
  - get-library-docs
If Context7 is missing, apply the workaround above.

Adding Custom MCP Servers

You can add your own MCP servers alongside Context7:
{
  "mcpServers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp"
    },
    "custom-server": {
      "type": "sse",
      "command": "node",
      "args": ["/path/to/your/server.js"]
    }
  }
}
MCP server types:
  • HTTP - Remote HTTP server (like Context7)
  • SSE - Local process using Server-Sent Events
  • STDIO - Local process using standard I/O
See MCP documentation for creating custom servers.

Using MCP Tools Directly

You can explicitly ask Claude to use MCP tools:
Use the Context7 MCP server to find the latest React documentation on useEffect cleanup functions.
Claude will:
  1. Call resolve-library-id to get React’s library ID
  2. Call get-library-docs with your query
  3. Return the documentation
However, this is usually unnecessary—Claude invokes MCP tools automatically when needed.

MCP Server Performance

Context7 is a remote HTTP server, so queries have network latency. Typical response times:
  • resolve-library-id: 100-300ms
  • get-library-docs: 300-800ms (depending on query complexity)
For faster responses, Context7 results are cached within a conversation session.

Future MCP Servers

Planned MCP servers for future releases:
  • GitHub Integration - Query issues, PRs, code search
  • Database Inspector - Query schema, run read-only SQL
  • API Documentation - OpenAPI/Swagger spec lookup
  • Dependency Analyzer - Package vulnerability and update checks
Want to contribute an MCP server to the plugin? See Contributing Guide for how to submit new MCP server integrations.

Troubleshooting

Context7 tools not working

Check:
  1. Is the server configured? Check .claude/settings.json
  2. Is there a network connection? Context7 is a remote service
  3. Are you behind a firewall? Context7 requires HTTPS access
Solution:
  • Apply the manual configuration workaround above
  • Check network connectivity: curl https://mcp.context7.com/mcp
  • If behind corporate firewall, contact IT to allowlist mcp.context7.com

Server timeout errors

Cause: Network latency or Context7 service unavailable Solution:
  • Retry the query
  • If persistent, check Context7 status page (if available)
  • Fall back to web search if Context7 is down

See Also