-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Problem
The Language Support Tester workflow cannot test Go, TypeScript/JavaScript, and Python language support using the Serena MCP server because of a fundamental incompatibility between Serena's session requirements and the HTTP gateway architecture.
Root Cause
Serena MCP Server is a stdio-based MCP server that requires:
- Persistent, streaming connections where initialization and tool calls happen on the same connection
- Session state maintained throughout the connection lifecycle
- The initialization handshake must be completed before tool calls can be made
The HTTP Gateway provides:
- Stateless HTTP requests where each request is independent
- No persistent connection to maintain session state
- Each HTTP POST is treated as a separate session by Serena
Error Observed
When attempting to call Serena tools through the HTTP gateway:
{
"jsonrpc": "2.0",
"id": 2,
"error": {
"code": 0,
"message": "method \"tools/list\" is invalid during session initialization"
}
}This occurs because:
- The
initializerequest completes successfully in one HTTP request - Subsequent
tools/callrequests are sent as separate HTTP requests - Serena treats each new HTTP request as a new session that hasn't completed initialization
Impact
Language support testing is blocked for:
- ❌ Go language analysis (symbol finding, definitions, refactoring)
- ❌ TypeScript/JavaScript language analysis
- ❌ Python language analysis
Documentation
This limitation is documented in:
test/serena-mcp-tests/GATEWAY_TEST_FINDINGS.md- Comprehensive analysis of the behavioral differencestest/serena-mcp-tests/README.md- Test suite documentation mentioning stdio vs HTTP differences
Current Workarounds
The existing test scripts work correctly:
- ✅
test/serena-mcp-tests/test_serena.sh- Direct stdio connection tests (15/23 tests pass) - ❌
test/serena-mcp-tests/test_serena_via_gateway.sh- Gateway tests (7/23 tests pass due to this issue)
Possible Solutions
Option 1: Enhance Gateway with Session Persistence
Modify the gateway to:
- Maintain persistent stdio connections to backend servers
- Map multiple HTTP requests from the same session (via Authorization header) to the same backend connection
- Keep the backend connection alive across multiple HTTP requests
Option 2: Use HTTP-Native Serena
- Develop or deploy an HTTP-native version of Serena that doesn't require streaming connections
- HTTP-native servers are designed for stateless HTTP requests
Option 3: Update Workflow to Use Direct stdio
- Modify the Language Support Tester workflow to connect directly to Serena via stdio instead of through the HTTP gateway
- This would bypass the gateway limitation but may not match the production architecture
Recommendation
Option 1 (Gateway Enhancement) is recommended because:
- It maintains the gateway architecture
- It allows stdio-based MCP servers to work through HTTP proxying
- It doesn't require changes to existing MCP servers like Serena
- It would benefit other stdio-based MCP servers
References
- MCP Protocol: https://github.com/modelcontextprotocol
- Gateway Config:
config.toml(Serena server on line 22-27) - Test Findings:
test/serena-mcp-tests/GATEWAY_TEST_FINDINGS.md
Generated by Language Support Tester
- expires on Feb 24, 2026, 2:08 PM UTC
Reactions are currently unavailable