CCA-F Prep — P5: Custom MCP Server
CCA-F exam project P5 — custom MCP server (hands-on lab).
Implements D4: tool schema design, API key auth, stdio transport.
Build steps (verify each)
- 1. Set up MCP Python SDK → requirements.txt
- 2. Expose 3+ tools with proper schemas → server.py
- 3. Add API key authentication →
MCP_API_KEYenv var - 4. stdio transport (default for Claude Code) — documented HTTP/SSE alternative below
- 5. Connect to Claude and test tool calls → run verification + Claude Code
Install
cd examples\CCA-F-PREP\p5-custom-mcp-server
pip install -r requirements.txt
$env:MCP_API_KEY = "dev-local-key"
python verify_setup.py
Tools exposed
| Tool | Purpose |
|---|---|
health_check |
Server liveness + auth verification |
lookup_ticket |
Support ticket lookup by ID (Scenario 1 drill) |
search_docs |
Knowledge base search (Scenario 4 drill) |
create_escalation |
Escalate ticket with structured reason (D3/D1 drill) |
Transport
| Mode | When to use | How |
|---|---|---|
| stdio | Local Claude Code (default) | .mcp.json command launch — see P4 |
| HTTP/SSE | Shared remote server, team access | Deploy behind HTTPS + bearer token; not needed for local prep |
Exam trap: pick transport based on deployment, not convenience.
Auth
Set MCP_API_KEY in environment. Tools reject calls when key is missing or wrong.
P4 .mcp.json passes ${MCP_API_KEY} to this server.
Connect from Claude Code
Use sibling project p4-claude-code-workflow — its .mcp.json already points here.
cd examples\CCA-F-PREP\p4-claude-code-workflow
$env:MCP_API_KEY = "dev-local-key"
claude
Ask: "Use cca-f-tools to look up ticket TCK-1001"
Tests
python test_server.py
python verify_setup.py