playbook
Enables agents to search, create, edit, and step through JSON-based procedures with intent-driven search and step-by-step execution.
README
Playbook
Procedures as JSON. Search them by intent, walk titles, load one do at a time.
Playbook is a small CLI and MCP server so an agent (or you) can write, find, and follow how-tos without dumping the whole playbook into context. CLI verbs stay split. MCP compresses related verbs into fewer tools. Everything is JSON.
Python 3.10+, stdlib only at runtime.
Install
pip install -e .
playbook search
PyPI is not published yet.
Where files live
One JSON file per procedure, in the platform data dir:
| OS | Directory |
|---|---|
| Linux | ~/.local/share/playbook/procedures/ |
| macOS | ~/Library/Application Support/playbook/procedures/ |
| Windows | %LOCALAPPDATA%\playbook\Data\procedures\ |
Honor XDG_DATA_HOME / APPDATA / LOCALAPPDATA. Commands take a procedure id, not a path.
Shape
{
"id": "follow-playbook",
"title": "Follow a playbook procedure",
"description": "When to pick this file. Can be verbose.",
"tags": ["playbook", "follow"],
"steps": [
{
"id": "a1b2c3…",
"title": "Search by intent",
"do": "Call playbook_search with a sentence for the job."
}
]
}
- title — short name on search cards
- description — when to pick this procedure
- steps — serial. Unique titles. Random step ids.
dois the work.
CLI
Every command prints JSON (including errors).
playbook create demo --title "Demo" --description "when to pick this" --tags demo
playbook add-step demo --title "First" --do "Do the first thing."
playbook add-step demo --title "Middle" --do "Do the middle." --after "First"
playbook edit demo --title "Better title"
playbook search "I want to follow a procedure"
playbook load demo
playbook load demo --full
playbook start demo --title "First"
playbook validate demo
playbook mcp
search is BM25 plus character n-grams. Hits are id, title, description only (default 8, cap 50). Weak matches are dropped.
load is titles only. --full includes every do. start is one do plus before / after titles.
MCP (Grok)
grok mcp add --scope user playbook -- playbook mcp
Use an absolute path to playbook if the spawned process will not have your shell PATH. Then /mcps and r, or a new session.
| Tool | Role |
|---|---|
playbook_search |
Intent search |
playbook_open |
Load titles, --full, or at to start a step |
playbook_create |
New procedure |
playbook_edit |
Title / description / tags |
playbook_step |
op: add | edit | remove |
playbook_validate |
Validate |
Tests
pip install -e .
python -m pytest tests/ -q
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.