Install and Use GBrain MCP in Zoo Code
1. Installation
Open Zoo Code → click ⚙️ → choose Edit Global MCP (for all projects) or Edit Project MCP (saved in .roo/mcp.json).
Paste the following config into the file:
{
"mcpServers": {
"gbrain": {
"type": "streamable-http",
"url": "http://gbrain:7333/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}
Note: If the server uses SSE (legacy), change
"type"to"sse". Trystreamable-httpfirst.
2. Connection check
2a. In the Zoo Code UI
- Click ⚙️ → view the list of MCP servers
- Green dot = connection OK
- Red dot = error → hover to see the message
2b. Test with curl (recommended first)
curl -X POST http://gbrain:7333/mcp \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
- Returns JSON with the tool list → server OK
- Error 401 → wrong token
- Connection refused → server not running or wrong host/port
2c. View detailed logs
Use View → Output → select “Zoo Code - MCP” to see full connection logs.
3. Optimize — reduce from 85 to under 60 tools
Zoo Code warns when there are too many tools (>60) because that can confuse the model.
Keep about 38 tools
| Group | Tools |
|---|---|
| Search / query | search, query, think |
| Page | get_page, put_page, list_pages, delete_page |
| Facts / memory | recall, extract_facts, find_contradictions |
| Code intelligence | code_def, code_refs, code_callers, code_flow |
| Health / diagnostics | get_health, run_doctor, get_stats, advisor |
| Graph | get_links, get_backlinks, traverse_graph, add_link, remove_link |
| Skills | list_skills, get_skill |
| Jobs (basic) | submit_job, get_job, get_job_progress, list_jobs |
| Identity | whoami, get_brain_identity, get_status_snapshot |
| Tags / data | add_tag, remove_tag, get_tags, get_chunks |
| Timeline | add_timeline_entry, get_timeline |
| Experts | find_experts, get_recent_salience |
Disable the less important tools
Add this to the config:
{
"mcpServers": {
"gbrain": {
"type": "streamable-http",
"url": "http://gbrain:7333/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
},
"disabledTools": [
"schema_lint", "schema_graph", "schema_explain_type",
"schema_review_orphans", "schema_apply_mutations",
"reload_schema_pack", "run_onboard", "get_active_schema_pack",
"list_schema_packs", "schema_stats",
"takes_list", "takes_search", "takes_scorecard",
"takes_calibration", "get_calibration_profile",
"cancel_job", "retry_job", "pause_job", "resume_job",
"replay_job", "send_job_message", "submit_agent",
"sources_add", "sources_list", "sources_remove", "sources_status",
"get_versions", "revert_version", "restore_page",
"log_ingest", "get_ingest_log",
"find_trajectory", "find_anomalies", "find_orphans",
"volunteer_context", "search_by_image",
"list_link_sources", "run_skillopt", "list_brain_skillpack",
"code_blast", "code_callees",
"resolve_slugs", "put_raw_data", "get_raw_data",
"run_doctor"
]
}
}
}
4. Using it in Zoo Code
Zoo Code automatically detects the best tool when you chat — you do not need to invoke tools manually.
Lookup / search
"Find information about X in gbrain"
"Ask gbrain about Y"
"Search gbrain for Z"
Read / write content
"Get page [name] from gbrain"
"Update page [name] with the following content..."
"List pages in gbrain"
Code analysis
"Who calls function X in gbrain?"
"Where is function Y defined?"
"Show the call flow for Z"
System checks
"Is gbrain healthy?"
"Show gbrain stats"
"Run doctor check on gbrain"
Better prompts when Zoo Code does not choose a tool automatically
"Use gbrain to find..."
"Call the get_page tool in gbrain with slug = ..."
Quick reference
| Purpose | Tool |
|---|---|
| Smart query / search | search, query, think |
| Read/write knowledge | get_page, put_page, list_pages |
| Relationship graph | get_backlinks, traverse_graph |
| Code analysis | code_def, code_refs, code_flow |
| System operation | get_health, get_stats, advisor |
| Background tasks | submit_job, get_job_progress |
| Memory / facts | recall, extract_facts |