mcp-page-probe
by RionHwang0
README.md
# mcp-page-probe
A local MCP server fixture and a pair of assertions for agent clients that discover tools across multiple pages. The second tool has to be visible and callable.
```sh
pip install mcp-page-probe
mcp-page-probe check
mcp-page-probe check --empty-middle
```
To test an application, configure its normal stdio transport with the command `mcp-page-probe serve --empty-middle`. In the application's test suite, pass its actual discovery and invocation adapters:
```python
from mcp_page_probe import assert_discovery
# list_names() returns the tool names exposed to the agent.
# invoke(name, args) dispatches through the application and returns its text result.
result = await assert_discovery(list_names, invoke)
```
The fixture serves `probe_first`, then optionally an empty list with a continuation cursor, then `probe_later`. The assertions reject absent and duplicate names, invoke the later tool with a unique argument and check its reply. If the application namespaces tools, remove its server prefix in the adapters. The built-in check runs the Python SDK client over a real subprocess. Client discovery behavior is specific to the application adapter.
[Protocol pagination](https://modelcontextprotocol.io/specification/2025-11-25/server/utilities/pagination)
## Exercise two client registries
The [client example](examples/client_registries.py) exercises the Hugging Face Hub MCP client (1.33.0) and LangChain MCP adapters (0.3.2). Both exposed the two names across an empty middle page and returned the expected unique response from the later tool. Run from a source checkout with the fixture installed in a separate environment. The example reads the assertions from the checkout so each client can use its supported SDK version.
```sh
python -m venv fixture-env
fixture-env/bin/pip install .
python -m venv clients-env
clients-env/bin/pip install 'huggingface-hub==1.33.0' 'langchain-mcp-adapters==0.3.2' 'mcp>=1.20,<2'
PYTHONPATH=src clients-env/bin/python examples/client_registries.py "$PWD/fixture-env/bin/mcp-page-probe"
```
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues