Skip to content

Add HTTP MCP server support for pre-launched backends#161

Merged
lpcox merged 6 commits into
mainfrom
copilot/fix-mcp-server-routing
Jan 11, 2026
Merged

Add HTTP MCP server support for pre-launched backends#161
lpcox merged 6 commits into
mainfrom
copilot/fix-mcp-server-routing

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 11, 2026

Gateway now routes to already-running HTTP MCP servers. Previously, only stdio servers launched via Docker were supported.

Implementation

Config: Added type: "http" server configuration with url and headers fields. Environment variable expansion supported in header values.

Connection: HTTP backends proxy JSON-RPC requests with configured headers. Uses reusable HTTP client with connection pooling and atomic request ID generation.

Launcher: HTTP backends skip process launch, storing only connection metadata.

Configuration Example

{
  "mcpServers": {
    "safeinputs": {
      "type": "http",
      "url": "http://host.docker.internal:3000/",
      "headers": {
        "Authorization": "${SAFEINPUTS_AUTH_TOKEN}"
      }
    }
  }
}

Requests to /mcp/safeinputs forward to the HTTP backend with the configured Authorization header. Stdio and HTTP backends can be configured simultaneously.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Jan 11, 2026
Copilot AI and others added 5 commits January 11, 2026 18:31
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix routing for mcp server on configuration update Add HTTP MCP server support for pre-launched backends Jan 11, 2026
Copilot AI requested a review from lpcox January 11, 2026 18:45
@lpcox lpcox marked this pull request as ready for review January 11, 2026 19:52
@lpcox lpcox merged commit 001d4aa into main Jan 11, 2026
3 checks passed
@lpcox lpcox deleted the copilot/fix-mcp-server-routing branch January 11, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants