// docs / mcp
Your library, inside your agents.
The MCP server lets an agent read, search, fill and suggest your prompts, and save good ones back. Writes only ever add: a new prompt or a new version, never a delete, and it never spends your AI tokens.
Connect it to Claude Code
# sign in with the CLI first (MCP shares the same session)
npm i -g promptlike && ple login
# add it to Claude Code
claude mcp add promptlike -- npx -y promptlike-mcpThe package is live on npm as promptlike-mcp. Zero extra auth: the server reads the same ~/.config/promptlike/config.json session the CLI wrote. The server speaks MCP over stdio, so other MCP clients can run it the same way: point them at npx -y promptlike-mcp.
Cursor and Codex
Cursor and Codex both launch stdio MCP servers, which is what promptlike-mcp is. Sign in with ple login first; the server reuses that session. In Cursor, add it to ~/.cursor/mcp.json (or .cursor/mcp.json for one project):
{
"mcpServers": {
"promptlike": {
"type": "stdio",
"command": "npx",
"args": ["-y", "promptlike-mcp"]
}
}
}In Codex, one command, or the same server in ~/.codex/config.toml:
codex mcp add promptlike -- npx -y promptlike-mcp[mcp_servers.promptlike]
command = "npx"
args = ["-y", "promptlike-mcp"]These follow Cursor's and Codex's own MCP docs; we wrote them from those docs and have not yet run them in a live Cursor or Codex session. Slash-command and @-mention support depends on the client; the tools are standard MCP tools. Already keep commands in .cursor/commands or ~/.codex/prompts? ple import --scan brings them into your library first (see the CLI docs).
The tools
list_prompts(tag?) → browse your library, incl. {{var}} names
search_prompts(query) → search titles & descriptions
get_prompt(name, version?, project?, via?) → full content, optionally a pinned version
fill_variables(name, vars, project?) → fill {{var}}s, return ready-to-use text
suggest_prompts(task) → up to 3 of your prompts that fit a task (0.4+)
save_prompt(title, content, …) → save a new prompt (0.4+)
update_prompt(name, content, …) → save a new version, old one kept (0.4+)Ambiguous names return a candidate list (each with its repo) so the agent picks, and it can retry with project to scope to one repo. Rate limits surface as Retry in Ns so it can back off.
Slash commands and @-mentions
Since 0.3 every saved prompt is also an MCP prompt: in Claude Code type /mcp__promptlike__code-review, and its {{variables}} become arguments. Since 0.4 each one is also a resource, promptlike://<repo>/<prompt>, which you can attach with @. The built-in /mcp__promptlike__save-this asks the agent to pull the reusable instruction out of the conversation, mark its variables, show it to you and save it.
Saving from the agent (0.4+)
save_prompt and update_prompt write with your own ple login session and your plan's limits, the same as the web. When a limit is reached the agent gets a plain message with the upgrade link and nothing is saved.
- Add-only. There is no delete tool. An update is a new version; the old one stays and can be rolled back.
- Safe to retry. Saving the same title and content again changes nothing; so does updating with the current content.
- No guessing. Updates need the exact title or id; a near match gets "did you mean…", never a write.
- No secrets. Content that looks like an API key or token is refused; use a
{{variable}}instead.
Claude Code plugin
The promptlike plugin bundles the server, a skill that teaches Claude when to reach for your library, and (0.3+) a suggestion hook: on each message it matches what you typed against your saved prompts on your machine. The text is never sent anywhere. When one fits, Claude gets a one-line note. The hook needs the CLI and can be turned off in /config, with PLE_SUGGEST=off, or with ple config set suggest off.
Why this matters
MCP has a first-class prompts concept but no versioning, diff, or history; that stays in PLE. So agents pull the current version over MCP while you keep the full engineering history on the web. You version it; your agents read it. More on the approach in variables and versioning.