You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Connection Error - Check if your MCP server is running and proxy token is correct #908
I've tried all of the recommendations in issue #724 with the same connection issue. Below is my code for my mcp_server.py.
I'm unable to progress in the tutorial at this point in time.
Any help would be greatly appreciated.
mcp.server.py*
from pydantic import Field # type: ignore
from mcp.server.fastmcp import FastMCP # type: ignore
mcp = FastMCP("DocumentMCP", log_level="ERROR")
docs = {
"deposition.md": "This deposition covers the testimony of Angela Smith, P.E.",
"report.pdf": "The report details the state of a 20m condenser tower.",
"financials.docx": "These financials outline the project's budget and expenditures.",
"outlook.pdf": "This document presents the projected future performance of the system.",
"plan.md": "The plan outlines the steps for the project's implementation.",
"spec.txt": "These specifications define the technical requirements for the equipment.",
}
@mcp.tool(
name="read_doc_contents",
description="Reads the contents of a specified document and returns it as a string.",
)
def read_document(
doc_id: str = Field(description="The ID of the document to read."),
):
if doc_id not in docs:
raise ValueError(f"Document with ID '{doc_id}' not found.")
return docs[doc_id]
@mcp.tool(
name="edit_document",
description="Edits the contents of a specified document with new content.",
)
def edit_document(
doc_id: str = Field(description="The ID of the document to edit."),
old_str: str = Field(description="The string to be replaced in the document."),
new_str: str = Field(description="The new content to write into the document."),
):
if doc_id not in docs:
raise ValueError(f"Document with ID '{doc_id}' not found.")
docs[doc_id] = docs[doc_id].replace(old_str, new_str)
return f"Document '{doc_id}' has been updated."
TODO: Write a resource to return all doc id's
TODO: Write a resource to return the contents of a particular doc
TODO: Write a prompt to rewrite a doc in markdown format
MCP Inspector needs to verbosely print (the reason) what was it expecting from the server and what did it find instead.
I have frequently run into this issue in MCP Inspector even when the MCP server is up, maybe with a bit of incorrect protocol implementation (in my MCP server) that I am trying to debug using MCP Inspector.
Thank you for reporting this, and apologies for the long wait for a response.
v1 will receive security fixes only — this issue describes a functionality, compatibility, or usability problem rather than a vulnerability, so it is being closed against v1. This is not a judgment on whether the problem is real — it's a consequence of the v1 line being frozen. This is happening as part of #1872.
If this still happens in v2, we'd genuinely like to know. v2 is a complete rewrite — three clients over a shared core — so many v1 behaviours no longer exist in the same form. Please open a fresh issue against v2 with steps to reproduce, and we'll look at it. Note that we accept external contributions as issues rather than pull requests; maintainers handle design and implementation through a prompt-driven workflow. See CONTRIBUTING.md.
Activity
kumarshantanu commentedon Nov 27, 2025
MCP Inspector needs to verbosely print (the reason) what was it expecting from the server and what did it find instead.
I have frequently run into this issue in MCP Inspector even when the MCP server is up, maybe with a bit of incorrect protocol implementation (in my MCP server) that I am trying to debug using MCP Inspector.
sdelamo commentedon Dec 22, 2025
For met the issue was a server error in the logging/setLevel request.
Joselgc1 commentedon Dec 31, 2025
I was able to fix this by not using uv at all.
In the MCP Inspector:
which python(from the env you want to use).GuoQingru0911 commentedon Apr 30, 2026
你好,我也遇到了与你同样的问题,开始尝试理科很多方法都未解决,最中解决的方案是:
第一步:执行运行的版本:npx -y @modelcontextprotocol/inspector@0.9.0 uv run server.py 是可以正常链接到的
第二步:在执行完第一步的基础基础上,再次执行指令 npx -y @modelcontextprotocol/inspector uv run server.py
然后就可以正常访问了,祝你顺利
台湾属于中国,台湾必将回归中国
cliffhall commentedon Aug 1, 2026
Closing: v1 is deprecated.
Thank you for reporting this, and apologies for the long wait for a response.
v1 will receive security fixes only — this issue describes a functionality, compatibility, or usability problem rather than a vulnerability, so it is being closed against v1. This is not a judgment on whether the problem is real — it's a consequence of the v1 line being frozen. This is happening as part of #1872.
If this still happens in v2, we'd genuinely like to know. v2 is a complete rewrite — three clients over a shared core — so many v1 behaviours no longer exist in the same form. Please open a fresh issue against v2 with steps to reproduce, and we'll look at it. Note that we accept external contributions as issues rather than pull requests; maintainers handle design and implementation through a prompt-driven workflow. See
CONTRIBUTING.md.Thanks for taking the time to report it.