-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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.ymlthat only runs thegraphium-mcpservice. - The service should:
- build from the existing
mcp_server/Dockerfile - mount the repo (
..:/workspace:delegated) - point
NEO4J_URIatbolt://host.docker.internal:7687 - expose
8000for FastMCP HTTP - leave
--transport streamable-httpas the default command.
- build from the existing
- Add
- Smoke script
- Create
scripts/run_mcp_smoke.shthat:- spins up the compose file (
docker compose -f mcp_server/docker-compose.testing.yml up --build -d) - polls
http://localhost:8000/healthzuntil it returnsstatus=ok - hits
http://localhost:8000/mcpwith a minimal MCP request (curl or small Python snippet) and fails if the response containsGraphium client not initialized - tears down the stack (
docker compose … down -v) even on failure.
- spins up the compose file (
- Make the script return non-zero if any check fails so we can wire it into CI later.
- Create
- Optional helper test
- Add
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).
- Add
- Documentation
- Update
docs/testing.mdwith a “MCP smoke harness” section explaining prerequisites (local Neo4j,fastapiinstall), how to run the script, and how to interpret failures.
- Update
Success Criteria
- Running
scripts/run_mcp_smoke.shon 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.
Metadata
Metadata
Assignees
Labels
No labels