-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Describe the bug
The OpenAPI MCP Server fails to establish STDIO connections with MCP Inspector and Cline, resulting in timeout errors (MCP error -32000: Connection closed).
However, the server responds correctly to MCP protocol messages when tested directly via CLI.
Expected Behavior
MCP server to connect to MCP Inspector and Cline
Current Behavior
MCP error -32000: Connection closed
Reproduction Steps
Test 1: MCP Inspector Connection (FAILS)
- Create Inspector configuration:
{
"mcpServers": {
"petstore-test": {
"disabled": false,
"timeout": 120,
"type": "stdio",
"command": "uvx",
"args": ["awslabs.openapi-mcp-server@latest"],
"env": {
"API_NAME": "petstore",
"API_BASE_URL": "https://petstore3.swagger.io/api/v3",
"API_SPEC_URL": "https://petstore3.swagger.io/api/v3/openapi.json",
"LOG_LEVEL": "DEBUG",
"ENABLE_PROMETHEUS": "false",
"ENABLE_OPERATION_PROMPTS": "true"
}
}
}
}-
Run:
npx @modelcontextprotocol/inspector petstore-test-config.json -
Result: Connection times out with error code -32001
- Inspector logs show multiple "New STDIO connection request" messages
- No successful MCP initialize handshake
- Timeout after 60-120 seconds
Test 2: Cline Integration (FAILS)
- Add server to Cline MCP settings:
{
"mcpServers": {
"petstore-test": {
"command": "uvx",
"args": ["awslabs.openapi-mcp-server@latest"],
"timeout": 120,
"env": {
"API_NAME": "petstore",
"API_BASE_URL": "https://petstore3.swagger.io/api/v3",
"API_SPEC_URL": "https://petstore3.swagger.io/api/v3/openapi.json",
"LOG_LEVEL": "DEBUG"
}
}
}
}-
Restart VSCode to activate server
-
Result: Same timeout behavior as Inspector
- Server appears to start but connection fails
- No tools become available to Cline
Test 3: Direct CLI Test (SUCCEEDS)
- Run server with direct MCP protocol message:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0.0"}}}' | \
uvx awslabs.openapi-mcp-server@latest \
--api-name petstore \
--api-url https://petstore3.swagger.io/api/v3 \
--spec-url https://petstore3.swagger.io/api/v3/openapi.json \
--log-level ERROR- Result: SUCCESS ✅
- Server responds in <2 seconds
- Valid JSON-RPC response received:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2024-11-05",
"capabilities": {
"tools": {},
"resources": {}
},
"serverInfo": {
"name": "petstore",
"version": "0.2.5"
}
}
}Possible Solution
Investigated SSE/HTTP transport as potential workaround:
awslabs.openapi-mcp-serverv0.2.5 ONLY supports STDIO transport
Additional Information/Context
- OS: Ubuntu 24.04.3 LTS
- Python: via
uvx - Package Version:
awslabs.openapi-mcp-server@latest(0.2.5) - MCP Inspector: Latest version
- Cline: Latest version (VSCode extension)
OS
Ubuntu 24.04.3 LTS
Server
openapi-mcp-server
Server Version
0.2.5
Other information
Are there known compatibility issues with MCP Inspector or Cline STDIO transport?
Are there specific STDIO configuration requirements we might be missing?
Service quota
- I have reviewed the service quotas for this construct
Metadata
Metadata
Assignees
Labels
Type
Projects
Status