@codella/pi-mcp-support
Generic Model Context Protocol support extension for Pi.
Package details
Install @codella/pi-mcp-support from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@codella/pi-mcp-support- Package
@codella/pi-mcp-support- Version
0.1.1- Published
- May 18, 2026
- Downloads
- 41/mo · 41/wk
- Author
- codella
- License
- MIT
- Types
- extension
- Size
- 16 KB
- Dependencies
- 1 dependency · 3 peers
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@codella/pi-mcp-support
Generic Model Context Protocol (MCP) support extension for Pi.
It connects configured MCP servers and registers each server tool as a Pi tool named:
mcp_<server>_<tool>
It also exposes helper tools for MCP status, resources, and prompts.
Install
pi install npm:@codella/pi-mcp-support
Configuration
Create a project config:
.pi/mcp.json
Or a global config:
~/.pi/agent/mcp.json
Legacy global config is also supported:
~/.pi/mcp.json
Example:
{
"servers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
},
"remote": {
"url": "http://localhost:3000/mcp",
"transport": "streamable-http",
"headers": {
"Authorization": "Bearer ${MCP_TOKEN}"
}
}
}
}
Server config
type ServerConfig = {
command?: string;
args?: string[];
env?: Record<string, string>;
cwd?: string;
url?: string;
transport?: "stdio" | "streamable-http" | "sse";
headers?: Record<string, string>;
disabled?: boolean;
};
- If
urlis present, transport defaults tostreamable-http. - Without
url, transport defaults tostdioand requirescommand. - Environment variables in config values can be referenced as
${NAME}.
Commands
/mcp- Show loaded config, connected MCP servers, and registered tools.
Built-in helper tools
mcp_statusmcp_read_resourcemcp_list_resourcesmcp_list_promptsmcp_get_prompt
License
MIT