---
title: "Context7 MCP server: version-specific library docs for AI agents"
description: "Install the Context7 MCP server in an Aldena project and agents pull current, version-specific docs and code examples for the libraries they use."
url: "https://aldena.ai/mcp-servers/context7"
---

# Context7 stops agents from coding against last year's library API

Context7 MCP server. Install the Context7 MCP server in an Aldena project and agents pull current, version-specific docs and code examples for the libraries they use.

- **Sign-in**: None
- **Installs as**: `context7`
- **Transport**: Streamable HTTP
- **Last verified**: 2026-11-28

Context7 indexes the documentation and code examples of a large set of libraries and frameworks, per version, and serves them over MCP with two tools. `resolve-library-id` turns a package name into a Context7 library ID, and `query-docs` returns the docs and examples that answer a question about it. No account or key is needed for the marketplace install.

The problem it solves is the gap between what a model learned and what a project depends on. An agent in an Aldena project reads the versions pinned in `package.json`, resolves each library it is about to use, and pulls the docs for that version before writing a line. When a dependency bump breaks the build, the agent queries the new version's docs for the renamed API, fixes the call sites in its conversation's sandbox, runs the tests, and opens the pull request through the [GitHub connector](https://aldena.ai/integrations/github).

Both tools are read-only, so they start on allow and agents never wait for approval to look something up. Context7 pairs well with framework-specific servers such as the [Astro Docs MCP server](https://aldena.ai/mcp-servers/astro-docs), and with the [DeepWiki MCP server](https://aldena.ai/mcp-servers/deepwiki) when the question is how a library works inside rather than how to call it.

## With Context7, your agents can

- Resolve a package name to the matching Context7 library
- Pull docs and code examples for the exact version in use
- Answer API questions from current docs instead of training data
- Cover many libraries and frameworks with one server

## Try asking

- “Use Context7 to check how React Router 7 defines route loaders, then update our routes file to match.”
- “Our package.json pins Zod 4. Pull the Context7 docs for its error formatting and replace the deprecated calls in src/validators.”
- “Find the Context7 docs for Drizzle ORM migrations on SQLite and write a migration for the new invoices table.”

## Context7 MCP tools

| Tool | What it does | Access |
| --- | --- | --- |
| `resolve-library-id` | Finds the Context7 library ID for a package or product name | Read |
| `query-docs` | Returns current documentation and code examples for a library ID | Read |

## Server

- **Server URL**: `https://mcp.context7.com/mcp`
- **Website**: [context7.com](https://context7.com)
- **MCP docs**: [Context7 MCP docs](https://github.com/upstash/context7)

## How to connect Context7

1. **Open Marketplace.** In a project, open Settings → Connectors → MCP servers and press Marketplace.
2. **Install Context7.** Search for Context7 and press Install. Aldena adds it as `context7`.
3. **Nothing to sign in to.** Aldena installs Context7 with no sign-in or key, so its tool calls carry no credentials.
4. **Let agents use it.** Agents find its tools with `mcp_search` and call them with `mcp_call`. Each tool gets its own row in the project's permissions.

## Related MCP servers

- [DeepWiki MCP server](https://aldena.ai/mcp-servers/deepwiki): Read generated wikis and ask questions about public repos.
- [GitMCP MCP server](https://aldena.ai/mcp-servers/gitmcp): Read documentation and code from any public GitHub repo.
- [Notion MCP server](https://aldena.ai/mcp-servers/notion): Search, read, and update pages and databases.
- [Twilio Docs MCP server](https://aldena.ai/mcp-servers/twilio-docs): Search the Twilio API documentation.
- [All MCP servers](https://aldena.ai/mcp-servers)

## FAQ

### Do I need a Context7 account to use the MCP server in Aldena?

No. The marketplace install connects without a sign-in, so agents can resolve libraries and pull their docs straight away. Both tools mark themselves read-only, and Aldena starts read-only tools on allow, so nobody has to approve a docs lookup.

### How do agents use the two Context7 tools?

In order. resolve-library-id turns a package name such as next or drizzle-orm into a Context7 library ID, and query-docs fetches documentation and examples for that ID and a question. Agents find both through mcp_search and call them through mcp_call.

### How is Context7 different from DeepWiki or GitMCP?

Context7 serves curated docs and code examples per library and version, which suits writing code against a dependency. DeepWiki answers questions about a GitHub repository from its generated wiki, and GitMCP reads a repository's own docs and code.
