Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ dev = [
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
# Integration tests spin up real external MCP servers (e.g. `uvx
# mcp-server-sqlite`) and are deselected by default so the standard test run
# stays hermetic and green. Run them explicitly with `pytest -m integration`.
addopts = "-m 'not integration'"
markers = [
"integration: end-to-end tests requiring external MCP servers",
]
Expand Down
2 changes: 1 addition & 1 deletion server_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"mcpServers": {
"sqlite": {
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "test.db"]
"args": ["--with", "mcp<2", "mcp-server-sqlite", "--db-path", "test.db"]
},
"echo": {
"command": "uvx",
Expand Down
11 changes: 9 additions & 2 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ async def tool_manager_sqlite(tmp_path):
initialization_timeout=30.0,
)
ok = await tm.initialize()
if not ok:
pytest.skip("Could not initialize sqlite server (not available)")
# ToolManager.initialize() can report success even when the external server
# failed to start (e.g. `uvx mcp-server-sqlite` is unavailable or resolves a
# version incompatible with the installed MCP SDK), leaving zero tools
# discovered. Skip rather than fail so a broken/missing external server can
# never turn a hermetic run red.
tools = await tm.get_unique_tools() if ok else []
if not ok or not tools:
await tm.close()
pytest.skip("sqlite MCP server unavailable (no tools discovered)")
try:
yield tm
finally:
Expand Down