Skip to content

Latest commit

 

History

History
140 lines (95 loc) · 3.01 KB

File metadata and controls

140 lines (95 loc) · 3.01 KB

SSE and HTTP Transport Setup

The stdio transport has a ~14 second timeout in Augment, which causes issues with large code comparisons. There are now two HTTP-facing options:

  • Native Rust HTTP server: best for Codex streamable HTTP and also supports legacy SSE endpoints.
  • Python SSE bridge: still usable if you specifically want to wrap the stdio binary.

Setup

Option A: Native Rust HTTP Server

Build the server:

cargo build --release -p smart-diff-mcp-server

Start the HTTP server:

./target/release/smart-diff-mcp-http

The server starts on http://127.0.0.1:8011 by default and exposes:

  • Streamable HTTP MCP: http://127.0.0.1:8011/mcp
  • SSE endpoint: http://127.0.0.1:8011/sse
  • Legacy message endpoint: http://127.0.0.1:8011/message
  • Health check: http://127.0.0.1:8011/health

Option B: Python SSE Bridge

The SSE bridge requires Python 3 and aiohttp:

cd crates/mcp-server
pipenv install aiohttp

Start the SSE bridge:

cd crates/mcp-server
PIPENV_IGNORE_VIRTUALENVS=1 pipenv run python sse_bridge.py --binary ../../target/release/smart-diff-mcp --port 8011

Or use the provided start script:

./crates/mcp-server/start_sse_bridge.sh

3. Configure MCP Clients

Augment

Update your Augment MCP configuration at ~/.config/Code/User/globalStorage/augment.vscode-augment/augment-global-state/mcpServers.json.

Change the smart-diff entry from:

{
  "type": "stdio",
  "name": "smart-diff",
  "command": "/home/matteius/codediff/target/release/smart-diff-mcp",
  "arguments": "",
  "useShellInterpolation": true,
  "id": "8dde13fe-cff7-424e-b3ae-677fb08bedd3",
  "tools": [],
  "disabled": false
}

To:

{
  "type": "sse",
  "name": "smart-diff",
  "url": "http://127.0.0.1:8011/sse",
  "id": "8dde13fe-cff7-424e-b3ae-677fb08bedd3",
  "tools": [],
  "disabled": false
}

Codex

Update ~/.codex/config.toml:

[mcp_servers.smart-diff]
url = "http://127.0.0.1:8011/mcp"

If you already use http://127.0.0.1:8011/sse, the native HTTP server accepts JSON-RPC POST requests on that path as a compatibility fallback.

4. Restart the Client

Restart VS Code, Codex, or whichever client is connecting so it reloads the MCP config.

Benefits

  • ✅ No timeout limitations - comparisons can take as long as needed
  • ✅ Better for large codebases (thousands of functions)
  • ✅ Same functionality as stdio transport
  • ✅ Native Rust HTTP endpoint for Codex at /mcp
  • ✅ Easy to debug (HTTP logs)

Troubleshooting

Check if the bridge is running

curl http://127.0.0.1:8011/health

Should return: {"status": "healthy"}

View bridge logs

The bridge outputs logs to stdout showing all requests and responses.

Test the SSE endpoint

curl http://127.0.0.1:8011/sse

Should stream SSE events.

Port already in use

If port 8011 is already in use, specify a different port:

pipenv run python sse_bridge.py --port 8012

And update the URL in Augment's config accordingly.