# Context7 (MCP Server)

> Pull up-to-date, version-specific library docs into your coding agent

- Type: MCP server
- Publisher: Upstash (official)
- Categories: Development
- Website: https://github.com/upstash/context7
- Source: https://github.com/upstash/context7
- Transport: streamable-http
- Server URL: https://mcp.context7.com/mcp
- Launch command: npx -y @upstash/context7-mcp
- Sign-in: api-key
- GitHub stars: 62577
- Listed: 2025-03-26

## About

Context7 by Upstash supplies current, version-specific documentation and code examples for thousands of libraries so coding agents avoid outdated APIs. It is available as a hosted remote server or a local npm package, authenticated with a Context7 API key.

## Install

1. **Connect it in ChatGPT** Turn on Developer mode in ChatGPT (Settings → Security and login), open Plugins, select + and paste https://mcp.context7.com/mcp as the MCP server URL. Add it to a chat from the composer's tools menu.

2. **Or add it to Codex or the API**

   Codex CLI:

   ```bash
   codex mcp add context7 --url https://mcp.context7.com/mcp --bearer-token-env-var CONTEXT7_API_KEY
   ```

   config.toml:

   ```toml
   [mcp_servers.context7]
   url = "https://mcp.context7.com/mcp"
   bearer_token_env_var = "CONTEXT7_API_KEY"
   ```

   Responses API:

   ```python
   import os
   from openai import OpenAI
   
   client = OpenAI()
   
   response = client.responses.create(
       model="gpt-6-astra",
       tools=[{
           "type": "mcp",
           "server_label": "context7",
           "server_url": "https://mcp.context7.com/mcp",
           "authorization": os.environ["CONTEXT7_API_KEY"],
           "require_approval": "never",
       }],
       input="Create a Next.js middleware that checks a JWT. use context7",
   )
   print(response.output_text)
   ```

## Tools

- `resolve-library-id`
- `query-docs`

## Example prompts

- "Create a Next.js middleware that checks a JWT. use context7"
- "Show me the latest Supabase auth API for sign-in with OTP"
- "How do I configure Tailwind v4 with Vite? use context7"

## Also available as

- app: [Context7](https://chatgptplugins.directory/apps/context7.md)

## Related

- [Chrome DevTools MCP](https://chatgptplugins.directory/mcp/chrome-devtools.md): Let coding agents control and debug a live Chrome browser
- [Playwright MCP](https://chatgptplugins.directory/mcp/playwright.md): Browser automation for agents via Playwright accessibility snapshots
- [GitHub](https://chatgptplugins.directory/mcp/github.md): Manage repos, issues, pull requests and Actions from your AI agent
- [Supabase](https://chatgptplugins.directory/mcp/supabase.md): Manage Supabase databases, migrations, edge functions and logs
- [Stripe](https://chatgptplugins.directory/mcp/stripe.md): Query and act on your Stripe account and search Stripe docs from any agent
- [Atlassian Rovo (Jira & Confluence)](https://chatgptplugins.directory/mcp/atlassian-rovo.md): Work with Jira issues and Confluence pages through Atlassian's hosted MCP

---
Source: https://chatgptplugins.directory/mcp/context7 · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
