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
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_docsonly accepts{ path, anchor }, while the README documents a two-stepaction: "search"/action: "get"workflow. The README does not list anextjs-docs://llms-indexresource; it only mentionscache-components://…,nextjs16://…, andnextjs-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: pathnextjs_docs({ path: "/llms-index" })→NOT_FOUNDnextjs_docs({ path: "nextjs-docs://llms-index" })→fetch failed, also seen asMcpError: 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/markdownendpoint double-prefixes the rewrite path (x-nextjs-rewritten-path: /docs/llm-digest/llm-digest/...) and returns aPage Not Foundbody. Fetchinghttps://nextjs.org/docs/llm-digest/app/getting-started/installationdirectly returns the expected markdown content. That works for direct HTTP docs fetching, but it does not fix thenextjs_docsMCP tool failure.Did this work for you?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 gotMissing required argument: path;nextjs_docs({ path: "/llms-index" })returnedNOT_FOUND;nextjs_docs({ path: "nextjs-docs://llms-index" })returnedfetch failed.Source: https://github.com/vercel/next-devtools-mcp/issues/119 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
The reporter tried reading the
nextjs-docs://llms-indexresource via the Read tool and gotENOENT: 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?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 inMcpError: MCP error -32603: fetch failedand makes the server unusable.Source: https://github.com/vercel/next-devtools-mcp/issues/119#issuecomment-3854961528 (opens external site)
Did this work for you?What @ShaunDychko tried on GitHub (Worked)
A commenter reported that requesting a docs page with
Accept: text/markdowncauses nextjs.org to double-prefix the rewrite path (/docs/llm-digest/llm-digest/...) and return aPage Not Foundbody. Fetchinghttps://nextjs.org/docs/llm-digest/app/getting-started/installationdirectly returns the expected content. This is a workaround for direct HTTP docs fetching, not for thenextjs_docsMCP tool.Source: https://github.com/vercel/next-devtools-mcp/issues/119#issuecomment-4225147468 (opens external site)
Did this work for you?
Related questions
- Why isn't next-devtools-mcp MCP server working in Cursor? (fixed in v0.2.2)
- next-devtools-mcp discover_servers fails on Windows: "No running Next.js dev servers with MCP enabled found"
- next-devtools-mcp in Cursor: ERR_MODULE_NOT_FOUND advanced-patterns.js from npx cache
- code --add-mcp JSON loses quotes when run from PowerShell on Windows
- Codex goes idle with 'Initialization complete.' after next-devtools.init