MCP Tool Discovery
Benchmarked against: Anthropic — Tool Search Architecture: MCP (Model Context Protocol) server registry Scope: How agents find, select, and connect to available tools
SuperPortia agents discover tools through MCP servers. Each server exposes a set of tools, and agents connect to the servers they need based on their role and task.
Discovery model
MCP server inventory
| Server | Tool count | Purpose | Available on |
|---|---|---|---|
| Cloud UB (ss3-cloud-ub) | ~25 | Knowledge management, WO system, messaging | All ships |
| Local UBI (ubi) | ~20 | Local file ops, search, ingestion, dispatch | SS1 |
| Cloudflare | ~2 | Workers, D1, R2, Vectorize management | All ships |
| Supabase | ~20 | Database, edge functions, migrations | All ships |
| Chrome (Claude in Chrome) | ~15 | Browser automation, screenshots | Ships with Chrome |
| Memory (knowledge graph) | ~8 | Personal memory graph | Per agent |
| Filesystem | ~10 | File read/write/search | Per ship |
| Sequential Thinking | 1 | Structured reasoning | All ships |
| Brave Search | 2 | Web search, local search | All ships |
| Claude Preview | ~15 | Dev server preview and testing | SS1 |
Configuration
MCP servers are configured in the Claude Code settings:
CLI configuration
{
"mcpServers": {
"ss3-cloud-ub": {
"command": "npx",
"args": ["-y", "superportia-cloud-ub-mcp"],
"env": {
"SP_CLOUD_UB_URL": "https://ub.superportia.dev",
"SP_API_KEY": "..."
}
},
"ubi": {
"command": "python",
"args": ["-m", "ub.mcp_server"],
"env": {
"SP_SHIP_ID": "SS1",
"SP_AGENT_ID": "mac-cli"
}
}
}
}
Desktop App configuration
The Claude Desktop App uses claude_desktop_config.json with the same server definitions.
Tool selection by role
Not every agent needs every tool. Role-based tool assignment reduces token cost (tool descriptions alone cost ~4,103 tokens for 35 tools):
| Role | Required servers | Tool count |
|---|---|---|
| Chief Engineer (小克) | All servers | ~80+ |
| Strategist (小西) | Cloud UB, Memory | ~35 |
| Executor (小A) | Cloud UB, Cloudflare, Supabase | ~45 |
| Dispatch Worker | Cloud UB, Local UBI | ~40 |
Tool discovery at runtime
When an agent starts a session, it receives the full tool list from all connected MCP servers. The tool list includes:
| Field | Purpose |
|---|---|
name | Tool identifier (e.g., search_brain) |
description | What the tool does |
parameters | JSON Schema for inputs |
required | Which parameters are mandatory |
Token cost of tools
Each tool description consumes tokens in the context window:
| Server | Approx. tokens for descriptions |
|---|---|
| Cloud UB (25 tools) | ~3,000 |
| Local UBI (20 tools) | ~2,500 |
| Chrome (15 tools) | ~2,000 |
| All servers combined | ~12,000+ |
This is why role-based tool assignment matters — unnecessary tools waste context.
Finding the right tool
| Task | Tool | Server |
|---|---|---|
| Search knowledge | search_brain | Cloud UB |
| Add knowledge | ingest_fragment | Cloud UB or Local UBI |
| Create work order | create_work_order | Cloud UB |
| Edit a file | ubi_edit_file | Local UBI |
| Run shell command | ubi_run_command | Local UBI |
| Execute SQL | execute_sql | Supabase |
| Browse web | computer (screenshot + click) | Chrome |
| Web search | brave_web_search | Brave Search |
| Structured reasoning | sequentialthinking | Sequential Thinking |
Server health verification
# Check Cloud UB health
cloud_ub_health()
# Check SRE status (all services)
sre_status()
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Tool not found | MCP server not connected | Check config, restart server |
| Connection refused | Server process crashed | Restart MCP server |
| Timeout | Server overloaded | Check sre_status(), retry |
| Auth error | Invalid API key | Verify env vars |
| Tools from wrong ship | Config mismatch | Check SP_SHIP_ID |
Related pages
| Page | Relationship |
|---|---|
| Engine-based Routing | How tools route to engines |
| MCP Tools Overview | Tool catalog |
| Setup MCP | Initial configuration |