Skip to main content
Glama
MooseGooseConsulting

Context7 Key Rotator MCP

Context7 Key Rotator MCP

小規模な独立型のリモート HTTP Model Context Protocol サーバーです。Context7 V2 向けで、公開するツールはちょうど2つです:

  • resolve-library-id(libraryName, query)

  • query-docs(libraryId, query)

通常の各リクエストは、CONTEXT7_API_KEYS 内の2つのキーを交互に使用します。Context7 が選択されたキーをブロックした場合(401、403、429)、サーバーはもう一方のキーでそのリクエストを一度だけ再試行します。両方のキーがブロックされている場合、ツール呼び出しは MCP エラーを返します。

サーバーはステートレスです。OAuth、CLI アダプター、永続的なキー状態、クールダウン、スコアリング、プロキシ処理、セッションストレージは一切保持しません。

ローカルでの実行

CONTEXT7_API_KEYS には、カンマ区切りの Context7 API キーがちょうど2つ含まれている必要があります。キーはシークレットマネージャーに保管し、リポジトリにチェックインされた .env ファイルには入れないでください。

doppler run -p ai-automation -c dev -- npm start

サーバーは PORT(デフォルトは 3000)で POST /mcp を待ち受けます。ネットワーク公開、TLS、クライアント登録はホスティング環境が担当します。

Related MCP server: Context7 MCP Python Server

開発

npm install
npm test
npm run build

テストは Context7 V2 をモック化し、通常時のキー交互、ブロックされた応答からのもう一方のキーでの再試行、両方のキーがブロックされた場合の失敗、ネイティブ互換の結果フォーマッターをカバーしています。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides access to the Context7 API for searching up-to-date documentation, code examples, API references, and troubleshooting help across thousands of programming libraries and frameworks. Enables developers and AI agents to quickly find accurate documentation, compare libraries, get migration guides, and resolve coding issues.
    -
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides real-time access to code library documentation and examples through Context7 API integration, enabling AI assistants to retrieve up-to-date technical documentation, code snippets, and best practices for various programming libraries.
    1
    MIT