zed -context7
Context7 MCP Server for Zed
claude mcp add --transport stdio akbxr-zed-mcp-server-context7 cargo run --bin mcp-server-context7 \ --env CONTEXT7_API_KEY="YOUR_CONTEXT7_API_KEY"
How to use
Context7 MCP Server for Zed exposes an MCP integration that lets Zed's assistant fetch up-to-date, version-specific documentation and code examples from Context7 directly into prompts. After enabling the Context7 MCP server in Zed, you can ask questions and append use context7 to pull live docs and examples into your response. The server provides two main tools: get-library-docs, which fetches documentation for a given library using a Context7-compatible library ID, and resolve-library-id, which converts a general library name into a Context7-ready identifier. Use these in tandem to first resolve a library and then retrieve focused docs on topics like routing, hooks, or authentication. This setup helps you avoid outdated APIs and code samples by surfacing current, source-backed guidance during prompt construction.
How to install
Prerequisites:
- Rust toolchain with cargo installed (rustup + cargo)
- Access to Context7 API key (optional, for full functionality)
Installation steps:
-
Install Rust and Cargo
- On macOS: brew install rustup-init; rustup-init
- On Linux: curl https://sh.rustup.rs -sSf | sh
- On Windows: install from rustup official installer
-
Clone the MCP server repository for Context7 (or navigate to the project directory if already cloned)
-
Build the MCP server binary
- cd path/to/zed-mcp-server-context7
- cargo build --release
-
Run the MCP server (example)
- cargo run --bin mcp-server-context7
-
Configure the host to point to the running MCP server as per your environment (e.g., in Zed, enable the Context7 MCP Server and set the correct endpoint if required)
Note: If you already have a prebuilt binary, you can skip the build step and run the binary directly, adjusting the command as needed for your environment.
Additional notes
Environment variables and configuration tips:
- Context7 API key can be provided via CONTEXT7_API_KEY. If omitted, some features may be limited.
- Ensure the MCP server endpoint is accessible to Zed (consider network/firewall settings).
- If you see outdated docs, verify that the Context7 API key is valid and that the library IDs resolved by resolve-library-id correspond to the libraries you intend to query.
- In agent mode, ensure the Context7 MCP server is enabled in both the assistant settings and the active profile's tools configuration.
- The get-library-docs tool supports topics like routing, hooks, and authentication; you can pass topic and tokens to control the scope and length of the docs returned.
- For debugging, check cargo build/run logs for any missing dependencies or API errors and ensure your environment has network access to Context7 endpoints.
Related MCP Servers
ida -rs
Headless IDA Pro MCP Server
mcp-discovery
A command-line tool written in Rust for discovering and documenting MCP Server capabilities.
turbomcp
A full featured, enterprise grade rust MCP SDK
turbovault
MCP server that transforms your Obsidian vault into an intelligent knowledge system
spec-kit
MCP server enabling AI assistants to use GitHub's spec-kit methodology
mcp-loxone
An opinionated Model Context Protocol (MCP) server for controlling Loxone home automation systems.