Motivation
Streamable HTTP previously failed with Graphium client not initialized. We fixed the root cause, but we still lack an automated way to validate the MCP server end-to-end. Setting up a repeatable local harness will let us catch regressions before they land and gives CI a ready-made path once we’re ready to automate it.
Proposal
- Docker compose for testing
- Add
mcp_server/docker-compose.testing.yml that only runs the graphium-mcp service.
- The service should:
- build from the existing
mcp_server/Dockerfile
- mount the repo (
..:/workspace:delegated)
- point
NEO4J_URI at bolt://host.docker.internal:7687
- expose
8000 for FastMCP HTTP
- leave
--transport streamable-http as the default command.
- Smoke script
- Create
scripts/run_mcp_smoke.sh that:
- spins up the compose file (
docker compose -f mcp_server/docker-compose.testing.yml up --build -d)
- polls
http://localhost:8000/healthz until it returns status=ok
- hits
http://localhost:8000/mcp with a minimal MCP request (curl or small Python snippet) and fails if the response contains Graphium client not initialized
- tears down the stack (
docker compose … down -v) even on failure.
- Make the script return non-zero if any check fails so we can wire it into CI later.
- Optional helper test
- Add
mcp_server/tests/test_streamable_http.py that exercises the same MCP POST logic. This gives a reusable probe we can call from the shell script (e.g. uv run pytest mcp_server/tests/test_streamable_http.py).
- Documentation
- Update
docs/testing.md with a “MCP smoke harness” section explaining prerequisites (local Neo4j, fastapi install), how to run the script, and how to interpret failures.
Success Criteria
- Running
scripts/run_mcp_smoke.sh on a machine with Neo4j running locally exits 0 and prints a summary.
- The script fails fast (non-zero) if health check never returns ok, the MCP POST returns an error, or docker compose fails.
- Documentation mirrors the exact command names/paths.
Follow-ups (not in scope here)
- Add the script to CI once the local workflow proves reliable.
- Extend the harness to spin up a throwaway Neo4j when we don’t have one pre-existing.
Motivation
Streamable HTTP previously failed with
Graphium client not initialized. We fixed the root cause, but we still lack an automated way to validate the MCP server end-to-end. Setting up a repeatable local harness will let us catch regressions before they land and gives CI a ready-made path once we’re ready to automate it.Proposal
mcp_server/docker-compose.testing.ymlthat only runs thegraphium-mcpservice.mcp_server/Dockerfile..:/workspace:delegated)NEO4J_URIatbolt://host.docker.internal:76878000for FastMCP HTTP--transport streamable-httpas the default command.scripts/run_mcp_smoke.shthat:docker compose -f mcp_server/docker-compose.testing.yml up --build -d)http://localhost:8000/healthzuntil it returnsstatus=okhttp://localhost:8000/mcpwith a minimal MCP request (curl or small Python snippet) and fails if the response containsGraphium client not initializeddocker compose … down -v) even on failure.mcp_server/tests/test_streamable_http.pythat exercises the same MCP POST logic. This gives a reusable probe we can call from the shell script (e.g.uv run pytest mcp_server/tests/test_streamable_http.py).docs/testing.mdwith a “MCP smoke harness” section explaining prerequisites (local Neo4j,fastapiinstall), how to run the script, and how to interpret failures.Success Criteria
scripts/run_mcp_smoke.shon a machine with Neo4j running locally exits 0 and prints a summary.Follow-ups (not in scope here)