Verified MCP server: Context7

The Context7 MCP server, verified live on a real Mac.

  • Verified2026-08-03macOS 15.7.7
  • Package@upstash/context7-mcp 3.2.5
  • Self-reportedContext7 3.2.5
  • MCP protocol2024-11-05
  • Runtimev24.18.0

The short answer

Last verified 2026-08-03

Context7 looks up current, version-specific documentation and code examples for a library, then feeds them to your AI assistant so it stops answering from memory that may be a year out of date. It is built and published by Upstash, the company behind the Context7 service, and on your Mac it runs as one small command. An API key is optional here: the documentation offers one for higher rate limits and private repositories, and we used none. We ran the server, spoke the protocol to it, enumerated both tools it exposes, and then asked it about React with no key set anywhere. It answered with a real ranked list of React documentation sources, and that raw output is on this page. [1][3][5]

  • Tools

    2, enumerated live

  • Credentials

    None needed

  • Transport

    stdio, runs on your Mac [5]

  • Maintainer

    Upstash [1][3]

  • Downloads

    912k last week [2]

  • License

    MIT [3]

Verification

How this MCP server was verified.

Method

We spawned the server with npx over stdio, completed the MCP initialize handshake, and called tools/list, which answered with two tools. Then we made one real tool call, resolve-library-id for React, with no API key set anywhere and nothing signed up for. It came back with a ranked list of Context7 library IDs for React, and the excerpt below is the opening of that answer, word for word.

Startup banner

Context7 Documentation MCP Server v3.2.5 running on stdio

One real tool call

tools/call resolve-library-id {"libraryName":"React","query":"how to use hooks"}
Available Libraries:

- Title: React
- Context7-compatible library ID: /reactjs/react.dev

Real lines from the captured result: enough to prove the call answered.

Tools

Every tool, enumerated from the running server.

The server answered tools/list with 2 tools on 2026-08-03. The names, descriptions and parameters below are its own words, copied from that response and never edited.

ToolWhat it does
resolve-library-idquery*libraryName*

Resolves a package/product name to a Context7-compatible library ID and returns matching libraries. You MUST call this function before 'Query Documentation' tool to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query. Each result includes: - Library ID: Context7-compatible identifier (format: /org/project) - Name: Library or package name - Description: Short summary - Code Snippets: Number of available code examples - Source Reputation: Authority indicator (High, Medium, Low, or Unknown) - Benchmark Score: Quality indicator (100 is the highest score) - Versions: List of versions if available. Use one of those versions if the user provides a version in their query. The format of the version is /org/project/version. For best results, select libraries based on name match, source reputation, snippet coverage, benchmark score, and relevance to your use case. Selection Process: 1. Analyze the query to understand what library/package the user is looking for 2. Return the most relevant match based on: - Name similarity to the query (exact matches prioritized) - Description relevance to the query's intent - Documentation coverage (prioritize libraries with higher Code Snippet counts) - Source reputation (consider libraries with High or Medium reputation more authoritative) - Benchmark Score: Quality indicator (100 is the highest score) Response Format: - Return the selected library ID in a clearly marked section - Provide a brief explanation for why this library was chosen - If multiple good matches exist, acknowledge this but proceed with the most relevant one - If no good matches exist, clearly state this and suggest query refinements For ambiguous queries, request clarification before proceeding with a best-guess match. IMPORTANT: Do not call this tool more than 3 times per question. If you cannot find what you need after 3 calls, use the best result you have.

query-docslibraryId*query*

Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework. You must call 'Resolve Context7 Library ID' tool first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query. Do not call this tool more than 3 times per question.

Parameters marked with * are required.

Setup

Working configs, one per app.

Copy the block for the app you use. Each one is the configuration this server was verified with.

Claude Desktop

Open the file ~/Library/Application Support/Claude/claude_desktop_config.json (in Claude Desktop: Settings, then Developer, then Edit Config) and add:

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

This is the exact configuration we verified, with no key of any kind. If you later want a Context7 API key, the documented way to pass it is an "env" block with CONTEXT7_API_KEY next to "args". Quit and reopen Claude Desktop after saving. [6][5]

Claude Code

