HTTP transport mode returns "Invalid session ID" for all MCP requests #12

Closed
opened 2025-07-13 16:57:09 -05:00 by b3nw · 0 comments
Owner

Description

When using HTTP transport mode (-t http), all MCP tool calls return "Invalid session ID" instead of executing operations. This affects both individual HTTP mode and the HTTP endpoint in network mode.

Environment

  • Version: v0.3.0 (confirmed in clean checkout)
  • mcp-go version: v0.30.0
  • Affected: http, network (HTTP endpoint)
  • Working: stdio, sse, network (SSE endpoint)

Steps to Reproduce

  1. Start server: gitea-mcp -t http --host https://gitea.ext.ben.io --token <token> --port 8080
  2. Send request: curl -X POST http://localhost:8080/mcp -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"list_my_repos","arguments":{"page":1,"pageSize":2}},"id":1}'

Expected vs Actual

  • Expected: JSON response with repository data
  • Actual: Plain text "Invalid session ID"

Working Comparison

Same request works perfectly in stdio mode returning full JSON with repository data.

Technical Details

  • Server starts successfully on specified port
  • Returns HTTP 202 status but with "Invalid session ID" text
  • Issue exists in clean v0.3.0 (not caused by recent changes)

Impact

  • HTTP transport unusable for MCP operations
  • Blocks HTTP-based client integrations
  • Network mode HTTP endpoint affected

Investigation Areas

  1. Session management requirements for HTTP mode
  2. Request routing differences between transport modes
  3. mcp-go framework HTTP-specific configuration
  4. Content-Type handling requirements

Priority

Medium - HTTP functionality broken but stdio/SSE workarounds available

## Description When using HTTP transport mode (-t http), all MCP tool calls return "Invalid session ID" instead of executing operations. This affects both individual HTTP mode and the HTTP endpoint in network mode. ## Environment - Version: v0.3.0 (confirmed in clean checkout) - mcp-go version: v0.30.0 - Affected: http, network (HTTP endpoint) - Working: stdio, sse, network (SSE endpoint) ## Steps to Reproduce 1. Start server: `gitea-mcp -t http --host https://gitea.ext.ben.io --token <token> --port 8080` 2. Send request: `curl -X POST http://localhost:8080/mcp -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"list_my_repos","arguments":{"page":1,"pageSize":2}},"id":1}'` ## Expected vs Actual - Expected: JSON response with repository data - Actual: Plain text "Invalid session ID" ## Working Comparison Same request works perfectly in stdio mode returning full JSON with repository data. ## Technical Details - Server starts successfully on specified port - Returns HTTP 202 status but with "Invalid session ID" text - Issue exists in clean v0.3.0 (not caused by recent changes) ## Impact - HTTP transport unusable for MCP operations - Blocks HTTP-based client integrations - Network mode HTTP endpoint affected ## Investigation Areas 1. Session management requirements for HTTP mode 2. Request routing differences between transport modes 3. mcp-go framework HTTP-specific configuration 4. Content-Type handling requirements ## Priority Medium - HTTP functionality broken but stdio/SSE workarounds available
b3nw closed this issue 2025-07-13 20:09:39 -05:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: b3nw/gitea-mcp#12