Skip to main content

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

ServerTool countPurposeAvailable on
Cloud UB (ss3-cloud-ub)~25Knowledge management, WO system, messagingAll ships
Local UBI (ubi)~20Local file ops, search, ingestion, dispatchSS1
Cloudflare~2Workers, D1, R2, Vectorize managementAll ships
Supabase~20Database, edge functions, migrationsAll ships
Chrome (Claude in Chrome)~15Browser automation, screenshotsShips with Chrome
Memory (knowledge graph)~8Personal memory graphPer agent
Filesystem~10File read/write/searchPer ship
Sequential Thinking1Structured reasoningAll ships
Brave Search2Web search, local searchAll ships
Claude Preview~15Dev server preview and testingSS1

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):

RoleRequired serversTool count
Chief Engineer (小克)All servers~80+
Strategist (小西)Cloud UB, Memory~35
Executor (小A)Cloud UB, Cloudflare, Supabase~45
Dispatch WorkerCloud 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:

FieldPurpose
nameTool identifier (e.g., search_brain)
descriptionWhat the tool does
parametersJSON Schema for inputs
requiredWhich parameters are mandatory

Token cost of tools

Each tool description consumes tokens in the context window:

ServerApprox. 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

TaskToolServer
Search knowledgesearch_brainCloud UB
Add knowledgeingest_fragmentCloud UB or Local UBI
Create work ordercreate_work_orderCloud UB
Edit a fileubi_edit_fileLocal UBI
Run shell commandubi_run_commandLocal UBI
Execute SQLexecute_sqlSupabase
Browse webcomputer (screenshot + click)Chrome
Web searchbrave_web_searchBrave Search
Structured reasoningsequentialthinkingSequential Thinking

Server health verification

# Check Cloud UB health
cloud_ub_health()

# Check SRE status (all services)
sre_status()

Troubleshooting

SymptomCauseFix
Tool not foundMCP server not connectedCheck config, restart server
Connection refusedServer process crashedRestart MCP server
TimeoutServer overloadedCheck sre_status(), retry
Auth errorInvalid API keyVerify env vars
Tools from wrong shipConfig mismatchCheck SP_SHIP_ID

PageRelationship
Engine-based RoutingHow tools route to engines
MCP Tools OverviewTool catalog
Setup MCPInitial configuration