Open
Description
I am trying to use a custom FastMCP server as a backend for the VS Code MCP agent. The server starts successfully, and I can interact with it using the FastMCP Python client. However, when launched via the VS Code MCP agent (using the "servers" config in settings.json), the agent gets stuck on:
Here is the config
"test_server": {
"command": "/Users/sandipan/projects/AI/llm-agents/research_agent/.venv/bin/python",
"args": [
"/Users/sandipan/projects/AI/llm-agents/research_agent/mcp-server-demo/simple_server.py"
],
"env": { "PORT": "8800"}
}
Here is simple_server.py
from fastmcp import FastMCP, Client
import asyncio
from typing import List
import logging
import os
mcp = FastMCP("test_server")
# mcp_with_instruction= FastMCP("DataAnalysis", instruction="This server provides data analysis tools.Call get_average() to analyse numberical data ")
print(type(mcp))
@mcp.tool()
def greet(name: str) -> str:
return f"Hello, {name}!"
@mcp.tool()
def add(a: int, b: int) -> int:
"""Add two numbers"""
return a + b
### Resources exposes data sources that client can read
@mcp.resource("data://config")
def get_config() -> dict:
"""Provide configuration information"""
return {
"version": "1.0",
"author": "x"
}
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
logging.info(type(mcp))
asyncio.run(mcp.run_sse_async(host="localhost", port=int(os.getenv("PORT", 8800)), log_level="debug"))
Issue in vscode copilot chat on both the tools
No lowest priority node found (path: RC) (at tsx element mO > zE > Dte > Zt)
Metadata
Metadata
Assignees
Labels
No labels