-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededmcpMCP protocolMCP protocoltestingTests and CITests and CI
Description
The current test suite covers the underlying logic (search, graph, triples etc.) but does not test the MCP server layer (`src/neurostack/server.py`) end-to-end. This means a bug in how a tool marshals its arguments or formats its JSON response could go undetected.
Add an integration test that:
- Spins up the MCP server against a test fixture vault
- Calls at least `vault_search`, `vault_stats`, and `vault_prediction_errors` via the MCP tool interface
- Asserts the response structure is correct (keys present, types correct)
Where to look:
- `tests/` — existing test structure and fixtures
- `src/neurostack/server.py` — the MCP tool definitions
- Look at how existing tests set up the database/vault fixture and replicate that pattern
Notes:
- You don't need to test over the network — the MCP tools are regular Python functions decorated with `@mcp.tool()`. You can call them directly in tests after importing from `server.py`, bypassing the stdio transport.
- Check whether there is already a fixture vault in `tests/` or `vault-template/` you can reuse.
Acceptance criteria:
- At least one integration test file under `tests/` that imports and calls MCP tool functions directly
- Tests cover `vault_search`, `vault_stats`, and `vault_prediction_errors`
- Each test asserts response is valid JSON and contains expected top-level keys
- Tests pass in CI (`pytest tests/`)
- No new external dependencies introduced
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededmcpMCP protocolMCP protocoltestingTests and CITests and CI