Skip to content

Commit 3a58908

Browse files
docs(adding-mcp-hosts): add test_adapter_protocol.py to fixture guide
The skill's Step 5 only covered data-driven fixtures (canonical_configs.json and host_registry.py), missing the static ALL_ADAPTERS and HOST_ADAPTER_MAP lists in test_adapter_protocol.py. Without this section, new hosts pass all tests while silently lacking AP-01…AP-06 protocol compliance coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9d7f0e5 commit 3a58908

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.claude/skills/adding-mcp-hosts/references/testing-fixtures.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,33 @@ Minimal example (modeled on the `lmstudio` entry, which uses `CLAUDE_FIELDS`):
2727

2828
For hosts with extra fields, add them alongside the universals (see `gemini` or `codex` entries for examples with `httpUrl`, `timeout`, `includeTools`, `cwd`, etc.).
2929

30-
## 2. host_registry.py entries
30+
## 2. test_adapter_protocol.py entries
31+
32+
`tests/unit/mcp/test_adapter_protocol.py` has two **static** lists that are NOT auto-updated by the data-driven infrastructure. Both must be updated manually:
33+
34+
**`ALL_ADAPTERS`** -- append the new adapter class:
35+
36+
```python
37+
ALL_ADAPTERS = [
38+
# ... existing entries ...
39+
NewHostAdapter,
40+
]
41+
```
42+
43+
**`HOST_ADAPTER_MAP`** -- add the `MCPHostType → adapter class` mapping:
44+
45+
```python
46+
HOST_ADAPTER_MAP = {
47+
# ... existing entries ...
48+
MCPHostType.NEW_HOST: NewHostAdapter,
49+
}
50+
```
51+
52+
Import `NewHostAdapter` and `MCPHostType.NEW_HOST` at the top of the file alongside the existing imports. Missing either entry means the AP-01…AP-06 protocol compliance tests silently skip the new adapter — they pass without covering it.
53+
54+
---
55+
56+
## 3. host_registry.py entries
3157

3258
Make three additions in `tests/test_data/mcp_adapters/host_registry.py`.
3359

0 commit comments

Comments
 (0)