context7

context7
Certified

5.0

context7 is hosted online, so all tools can be tested directly either in theTools tabor in theOnline Client.

Context7 MCP provides up-to-date, version-specific documentation and code examples directly into your prompt, enhancing the capabilities of LLMs by ensuring they use the latest information.

Context7 MCP is a model context protocol server designed to provide real-time, accurate documentation and code examples for developers using LLMs. By integrating directly with various development environments, Context7 ensures that developers have access to the most current and relevant information, eliminating the common issues of outdated code examples and non-existent APIs. This tool is particularly useful for developers who rely on LLMs for coding assistance, as it enhances the accuracy and relevance of the generated code. Context7 supports a wide range of platforms and can be easily integrated into popular development tools like VS Code, Cursor, and Claude Desktop, among others. The server fetches documentation directly from the source, ensuring that the information is always up-to-date and specific to the version being used.

Features

  • Real-time documentation: Provides up-to-date, version-specific documentation directly in your development environment.
  • Seamless integration: Easily integrates with popular development tools like VS Code, Cursor, and Claude Desktop.
  • Accurate code examples: Eliminates outdated code and hallucinated APIs by fetching examples directly from the source.
  • Multi-language support: Available in multiple languages, making it accessible to a global audience.
  • Customizable settings: Allows configuration of environment variables and token limits for tailored usage.

MCP Tools

  • {'resolve-library-id': 'Resolves a general library name into a Context7-compatible library ID.'}
  • {'get-library-docs': 'Fetches documentation for a library using a Context7-compatible library ID.'}

Usage with Different Platforms

Cursor

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    }
  }
}

VS Code

{
  "servers": {
    "Context7": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    }
  }
}

Windsurf

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    }
  }
}

Claude Desktop

{
  "mcpServers": {
    "Context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    }
  }
}

Docker

docker build -t context7-mcp .