Skip to content

feat(serve): add Streamable HTTP transport to MCP server #1143

Description

@safishamsi

Summary

The graphify MCP server (graphify/serve.py) currently runs stdio-only, designed for per-developer IDE sessions. This blocks team/CI deployment scenarios where a single server hosts the graph for the whole team.

Use case

Run graphify serve as a centralized HTTP service in CI or on a shared host after graph generation, so every team member can point their IDE at one URL without running graphify locally.

What needs building

  1. HTTP transport layer using the MCP Streamable HTTP spec (2025-03-26) via mcp.server.fastmcp or starlette/uvicorn alongside the existing stdio path
  2. CLI flagpython -m graphify.serve graphify-out/graph.json --transport http --host 0.0.0.0 --port 8080
  3. Auth middleware — optional --api-key <key> header check for simple deployments; OAuth as a follow-up
  4. Docker image — so CI can publish the graph as a service after graphify extract

Expected interface

# stdio (current, unchanged)
python -m graphify.serve graphify-out/graph.json

# new: streamable HTTP
python -m graphify.serve graphify-out/graph.json --transport http --port 8080 --api-key $SECRET

# Docker
docker run -p 8080:8080 -v $(pwd)/graphify-out:/data graphify serve /data/graph.json --transport http

Team members then configure their IDE MCP client to point at http://shared-host:8080 instead of spawning a local process.

Notes

PR welcome

A PR adding --transport http to graphify.serve would be very welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions