pi-mcporter
Health Gecti
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 14 GitHub stars
Code Basarisiz
- rm -rf — Recursive force deletion command in package.json
Permissions Gecti
- Permissions — No dangerous permissions requested
This tool acts as a thin bridge allowing the "pi" coding agent to interact with various Model Context Protocol (MCP) servers through a single, unified tool interface. It enables discovery and execution of external integrations like Slack or Linear without cluttering the agent's context window.
Security Assessment
Overall risk: Medium. The extension acts as a bridge to execute actions and interact with external APIs, inherently making network requests and potentially accessing sensitive data depending on the connected MCP servers. A static scan flagged a recursive force deletion command (`rm -rf`) inside the package.json file. While sometimes used in build scripts, this is a potential risk and warrants a quick manual code review before deployment. No hardcoded secrets or dangerously broad OS permissions were found.
Quality Assessment
Overall quality: Good. The project is licensed under the permissive MIT license and is actively maintained, with repository updates pushed as recently as today. It has a small but present community footprint (14 GitHub stars). The documentation is highly detailed, providing clear installation instructions, prerequisites, and examples for usage.
Verdict
Use with caution — the core tool is well-maintained and documented, but you should quickly inspect the package.json to verify the safety of the flagged deletion command before installing.
Single-tool MCPorter bridge extension for pi and Model Context Protocol (MCP) servers.
🧳 pi-mcporter
Use MCP tools from pi through one stable tool (mcporter), powered by MCPorter.
🧠 Philosophy: CLI > MCP
- pi is fundamentally CLI-first.
- Prefer native CLIs whenever available (
gh,git,kubectl,aws, etc.). - Use MCP via
mcporterwhen it adds clear value (for example: Linear, Slack, hosted auth-heavy integrations, cross-tool workflows). - This package is intentionally a thin bridge, not a replacement for pi’s normal tool-driven workflow.
✨ Why use this package
- Keeps context small: one stable
mcportertool instead of exposing many MCP tools - Uses your MCPorter config/runtime as source of truth
- Supports discovery (
search), schema help (describe), and execution (call) - Returns useful error hints for auth/offline/http/stdio failures
📋 Prerequisites
You need MCPorter installed and configured with at least one MCP server:
npm install -g mcporter
npx mcporter list # verify your servers are visible
📦 Install
Install as a pi package:
pi install npm:pi-mcporter
Try it once without installing:
pi -e npm:pi-mcporter
🚀 Quick start
- Confirm MCPorter sees your servers:
npx mcporter list
- Start pi:
pi
- Ask for what you need — pi picks the right MCP tools automatically:
What are my open Linear issues this sprint?Catch me up on #engineering in Slack from today.Find the onboarding runbook in Notion and summarize the setup steps.
🔍 The three actions
The mcporter tool has three actions that map to a natural discovery → execution workflow.
search — find tools by keyword
Use when you don't know the exact server or tool name.
{ "action": "search", "query": "linear issue", "limit": 5 }
Returns matching selectors with short descriptions:
linear.create_issue — Create a new issue in a Linear team
linear.list_issues — List issues matching a filter
describe — get the full schema for a tool
Use when you know the selector but need to see its required parameters before calling.
{ "action": "describe", "selector": "linear.create_issue" }
Returns the full JSON Schema for the tool's input, including required vs. optional fields and their types.
call — invoke a tool
Use once you know the selector and its schema.
{
"action": "call",
"selector": "linear.create_issue",
"args": { "title": "Fix login bug", "teamId": "TEAM-1", "priority": 2 }
}
For arguments that are awkward to express as nested JSON, you can pass them as a JSON string via argsJson instead of args.
Typical workflow
search "linear issue" → discover: linear.create_issue
describe linear.create_issue → learn required fields: title, teamId
call linear.create_issue → execute with those fields
In practice pi follows this pattern automatically. With mode: "preload" the catalog is already warm at agent start, so pi can often skip search/describe and jump straight to call.
🧰 Tool input (reference)
Tool name: mcporter
action:"search" | "describe" | "call"selector?:"server.tool"(required fordescribeandcall)query?: free-text query forsearchlimit?: result limit (default 20, max 100)args?: object arguments forcallargsJson?: JSON-object-string fallback forcalltimeoutMs?: per-call timeout override
⚙️ Configuration
Configure the extension in ~/.pi/agent/mcporter.json:
{
"configPath": "/absolute/path/to/mcporter.json",
"timeoutMs": 30000,
"mode": "lazy"
}
MCPORTER_CONFIG=/absolute/path/to/mcporter.jsonstill overridesconfigPathfrom the settings file.configPath: optional explicit MCPorter config path. If omitted, MCPorter uses its normal default resolution.timeoutMs: optional default call timeout in milliseconds. Tool-leveltimeoutMsstill overrides this per call.mode: optional default MCP tool visibility mode.lazy: only the stablemcporterproxy tool is visible and MCP metadata loads on demandpreload: still only exposesmcporter, but preloads MCP tool metadata before agent start so the agent can skip unnecessary discovery more often
Legacy extension flags --mcporter-config and --mcporter-timeout-ms are no longer supported. Use ~/.pi/agent/mcporter.json, MCPORTER_CONFIG, and per-call timeoutMs instead.
🪄 Output behavior
Tool output follows pi's native expand/collapse behavior:
- Collapsed view shows a compact summary
- Expanded view shows the full rendered output
- Collapsed call headers may preview tool arguments, but sensitive fields such as tokens, passwords, API keys, authorization headers, and cookies are redacted
- Use pi's
expandToolskeybinding (defaultCtrl+O) to toggle expansion
🧯 Troubleshooting
- Unknown server/tool: run
npx mcporter listandnpx mcporter list <server>to verify names. - Auth issues: run
npx mcporter auth <server>. - Slow calls: increase
timeoutMsin~/.pi/agent/mcporter.jsonor overridetimeoutMsper tool call. - Config not found: set
configPathin~/.pi/agent/mcporter.jsonor exportMCPORTER_CONFIG=<path>. - Truncated output: the response includes a temp file path with full output.
📄 License
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi