Closed4

context7 で document not found

tkttkt

この設定だと、取れないドキュメントがある

.mcp.json
{
  "mcpServers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp"
    }
  }
}
● はい、context7 MCPは使えます。既にセットアップされているようですね。

● context7:resolve-library-id (MCP)(libraryName: "react")
  ⎿  Available Libraries (top matches):

     Each result includes:
     … +315 lines (ctrl+r to expand)

● context7 MCPは使えますよ!既にこのプロジェクトで設定されているようですね。

  例えば、Reactの公式ドキュメントから情報を取得できます:

● context7:get-library-docs (MCP)(context7CompatibleLibraryID: "/reactjs/react.dev", topic: "hooks", tokens: 1000)
  ⎿ Documentation not found or not finalized for this library. This might have happened because you used an invalid Context7-compatible library I
    D. To get a valid Context7-compatible library ID, use the 'resolve-library-id' with the package name you wish to retrieve documentation for.


● 他のライブラリも試してみましょう:

● context7:get-library-docs (MCP)(context7CompatibleLibraryID: "/reduxjs/react-redux", topic: "hooks", tokens: 1000)
  ⎿ Documentation not found or not finalized for this library. This might have happened because you used an invalid Context7-compatible library I
    D. To get a valid Context7-compatible library ID, use the 'resolve-library-id' with the package name you wish to retrieve documentation for.


● 一部のライブラリはまだドキュメントが利用できないようですが、context7
  MCPサーバー自体は動作しています。他のライブラリを試すか、具体的に何かお探しのライブラリがあれば教えてください。

> mise の docs は context7 にある?

● context7:resolve-library-id (MCP)(libraryName: "mise")
  ⎿  Failed to retrieve library documentation data from Context7

● context7:resolve-library-id (MCP)(libraryName: "mise-en-place")
  ⎿  Failed to retrieve library documentation data from Context7

● context7:resolve-library-id (MCP)(libraryName: "mise-en-dev")
  ⎿  Failed to retrieve library documentation data from Context7

● context7にはmiseのドキュメントはないようです。miseは比較的新しいツールで、context7のライブラリカタログにまだ追加されていない可能性があります。

  miseの情報が必要でしたら、公式サイトや GitHub から情報を取得することもできます。

> https://context7.com/jdx/mise あるっぽいよ

● その通りですね!直接ライブラリIDを指定してみましょう:

● context7:get-library-docs (MCP)(context7CompatibleLibraryID: "/jdx/mise", tokens: 2000)
  ⎿ Documentation not found or not finalized for this library. This might have happened because you used an invalid Context7-compatible library I
    D. To get a valid Context7-compatible library ID, use the 'resolve-library-id' with the package name you wish to retrieve documentation for.


● URLで存在が確認できているのに、MCPサーバー経由では取得できないようですね。context7のWebサイトには存在するけれど、MCP
  APIではまだ利用できない状態かもしれません。
tkttkt

"--node-options=--experimental-fetch", "@latest" することで取得できるようになった

.mcp.json
{
  "mcpServers": {
    "context7": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "--node-options=--experimental-fetch",
        "@upstash/context7-mcp@latest"
      ],
      "env": {}
    }
  }
}
> context7 mcp を使える?

● Read(.mcp.json)
  ⎿  Read 9 lines (ctrl+r to expand)

● はい、context7 MCPサーバーが設定されています。

● context7:resolve-library-id (MCP)(libraryName: "React")
  ⎿  Available Libraries (top matches):

     Each result includes:
     … +315 lines (ctrl+r to expand)

● context7:get-library-docs (MCP)(context7CompatibleLibraryID: "/reactjs/react.dev", topic: "hooks", tokens: 2000)
  ⎿ TITLE: React Hook Usage: Call from React Functions Only                                                                                      
    DESCRIPTION: This example highlights that React Hooks must only be called from React function components or custom Hooks, not from regular Ja
    vaScript functions. Attempting to use Hooks outside of a React function context will result in errors and violates the fundamental principles
    … +1742 lines (ctrl+r to expand)



● はい、context7 MCPが利用可能です。ReactのHooksに関する最新のドキュメントと豊富なコード例にアクセスできます。

> https://context7.com/jdx/mise の情報って取れる?

● context7:resolve-library-id (MCP)(libraryName: "mise")
  ⎿  Available Libraries (top matches):

     Each result includes:
     … +316 lines (ctrl+r to expand)

● context7:get-library-docs (MCP)(context7CompatibleLibraryID: "/jdx/mise", tokens: 3000)
  ⎿ TITLE: Execute Commands with Specific Tool Versions using mise                                                                               
    DESCRIPTION: Demonstrates how to use `mise exec` to run a command with a specific version of a tool (e.g., Node.js 22) without changing the g
    lobal environment.
    … +1602 lines (ctrl+r to expand)


● はい、取得できました!mise(jdx/mise)のドキュメントが豊富に取得できています。
tkttkt
{
  "mcpServers": {
    "context7": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ],
      "env": {}
    }
  }
}

でも取れたから、単に remote mcp が古かっただけ?

このスクラップは2ヶ月前にクローズされました