knowledge-gateway-mcp
You can search a private, allowlisted local skill library for relevant skills and then load a selected skill (or specific skill-relative files) into Pi's session, without ever listing the full catalog.
search_skillsfinds skill candidates by a text query, returning only relevant matches (not the full catalog). You can control the number of candidates returned (1–10, default 3).load_skillloads the complete skill for an exact skill name returned bysearch_skills, normally activating it through Pi's native/skill:namepipeline.load_skillcan instead return explicitly requested skill-relative reference files (e.g.,references/api.md) as ordinary tool results, instead of activating the skill.All operations are read-only and idempotent; no skill listing, manifest management, indexing, or synchronization tools are exposed.
Access is strictly scoped to skills indexed in the configured Scribery documentation source that are marked
disable-model-invocation: trueand present in the active index.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@knowledge-gateway-mcp search my Pi skills for guidance on creating a custom MCP server"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
skills-retrieval
A Pi package that discovers skills, uses Scribery for semantic retrieval and reranking, and activates selected skills through Pi's native skill pipeline.
It exposes exactly two model-facing tools:
search_skillssearches eligible skill packages without revealing the full catalog;load_skillactivates a selectedSKILL.md, or returns explicitly requested reference files from that skill.
When load_skill is called without files, it delegates to Pi's native
/skill:name pipeline. The skill is therefore injected as a user-role skill
message and displayed with Pi's normal collapsible skill widget. Requests for
specific nested files, such as references/details.md, remain ordinary tool
results.
Scribery is a private implementation detail. The package starts a read-only
Scribery MCP subprocess with only list_documentation_sources and
search_documentation enabled. Scribery's tools are never exposed to the model,
and this project does not provide a public MCP server or executable.
Source policy
Every skill selected for retrieval must remain hidden from Pi's native model catalog:
---
name: example-skill
description: Specialized guidance for an example workflow.
disable-model-invocation: true
---The source list of the configured Scribery documentation is the retrieval
allowlist. A skill is eligible only when its directory has been added as a
Scribery source, its SKILL.md is present in the active index, and it sets
disable-model-invocation: true. Skills absent from that index remain available
only through Pi's manual skill invocation.
Related MCP server: pid-mcp
Automatic manifest
The in-memory skill manifest is built when Pi loads the extension and refreshed internally before every search or load. There is no manifest-management tool.
Discovery is recursive below the configured Pi skills root. Each directory
containing SKILL.md becomes one skill package; nested files such as
references/*.md, scripts, and assets belong to that package. File hashes are
cached by size and filesystem timestamps during the extension lifetime. A
package hash and whole-manifest hash change whenever relevant files change.
Scribery's active indexed-file inventory supplies each result's original absolute
location. Skills Retrieval uses that location to map a hit in a nested reference back
to the owning SKILL.md. Duplicate filenames therefore do not make skill
selection ambiguous.
Prepare Scribery
In scribery-tui:
Create documentation named
pi-skills.Choose Configure sources → Add directory.
Select one skill directory that should be retrievable, such as
~/.pi/agent/skills/example-skill.Give it a unique mount path, normally the skill name.
Repeat for each skill you want in retrieval.
Ensure the parent
~/.pi/agent/skillsdirectory is not also configured as a source, which would index every skill and duplicate selected files.Choose Index documentation.
Use the same ordinary Index documentation action after skill files or the source list changes. Scribery discovers additions, modifications, and deletions while reusing unchanged chunks and embeddings.
Install in Pi
cd /Users/donais/Documents/Projects/skills-retrieval
npm install
npm run check
pi install /Users/donais/Documents/Projects/skills-retrievalThe Pi extension is generated at dist/skill-retrieval/index.js. Configure it through
environment variables before starting Pi. For example:
export SKILLS_RETRIEVAL_SCRIBERY_COMMAND=/Users/donais/Documents/Projects/scribery/packages/scribery/dist/mcp.js
export SKILLS_RETRIEVAL_DOCUMENTATION=pi-skills
export SKILLS_RETRIEVAL_SCRIBERY_PROFILE=omlx-qwen3
export SKILLS_RETRIEVAL_SCRIBERY_API_KEY=omlx
piAvailable settings are:
SKILLS_RETRIEVAL_SKILLS_ROOT— defaults to$PI_CODING_AGENT_DIR/skillsor~/.pi/agent/skills;SKILLS_RETRIEVAL_DOCUMENTATION— defaults topi-skills;SKILLS_RETRIEVAL_SCRIBERY_COMMAND— defaults toscribery-mcp;SKILLS_RETRIEVAL_SCRIBERY_PROFILE;SKILLS_RETRIEVAL_SCRIBERY_BASE_URL;SKILLS_RETRIEVAL_SCRIBERY_API_KEY;SKILLS_RETRIEVAL_SCRIBERY_RERANK_MODEL;SKILLS_RETRIEVAL_SCRIBERY_RERANK_INSTRUCTION.
Use either a Scribery profile or explicit base-URL/reranking settings, not both.
Pi skill discovery must remain enabled. Individually indexed skills must still
set disable-model-invocation: true; this hides their descriptions from Pi's
model catalog without preventing the extension from invoking /skill:name.
Security boundary
Filesystem and Scribery operations are read-only. Native skill activation adds a user message to the current Pi session.
There is no
list_skills, indexing, synchronization, or manifest tool.Search is hard-scoped to indexed files owned by skill packages whose
SKILL.mdis indexed.Skills omitted from the Scribery source list are neither searchable nor loadable through retrieval.
load_skillaccepts only manifest-listed, skill-relative paths and rejects traversal, binary files, oversized files, and oversized combined responses.The model cannot select documentation identifiers, provider settings, reranking settings, arbitrary source identifiers, or Scribery tools.
The selected skill is validated through retrieval policy before Pi expands it.
Available Tools
2 toolsload_skillLoad a found skillARead-onlyIdempotent
Load the complete skill for an exact skill name returned by search_skills.
Inputs: name (required), files.
search_skillsSearch for a skillARead-onlyIdempotent
Search within local library of skills. Returns relevant candidates; it cannot list the complete skill catalog. Call load_skill for a relevant match.
Inputs: query (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
search_skills handles discovery by returning candidate matches, while load_skill retrieves the full content for a specific skill name. Their purposes are clearly separated and complementary.
Both tools use the same verb_noun snake_case convention, with search_skills and load_skill being predictable and consistent. The naming clearly indicates the action and target resource.
Two tools is slightly below the typical range, but the server is intentionally scoped to a simple search-and-retrieve workflow. Each tool earns its place and there is no redundant surface.
For a read-only skill library gateway, the discover-then-retrieve flow is complete: search_skills finds relevant candidates and load_skill retrieves the full skill. No create, update, or delete operations are implied by the stated purpose.
Maintenance
Related MCP Connectors
Find AI agent skills: public previews and source links. Read-only discovery; no account required.
Search verified Claude Code plugins and skills; fetch portable SKILL.md sources. Read-only.
Discover, compare, route, and execute machine-accessible capabilities for AI agents.
Search and load AI agent skills. Free metadata; full content requires a Pro or Studio account.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to search, browse, install, and manage a large library of skills via only 7 MCP tools, with skills stored locally and loaded on demand to minimize context overhead.4MIT
- AlicenseNot gradedqualityBmaintenanceEnables Pi models to discover and activate MCP tools by search, making every MCP tool callable as a native Pi tool.MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to search a catalog of SKILL.md procedures, fetch individual skill instructions and supporting resources, and obtain advisory multi-step routes through read-only tools such as search_skills, route_request, get_skill, and get_skill_resource. It returns metadata and suggestions only, never executing skills, running shell commands, or granting authority.MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to search a large skill library and read matching skill instructions on demand through two MCP tools, keeping only a small core preloaded and avoiding context bloat.1MIT