fastmcp
fastmcp copied to clipboard
Multi-server Clients don't block for server initialization
Description
[05/23/25 00:14:53] INFO Starting MCP server 'Local Filesystem Operations MCP' with transport 'stdio' server.py:747
2025-05-23 00:14:54,262 - mcp_server_tree_sitter.language.registry - WARNING - Skipping pre-loading of languages due to missing dependencies
2025-05-23 00:14:54,285 - mcp_server_tree_sitter.server - INFO - Starting MCP Tree-sitter Server
2025-05-23 00:14:54,293 - mcp.server.lowlevel.server - INFO - Processing request of type ListToolsRequest
[05/23/25 00:14:55] INFO Starting MCP server 'Local References' with transport 'stdio' server.py:747
5.24s - Error on build_exception_info_response.
Traceback (most recent call last):
File "/Users/bill.easton/.cursor/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 1477, in build_exception_info_response
stack_str = ''.join(stack_summary.format())
~~~~~~~~~~~~~~~~~~~~^^
File "/Users/bill.easton/.local/share/uv/python/cpython-3.13.3-macos-aarch64-none/lib/python3.13/traceback.py", line 757, in format
formatted_frame = self.format_frame_summary(frame_summary, colorize=colorize)
File "/Users/bill.easton/.local/share/uv/python/cpython-3.13.3-macos-aarch64-none/lib/python3.13/traceback.py", line 561, in format_frame_summary
last_line = all_lines_original[frame_summary.end_lineno - frame_summary.lineno]
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range
Example Code
mcp = FastMCP(name="mcp-oops")
config_contents = Path(mcp_config).read_text(encoding="utf-8")
config = yaml.safe_load(config_contents)
client = Client(config)
async with client:
await client.ping()
await client.list_tools() <---- ERROR
proxy = FastMCP.as_proxy(client)
Version Information
2.4.0
Additional Context
No response
actually i think a server is just failing to start and not giving me any info on why
Looks like maybe NPX servers arent supported via config dicts yet?
git:
command: "npx"
args: ["-y", "@cyanheads/git-mcp-server"]
description: "Perform git-related actions"
That's weird they should be! Will have to look into it