By default, all MCP tools are accessed through theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nicobailon/pi-mcp-adapter/llms.txt
Use this file to discover all available pages before exploring further.
mcp() proxy tool. This keeps your context window small but requires the LLM to discover tools through search. For tools you use frequently, you can register them directly with Pi so they appear alongside built-in tools like read, bash, and edit.
When to use direct tools
Direct tools are ideal for:- Frequently used tools - Tools the LLM should always consider (e.g.,
github_search_repositories) - Core workflows - Essential tools for your project (e.g.,
postgres_queryfor a database project) - Small tool sets - 5-20 tools that form a cohesive capability
Avoid direct tools when:
- Server has 75+ tools (use the proxy or pick specific tools)
- Tools are rarely needed
- You want to minimize context usage
- LLM discovery through search is acceptable
Configuration
Direct tools are configured in your MCP config file (~/.pi/agent/mcp.json or project .pi/mcp.json).
- All tools from a server
- Specific tools
- Global default
- Disabled (default)
Register every tool from a specific server:Effect: All 26 tools from
chrome-devtools become first-class Pi tools:chrome_devtools_navigatechrome_devtools_screenshotchrome_devtools_click- etc.
Still accessible via proxy: Direct tools can also be called through
mcp() for consistency.Interactive configuration
Instead of editing JSON manually, use the interactive panel:Toggle tools
The panel shows all servers with:
- Connection status
- Tool counts
- Direct/Proxy toggles for each tool
The
/mcp panel also lets you reconnect servers, initiate OAuth, and view detailed server info.How direct tools work
Registration from cache
Direct tools register from the metadata cache (~/.pi/agent/mcp-cache.json), not live connections. This means:
- No server connections at Pi startup
- Instant registration (milliseconds)
- Works even if servers are offline
directTools to a new server, the cache won’t exist yet. Tools will fall back to proxy-only mode and the cache populates in the background. Restart Pi and direct tools will be available.
Force cache update: Use /mcp reconnect <server> then restart Pi.
Tool naming
Direct tools follow the same naming rules as proxy tools:| Prefix Mode | Tool Name |
|---|---|
server (default) | chrome_devtools_screenshot |
short | chrome_screenshot (strips -mcp suffix) |
none | screenshot |
Duplicate names across servers
If two servers have tools with the same name (after prefixing):- First tool wins
- Second tool is skipped
- Warning logged:
MCP: skipping duplicate direct tool "github_search" from "gitlab"
toolPrefix: "server" mode to namespace tools by server name.
Resource tools
MCP resources are exposed asget_* tools and can be registered directly:
Environment override
For testing or temporary changes, override direct tools via environment variable:server-name- All tools from that serverserver-name/tool-name- Specific tool from server- Comma-separated list for multiple
__none__to disable all direct tools
Environment override is temporary and doesn’t modify your config file.
Performance considerations
Context window impact
Each direct tool adds to your system prompt:| Tool Count | Approximate Tokens |
|---|---|
| 5 tools | ~1,000 tokens |
| 20 tools | ~4,000 tokens |
| 50 tools | ~10,000 tokens |
| 100 tools | ~20,000 tokens |
mcp()proxy tool: ~200 tokens- Pi built-in tools: ~2,000 tokens total
When to use each approach
| Scenario | Recommendation |
|---|---|
| 1-2 frequently used tools | Direct tools |
| 5-20 related tools | Direct tools (good for focused workflows) |
| 50+ tools, use 5 regularly | Direct array: ["tool1", "tool2", ...] |
| 75+ tools, explore occasionally | Proxy only |
| Mixed: some frequent, some rare | Hybrid: direct for key tools, proxy for rest |
Validation
After configuring direct tools, verify registration:Subagent integration
If you use the Pi subagent extension, agents can request direct tools in their frontmatter:Next steps:
- Learn about the mcp() proxy tool
- Explore search capabilities
- Use commands to manage servers