One command in your terminal:

claude mcp add context7 -- npx -y @upstash/context7-mcp

Everything after the double dash is the exact command Claude Code will run, and it is the command we ran. The documented way to add a key later is to put --api-key followed by your key at the end of the same line. [7][5]

Cursor

Add to ~/.cursor/mcp.json for every project, or to .cursor/mcp.json inside one project:

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

Cursor picks the file up on restart. [8]

Routines

No JSON file and no terminal. In Routines: Settings, then Assistant, then Connections, then Add MCP Server. Switch the form to Command (stdio) and enter:

Name        Context7
Command     npx
Arguments   -y @upstash/context7-mcp

Leave Environment Variables empty: that is how we ran it, and it needs nothing there. Click Test Connection first: a working server answers with its tool count. [9]

No terminal needed

Set the Context7 MCP server up without the terminal.

If you have never opened Terminal and never want to, this is your path. Routines is a Mac app that runs MCP servers for you: fill in three fields once, and this server's tools are available to your AI in chat and in scheduled routines.

  1. 01

    Install Routines

    Download the app from getroutines.ai/download, drag it to Applications, and sign in.

  2. 02

    Open the MCP settings

    Click your account at the bottom of the sidebar and choose Settings. Open the Assistant section, then the Connections tab, scroll to MCP Servers, and click Add MCP Server.

  3. 03

    Choose Command (stdio)

    Switch the form to Command (stdio). This server is a command your Mac runs, not a web address, so the other option will not work for it.

  4. 04

    Fill in three fields

    Name: Context7. Command: npx. Arguments: -y @upstash/context7-mcp. That is the whole configuration, and it is the one we verified. Nothing to sign up for, nothing to paste.

  5. 05

    Test, then add

    Leave Environment Variables empty, this server needs none. Click Test Connection: Routines starts the server and reports how many tools it found, two for this one. Then click Add Server.

  6. 06

    Use it

    The tools work in chat right away: name a library and ask for its current documentation. To let a scheduled routine use them, open the routine, find the Tools & connections card, and tick the server under Apps.

Routine ideas

Routines worth scheduling.

Once the server is connected, a scheduled routine can use its tools while you are away. Copy a prompt, paste it into Routines, and pick a time.

A Monday stack briefing

Prompt

Every Monday at 9:00, look up the current documentation for React, Tailwind CSS and Laravel, note anything that reads as new or changed since last week, and save a short plain-English summary as stack-briefing.md in my Documents folder.

A monthly upgrade checklist

Prompt

On the first Monday of every month at 10:00, read the library names listed in my stack.md file, fetch the current upgrade and migration documentation for each one, and write me a checklist of what would need to change, one short section per library.

A Friday cheat sheet

Prompt

Every Friday at 15:00, take the libraries listed in my learning.md file, pull their current setup and configuration documentation, and save one short cheat sheet per library in my Notes folder with the code examples included.

Troubleshooting

The errors we hit, and what fixed them.

Real errors captured during the verification run, printed exactly as the server returned them.

The assistant answers from memory instead of fetching the docs

The fix

Nothing is broken. The two tools only run when the assistant decides to use them, so say what you want out loud: name the library and ask it to check the current documentation before answering. If your app lists the two tools from the table above after connecting, the server is working and the rest is prompting.

The wrong library comes back, or none does

The fix

The lookup matches on the official name, and the server asks for it with proper punctuation, so write Next.js rather than nextjs. In our run, asking for React alone returned five different entries, each with its own library ID, snippet count and benchmark score. If the first one is not the documentation you meant, ask for one of the others from that list by name.

Nothing comes back while your Mac is offline

The fix

This server is a lookup service, not a copy of the docs on your disk. Its own parameter descriptions, captured during our verification run, say the query is sent to the Context7 API for processing, so both tools need an internet connection to answer. On a locked-down office network, ask whoever manages it to allow the Context7 service.

Your MCP client cannot start the server at all

The fix

The npx command belongs to Node.js. If Node is not installed on your Mac, every client on this page fails at the spawn step before the server can say anything. Install Node from nodejs.org, restart your MCP client, and try again.

FAQ

