
Security News
Frontier AI Is Now Critical Infrastructure
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.
@feniix/pi-ref-tools
Advanced tools
Ref.tools MCP extension for pi — documentation search and URL reading via Ref's Model Context Protocol
Ref.tools MCP extension for pi — token-efficient documentation search and URL reading via Ref's Model Context Protocol.
ref_search_documentation): Search indexed technical documentation for APIs, libraries, and frameworksref_read_url): Fetch and read documentation URLs as optimized markdownpi install npm:@feniix/pi-ref-tools
Ephemeral (one-off) use:
pi -e npm:@feniix/pi-ref-tools
You need a Ref API key from ref.tools/keys.
export REF_API_KEY="your_key"
Use pi's standard settings locations for non-secret configuration:
.pi/settings.json~/.pi/agent/settings.jsonUnder the pi-ref-tools key:
{
"pi-ref-tools": {
"url": "https://api.ref.tools/mcp",
"timeoutMs": 30000,
"protocolVersion": "2025-06-18",
"maxBytes": 51200,
"maxLines": 2000
}
}
Best practice: use
settings.jsonfor non-secret defaults only. KeepREF_API_KEYin an environment variable, or use--ref-mcp-config-file/REF_MCP_CONFIG_FILEto point to a custom private JSON config file when you need to persist secrets outside your project. Legacy aliases--ref-mcp-configandREF_MCP_CONFIGare still accepted but deprecated.
pi --ref-mcp-api-key=your_key
--ref-mcp-config-file flag pathREF_MCP_CONFIG_FILE environment variable--ref-mcp-config flag path (deprecated)REF_MCP_CONFIG environment variable (deprecated).pi/settings.json under pi-ref-tools (project-level)~/.pi/agent/settings.json under pi-ref-tools (global)ref_search_documentationSearch indexed technical documentation. Best for API docs, library references, and framework guides.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search query. Include language/framework names for best results. |
piMaxBytes | integer | no | Client-side max bytes override (clamped by config). |
piMaxLines | integer | no | Client-side max lines override (clamped by config). |
ref_read_urlRead a documentation URL and return optimized markdown. Pass the exact URL from a search result or any documentation page.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | yes | The exact URL of the documentation page to read. |
piMaxBytes | integer | no | Client-side max bytes override (clamped by config). |
piMaxLines | integer | no | Client-side max lines override (clamped by config). |
| Flag | Env Variable | Default | Description |
|---|---|---|---|
--ref-mcp-url | REF_MCP_URL | https://api.ref.tools/mcp | MCP endpoint URL |
--ref-mcp-api-key | REF_API_KEY | — | API key (sent as x-ref-api-key header) |
--ref-mcp-timeout-ms | REF_MCP_TIMEOUT_MS | 30000 | HTTP timeout in ms |
--ref-mcp-protocol | REF_MCP_PROTOCOL_VERSION | 2025-06-18 | MCP protocol version |
--ref-mcp-config-file | REF_MCP_CONFIG_FILE | — | Custom config file path |
--ref-mcp-config | REF_MCP_CONFIG | — | Deprecated alias for the config file path |
--ref-mcp-max-bytes | REF_MCP_MAX_BYTES | 51200 | Max output bytes |
--ref-mcp-max-lines | REF_MCP_MAX_LINES | 2000 | Max output lines |
Default limits: 51,200 bytes, 2,000 lines. Per-call overrides via piMaxBytes/piMaxLines parameters are clamped to the configured maximums. Truncated content is saved to temporary files with paths included in responses.
pi remove npm:@feniix/pi-ref-tools
MIT
FAQs
Ref.tools MCP extension for pi — documentation search and URL reading via Ref's Model Context Protocol
The npm package @feniix/pi-ref-tools receives a total of 23 weekly downloads. As such, @feniix/pi-ref-tools popularity was classified as not popular.
We found that @feniix/pi-ref-tools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.