Skip to content

Switch Serena MCP server from Docker to uvx with HTTP transport#9788

Closed
Copilot wants to merge 8 commits intomainfrom
copilot/update-mcp-server-configuration-again
Closed

Switch Serena MCP server from Docker to uvx with HTTP transport#9788
Copilot wants to merge 8 commits intomainfrom
copilot/update-mcp-server-configuration-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 13, 2026

Serena now runs as an HTTP MCP server started via uvx in the agent job, replacing the previous Docker container approach. This enables language runtimes to be installed on the host system where Serena's language servers can access them.

Changes

MCP Configuration

  • Replaced Docker container config with HTTP endpoint at http://localhost:9121
  • Changed type from stdio to http in Copilot format
  • Removed container, entrypoint, args, and mounts fields

Runtime Detection

  • Added automatic detection of language requirements from Serena configuration
  • Maps Serena languages to runtime IDs: go, typescript→node, python, java, ruby, haskell, elixir, rust
  • Supports both short syntax (["go", "typescript"]) and long syntax with versions
  • Automatically includes uv runtime when Serena is present

Server Startup

  • Generates "Start Serena MCP HTTP Server" step in agent job
  • Launches via uvx --from git+https://github.com/oraios/serena serena start-mcp-server --transport streamable-http --port 9121
  • Passes custom args from workflow config (e.g., --verbose)
  • Includes 30-second health check with /health endpoint

MCP Gateway Converter Scripts (all three engines)

  • Copilot: Converts stdiolocal type for containerized servers, preserves http type for HTTP-based servers
  • Claude: Properly preserves direct HTTP server URLs (like Serena on localhost)
  • Codex: Fixed URL construction to preserve direct HTTP server URLs instead of always rewriting to gateway format
  • All converters: Only rewrite URLs with /mcp/ prefix (gateway-proxied servers)
  • Direct HTTP servers (Serena on http://localhost:9121) pass through unchanged in all engines

Example

Before (Docker):

tools:
  serena: ["go", "typescript"]

Generated container config with language servers bundled inside Docker image.

After (uvx + HTTP):

tools:
  serena: ["go", "typescript"]

Generates:

  • Runtime setup steps for Go and Node.js
  • Server startup: uvx --from git+https://github.com/oraios/serena serena start-mcp-server --transport streamable-http --port 9121
  • MCP config: {"serena": {"type": "http", "url": "http://localhost:9121"}}
  • Proper type conversion and URL preservation in all engine converters (Copilot, Claude, Codex)
Original prompt

Update the serena MCP server configuration to start a MCP http server in the agent job instead of docker

  • use uvx based start with http transport

uvx --from git+https://github.com/oraios/serena
serena start-mcp-server
--transport streamable-http
--port 9121

  • make sure uvx is setup with runtime manager
  • collect all required runtime dependencies based on the Serena selected languages and register them with the runtime manager
  • update http url in the MCP configuration

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


Changeset

  • Type: patch
  • Description: Switch Serena MCP server from Docker to uvx-based HTTP server; update generated MCP config to use http transport, add automatic runtime detection for Serena-selected languages, and start the MCP HTTP server via uvx with a health check.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

Copilot AI and others added 2 commits January 13, 2026 02:55
- Modified MCP config rendering to use HTTP URL (http://localhost:9121)
- Added runtime dependency detection for Serena languages
- Created language-to-runtime mapping for supported languages
- Added uvx startup step with HTTP server
- Updated tests to reflect HTTP-based configuration
- All Serena tests passing

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update serena MCP server configuration for HTTP server Switch Serena MCP server from Docker to uvx with HTTP transport Jan 13, 2026
Copilot AI requested a review from pelikhan January 13, 2026 03:03
@pelikhan pelikhan added the smoke label Jan 13, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@pelikhan
Copy link
Contributor

Update the script that generates the serena configuration for the MCP gateway

https://github.com/githubnext/gh-aw/actions/runs/20943158610/job/60180699502#step:25:1

@pelikhan
Copy link
Contributor

@copilot merge main, format, lint

@pelikhan
Copy link
Contributor

@copilot Update the script that generates the serena configuration for the MCP gateway

https://github.com/githubnext/gh-aw/actions/runs/20943158610/job/60180699502#step:25:1

Copilot AI and others added 3 commits January 13, 2026 06:48
The converter script now properly converts type: "stdio" to type: "local"
for Copilot CLI compatibility. HTTP servers remain unchanged as type: "http".

This fixes the Serena configuration for Copilot where Serena MCP server
runs with HTTP transport and should keep type: "http" in the output.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…rver-configuration-again

# Conflicts:
#	.github/workflows/cloclo.lock.yml
#	.github/workflows/mcp-inspector.lock.yml
#	.github/workflows/q.lock.yml
#	actions/setup/sh/convert_gateway_config_copilot.sh
- Merged main branch with conflict resolution
- Combined stdio-to-local conversion with URL rewriting in converter
- Recompiled all 119 workflows successfully

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 13, 2026

Update the script that generates the serena configuration for the MCP gateway

...

Updated the Copilot converter script to properly convert stdio to local type while preserving http type for HTTP-based servers like Serena. The fix is in commit ba137a9.

@copilot merge main, format, lint

Completed:

  • ✅ Merged main branch (commit c4e0c0d)
  • ✅ Formatted code with make fmt
  • ✅ Linted code with make lint - all checks passed
  • ✅ Recompiled all 119 workflows successfully (commit ba137a9)

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

Smoke Test Results (Run #20947684282)

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP: Fetched recent PRs
  • ❌ serena-go: Tool not available
  • ⚠️ Playwright: Navigation succeeded, title verification incomplete
  • ✅ File Writing: Created test file successfully
  • ✅ Bash Tool: Verified file content

Overall Status: PARTIAL PASS (4/5 tests passed, serena-go unavailable)

cc @pelikhan

AI generated by Smoke Copilot

Updated all three MCP gateway converters (Copilot, Claude, Codex) to properly
handle direct HTTP servers like Serena:

- Copilot: Added clearer comments about URL rewriting logic
- Claude: Added comments clarifying gateway-proxied vs direct HTTP servers
- Codex: Fixed URL construction to preserve original URL for direct HTTP servers
  (previously always rewrote URLs to gateway format)

The regex pattern ^http://[^/]+/mcp/ only matches gateway-proxied URLs, so
Serena's http://localhost:9121 passes through unchanged. Codex converter now
uses conditional logic instead of always constructing gateway URLs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 13, 2026

@copilot Update the script that generates the serena configuration for the MCP gateway

https://github.com/githubnext/gh-aw/actions/runs/20943158610/job/60180699502#step:25:1

Fixed all three gateway converter scripts (Copilot, Claude, Codex) to properly preserve Serena's direct HTTP URL (http://localhost:9121).

The key fix was in the Codex converter which was always rewriting URLs to the gateway format. Now all converters only rewrite URLs with /mcp/ prefix (gateway-proxied servers), while direct HTTP servers like Serena pass through unchanged.

Changes in commit a332056.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@pelikhan pelikhan added smoke and removed smoke labels Jan 13, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

Smoke Test Results for Copilot Engine

Recent PRs:

  • [WIP] Add integration test for agentic workflow
  • Fix safe output execution order

Test Results:
✅ GitHub MCP - Retrieved merged PRs
✅ Bash Tool - File creation verified
✅ Playwright - Navigated to GitHub
✅ File Writing - Test file created successfully

Overall: PASS

cc @pelikhan

AI generated by Smoke Copilot

@pelikhan pelikhan closed this Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants