Context7 MCP

by upstash
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Retrieves up-to-date documentation for Next.js features including the new after function and route protection with NextAuth

  • Supports Node.js as a runtime requirement (v18.0.0+) for the MCP server

  • Delivers up-to-date documentation and code examples for React library features

Context7 MCP - 모든 커서 프롬프트에 대한 최신 문서

❌ 맥락 없이7

LLM은 사용하는 도서관에 대한 오래되거나 일반적인 정보에 의존합니다. 다음과 같은 정보를 얻게 됩니다.

  • ❌ 코드 예제는 오래되었으며 1년 된 교육 데이터를 기반으로 합니다.
  • ❌ 환각 API는 존재하지도 않습니다.
  • ❌ 이전 패키지 버전에 대한 일반적인 답변

✅ Context7을 사용하여

Context7 MCP는 최신 버전별 설명서와 코드 예제를 소스에서 직접 가져와 프롬프트에 바로 배치합니다.

Cursor에서 질문에 use context7 추가하세요:

지엑스피1

How do I invalidate a query in React Query? use context7
How do I protect a route with NextAuth? use context7

Context7은 최신 문서와 실행 가능한 코드 예제를 귀하의 LLM 컨텍스트로 바로 가져옵니다.

  • 1️⃣ 자연스럽게 질문하세요
  • 2️⃣ LLM에 use context7 지시하세요
  • 3️⃣ 작동하는 코드에 대한 답변을 얻으세요

탭 전환도 없고, 존재하지 않는 이상한 API도 없고, 오래된 코드 생성도 없습니다.

🛠️ 시작하기

요구 사항

  • Node.js >= v18.0.0
  • 커서, 윈드서프, 클로드 데스크톱 또는 다른 MCP 클라이언트

커서에 설치

이동: Settings -> Cursor Settings -> MCP -> Add new global MCP server

이 내용을 Cursor ~/.cursor/mcp.json 파일에 붙여넣으세요. 자세한 내용은 Cursor MCP 문서를 참조하세요.

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

윈드서프에 설치

Windsurf MCP 설정 파일에 이 내용을 추가하세요. 자세한 내용은 Windsurf MCP 문서를 참조하세요.

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

VSCode에 설치

VSCode MCP 설정 파일에 이 내용을 추가하세요. 자세한 내용은 VSCode MCP 문서를 참조하세요.

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

사용 가능한 도구

  • resolve-library-id : 일반 라이브러리 이름을 Context7과 호환되는 라이브러리 ID로 변환합니다.
    • libraryName (선택 사항): 검색 및 결과 재순위 지정
  • get-library-docs : Context7 호환 라이브러리 ID를 사용하여 라이브러리에 대한 문서를 가져옵니다.
    • context7CompatibleLibraryID (필수)
    • topic (선택 사항): 문서를 특정 주제(예: "라우팅", "후크")에 집중시킵니다.
    • tokens (선택 사항, 기본값 5000): 반환할 최대 토큰 수

개발

프로젝트를 복제하고 종속성을 설치합니다.

bun i

짓다:

bun run build

로컬 구성 예

{ "mcpServers": { "context7": { "command": "npx", "args": ["tsx", "/path/to/folder/context7-mcp/src/index.ts"] } } }

MCP Inspector로 테스트

npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp@latest

특허

MIT

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

라이브러리에서 최신 버전별 설명서와 코드 예제를 직접 LLM 프롬프트로 가져오는 모델 컨텍스트 프로토콜 서버로, 개발자가 오래되거나 왜곡된 정보 없이 정확한 답변을 얻을 수 있도록 도와줍니다.

  1. ❌ Without Context7
    1. ✅ With Context7
      1. 🛠️ Getting Started
        1. Requirements
        2. Install in Cursor
        3. Install in Windsurf
        4. Install in VSCode
        5. Available Tools
      2. Development
        1. Local Configuration Example
        2. Testing with MCP Inspector
      3. License
        ID: qvpit0siis