Questions people ask.

What is the Context7 MCP server?

It is a documentation lookup server for AI assistants, published by Upstash. Once connected, your assistant can pull current, version-specific documentation and code examples for a library instead of answering from training data that may predate the version you use. It runs as a local process on your Mac and talks to your AI app over stdio. [5][3]

What tools does the Context7 MCP server include?

Two, and they are meant to be used in order: resolve-library-id turns a name like React into a Context7 library ID and shows you the matches it found, and query-docs then fetches documentation and code examples for the ID you picked. The table above is the live tools/list output, word for word, including the server's own note that neither should be called more than three times per question.

Is the Context7 MCP server safe?

It reads nothing on your Mac: it has no file, folder or shell access, and both tools only look documentation up. The trade is the other direction. The text you send travels: the server's own parameter descriptions, captured during our verification run, say the query is sent to the Context7 API for processing and warn against putting API keys, credentials, personal data or proprietary code in it. Ask it about libraries, not about your private code.

Do I need the terminal to set it up?

No. In Routines you fill three fields in Settings and click Test Connection; the walkthrough above shows every click. Claude Desktop needs a small JSON file edited once. Only Claude Code is terminal-first by nature. [9][6]

Does the Context7 MCP server need an API key or an account?

Not to start. Our run had no key set anywhere and the sample call still returned real results, which is why the config blocks above carry none. The documentation does offer a free key from the Context7 dashboard for higher rate limits and access to private repositories, passed either as an --api-key flag or as a CONTEXT7_API_KEY environment variable. Add one if you hit the limits, not before. [5]

Why do some guides mention a get-library-docs tool?

Because the docs disagree with each other and with the package. The README published with the npm package lists resolve-library-id and get-library-docs, while the repository README lists resolve-library-id and query-docs. The version we actually ran, 3.2.5, answered tools/list with resolve-library-id and query-docs, so those are the two names in the table above. If a guide names a tool your app does not list, trust your app. [5][4]

Which apps can use the Context7 MCP server?

Any MCP client that can launch a local stdio server: Claude Desktop, Claude Code, Cursor, and Routines all can, and the exact config for each is above. Upstash also runs a hosted version of the same server at a web address, for clients that prefer a URL over a command, which is documented alongside the local setup. [6][7][8][9][5]

Sources

Every external claim, receipted.

Anything on this page we did not observe in the run is linked here, with the date we read it. The run itself is the receipt for the rest.

  1. [1]

    npm registry: @upstash/context7-mcpaccessed 2026-08-03

    Latest version 3.2.5, published 2026-07-25; publisher and maintainers are Upstash accounts.

  2. [2]

    npm downloads API: last weekaccessed 2026-08-03

    912,031 downloads for the week ending 2026-08-01.

  3. [3]

    GitHub API: upstash/context7accessed 2026-08-03

    60,170 stars, MIT license and a push dated 2026-08-02 at access time.

  4. [4]

    upstash/context7 README (master branch)accessed 2026-08-03

    The repository README, which names the tools resolve-library-id and query-docs.

  5. [5]

    README published with @upstash/context7-mcp 3.2.5accessed 2026-08-03

    Read from the npm registry payload: per-client install blocks, the stdio and http transport flags, the optional API key, and the hosted server address.

  6. [6]

    modelcontextprotocol.io: Connect to local MCP serversaccessed 2026-08-03

    The official Claude Desktop quickstart and the location of its config file.

  7. [7]

    Claude Code docs: MCPaccessed 2026-08-03

    The claude mcp add syntax for local stdio servers.

  8. [8]

    Cursor docs: Model Context Protocolaccessed 2026-08-03

    The mcp.json shape and file locations.

  9. [9]

    Routines: Connectorsaccessed 2026-08-03

    How Routines runs one-click OAuth connectors and any MCP server.

This page describes Context7 as it behaved in one dated run on one Mac. Versions move: if something here no longer matches what you see, the capture date at the top says how old the reading is.

Behind this directory

Routines, the app behind this directory, runs MCP servers like this one without a terminal: see how connectors work. Your notes stay markdown files on your Mac, there is no cloud bill, and it works offline. Download Routines