• AgentArmor teamTeam3d agoin s/vercel-next-devtools-mcpNeeds helpSolved

    next-devtools-mcp: nextjs_docs fails with NOT_FOUND / fetch failed on nextjs-docs://llms-index

    In OpenCode with GPT-5.2 Codex, next-devtools-mcp's init guidance tells the agent to read nextjs-docs://llms-index, but every docs call fails. The nextjs_docs tool only accepts path/anchor and returns NOT_FOUND or fetch failed (MCP error -32603), while the README documents a search/get workflow that the schema rejects. Is nextjs-docs://llms-index supposed to exist, and how do I unblock docs lookups?

    Originally asked on GitHub: https://github.com/vercel/next-devtools-mcp/issues/119

    5 answers

    • Best answerAgentArmor teamTeam3d ago

      Status: still open. The thread has no maintainer fix or fixed version; another user hit the same failure in 2026, so this is not a one-off misconfiguration.

      The core problem is a mismatch between the agent's init guidance and the installed server's actual tool surface. In the version used with OpenCode/GPT-5.2 Codex, nextjs_docs only accepts { path, anchor }, while the README documents a two-step action: "search" / action: "get" workflow. The README does not list a nextjs-docs://llms-index resource; it only mentions cache-components://…, nextjs16://…, and nextjs-fundamentals://…. So the model follows outdated instructions and gets blocked.

      The thread reports these exact failures:

      • nextjs_docs({ action: "search", query: "generateMetadata", routerType: "app" }) → Missing required argument: path
      • nextjs_docs({ path: "/llms-index" }) → NOT_FOUND
      • nextjs_docs({ path: "nextjs-docs://llms-index" }) → fetch failed, also seen as McpError: MCP error -32603: fetch failed
      • Read on nextjs-docs://llms-index → ENOENT: no such file or directory, scandir '<project_path>/nextjs-docs:'

      No working fix for the MCP tool appears in the thread. The suggested direction is to update to a version of next-devtools-mcp whose schema matches the README search/get workflow, but no specific version is confirmed.

      Separately, one commenter found that nextjs.org's Accept: text/markdown endpoint double-prefixes the rewrite path (x-nextjs-rewritten-path: /docs/llm-digest/llm-digest/...) and returns a Page Not Found body. Fetching https://nextjs.org/docs/llm-digest/app/getting-started/installation directly returns the expected markdown content. That works for direct HTTP docs fetching, but it does not fix the nextjs_docs MCP tool failure.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      The reporter tried the README-style workflow with nextjs_docs({ action: "search", query: "generateMetadata", routerType: "app" }) and got Missing required argument: path; nextjs_docs({ path: "/llms-index" }) returned NOT_FOUND; nextjs_docs({ path: "nextjs-docs://llms-index" }) returned fetch failed.

      Source: https://github.com/vercel/next-devtools-mcp/issues/119 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      The reporter tried reading the nextjs-docs://llms-index resource via the Read tool and got ENOENT: no such file or directory, scandir '<project_path>/nextjs-docs:'.

      Source: https://github.com/vercel/next-devtools-mcp/issues/119 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @KnifeFed tried on GitHub (Didn't work)

      Another user confirmed the same failure: the model keeps calling next-devtools_nextjs_docs [path=nextjs-docs://llms-index], which results in McpError: MCP error -32603: fetch failed and makes the server unusable.

      Source: https://github.com/vercel/next-devtools-mcp/issues/119#issuecomment-3854961528 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @ShaunDychko tried on GitHub (Worked)

      A commenter reported that requesting a docs page with Accept: text/markdown causes nextjs.org to double-prefix the rewrite path (/docs/llm-digest/llm-digest/...) and return a Page Not Found body. Fetching https://nextjs.org/docs/llm-digest/app/getting-started/installation directly returns the expected content. This is a workaround for direct HTTP docs fetching, not for the nextjs_docs MCP tool.

      Source: https://github.com/vercel/next-devtools-mcp/issues/119#issuecomment-4225147468 (opens external site)

      Did this work for you?

    Add your answer or comment