sxhxliang / mcp-access-point

Turn a web server into an MCP server in one click without making any code changes.
https://deepwiki.com/OpenAgentX/mcp-access-point
MIT License
44 stars 11 forks source link

Client stuck state Waiting for server to respond to `initialize` request... #4

Closed dhruv-bansal closed 3 weeks ago

dhruv-bansal commented 4 weeks ago

I am trying to run simple use case - to expose existing APIs on MCP server as tools and then test it from the MCP client

config file for mcp-access-point

access_point:
  listeners:
    - address: 0.0.0.0:8080

mcps:
  - id: test
    upstream_id: 1
    path: https://petstore.swagger.io/v2/swagger.json

MCP client configuration

{
    "servers": {
        "test": {
            "url": "http://localhost:8080/api/test/sse"
        }
    }
}

MCP client kept waiting for 'initialize request'

[info] Starting server test
[info] Connection state: Starting
[info] Starting server from LocalProcess extension host
[info] Connection state: Running
[info] Waiting for server to respond to `initialize` request...
[info] Waiting for server to respond to `initialize` request...
[info] Waiting for server to respond to `initialize` request...
[info] Waiting for server to respond to `initialize` request...

Logs for mcp-access-point

DEBUG pingora_core::services::listening] new event!
DEBUG pingora_core::protocols::http::v1::server] Client prematurely closed connection with 0 byte sent
DEBUG pingora_core::protocols::l4::stream] Dropping socket Some(BufStream { inner: BufReader { reader: BufWriter { writer: RawStreamWrapper { stream: Tcp(PollEvented { io: Some(TcpStream { addr: 172.17.0.2:8080, peer: 192.168.65.1:54506, fd: 15 }) }), rx_ts: None, enable_rx_ts: false, reusable_cmsg_space: [] }, buffer: 0/1460, written: 0 }, buffer: 0/65536 } })
DEBUG pingora_core::services::listening] new event!
DEBUG pingora_proxy] Successfully get a new request
DEBUG access_point::proxy::route] match request: host=Some("localhost"), uri="/api/test/sse", method="POST"
DEBUG access_point::service::mcp] ctx.route_params: None
WARN  access_point::service::mcp] Route(/api/test/sse) not found
DEBUG access_point::utils::request] match_api_path: /api/test/sse
DEBUG access_point::service::mcp] Request path: Some(/api/test/sse)
DEBUG access_point::utils::request] match_api_path: /api/test/sse
DEBUG access_point::service::mcp] SSE path: "/api/test/sse"
DEBUG access_point::service::mcp] tenant_id: test
DEBUG pingora_core::services::listening] new event!
DEBUG pingora_proxy] Successfully get a new request
DEBUG access_point::proxy::route] match request: host=Some("localhost"), uri="/api/test/sse", method="GET"
DEBUG access_point::service::mcp] ctx.route_params: None
WARN  access_point::service::mcp] Route(/api/test/sse) not found
DEBUG access_point::utils::request] match_api_path: /api/test/sse
DEBUG access_point::service::mcp] Request path: Some(/api/test/sse)
DEBUG access_point::utils::request] match_api_path: /api/test/sse
DEBUG access_point::service::mcp] SSE path: "/api/test/sse"
DEBUG access_point::service::mcp] tenant_id: test
sxhxliang commented 4 weeks ago

What MCP client and version are you using?

dhruv-bansal commented 4 weeks ago

I’m currently using VS Code and a mcp.config file for testing purposes as my MCP client. As far as I know, I’m not relying on any specific MCP-related extensions inside VS Code. Both client and mcp-server config as quoted above.

Let me explain my use case for better context:

This is the core of my use case and what I’m trying to achieve.

However, I’m currently unable to see the tools listed after setting this up — and I'm unsure if the issue lies in my configuration, understanding, or the way I'm testing with VS Code.

sxhxliang commented 4 weeks ago

I tested MCP Inspector and Cursor Desktop, both work fine. Have you tried these two clients? btw, I'll test VS Code and reply later.

sxhxliang commented 3 weeks ago

Thanks for reporting this. I've been able to reproduce the issue you described. This was a bug in VS Code. Refer to the discussion of the following issues microsoft/vscode#248949 microsoft/vscode#246753 modelcontextprotocol/python-sdk#530

dhruv-bansal commented 3 weeks ago

Thanks for the input @sxhxliang End to end flow starts working atleast for the GET APIs. I am facing other problem for which I will be opening other issues.