Enables AI agents to manage procedural knowledge, learned procedures, and revision history using a Git-backed SQLite engine.
Also known as GhostPawJS/grimoire, grimoire, @ghostpaw/grimoire
- Stars
- 2
- Tools
- 11
- Downloads, 30 days
- 3,238
- Latest version
- 0.7.3
- Last commit
- Nov 11, 2026
- License
- MIT
What is GhostPaw Grimoire MCP?
GhostPaw Grimoire enables AI agents to manage procedural knowledge, learned procedures, and revision history using a Git-backed SQLite engine. It exposes 11 tools, such as search_grimoire, review_grimoire, inspect_grimoire_item.
Summary generated from the project's README
About GhostPaw Grimoire MCP server
GhostPaw Grimoire provides a procedural knowledge engine designed for AI agents to manage learned procedures, evidence, and version history. It functions as a structured runtime where agents can treat skills as SKILL.md files within dedicated folders. The system integrates Git, SQLite, and the filesystem into a single model, allowing agents to treat every improvement as a versioned commit that can be rolled back if necessary.
Developers can use this server locally via a release binary, through npm for Node.js environments, or by embedding the library directly into custom harnesses. It supports various MCP clients including Claude Desktop, Cursor, and Codex CLI. The engine manages state through a SQLite database, which defaults to a hidden directory in the user home but can be relocated using the --db flag or GHOSTPAW_GRIMOIRE_DB environment variable. No external API keys or credentials are required for local operation.
What you can do with it
- 1Version controlled skill managementAn AI agent can record a new procedure and save it as a versioned skill that allows for future rollbacks.
- 2Procedural knowledge retrievalA developer can instruct an agent to search through its stored procedural knowledge to find specific instructions.
- 3Knowledge health auditingAn agent can perform a review of its internal notes and drafts to ensure the quality of its learned information.
- 4Automated skill refinementAn agent can update or hone an existing skill file to improve its performance over time.
Written from the project's README. Every use case is checked against a quote from it.
How to install GhostPaw Grimoire MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall GhostPaw Grimoire MCP in Claude Code
$ claude mcp add grimoire -- npx -y @ghostpaw/grimoire mcpInstall GhostPaw Grimoire MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"grimoire": {
"command": "npx",
"args": [
"-y",
"@ghostpaw/grimoire",
"mcp"
]
}
}
}Install GhostPaw Grimoire MCP in VS Code
.vscode/mcp.json
{
"servers": {
"grimoire": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@ghostpaw/grimoire",
"mcp"
]
}
}
}Install GhostPaw Grimoire MCP in VS Code CLI
$ code --add-mcp '{"name":"grimoire","type":"stdio","command":"npx","args":["-y","@ghostpaw/grimoire","mcp"]}'Install GhostPaw Grimoire MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"grimoire": {
"command": "npx",
"args": [
"-y",
"@ghostpaw/grimoire",
"mcp"
]
}
}
}Install GhostPaw Grimoire MCP in Codex
$ codex mcp add grimoire -- npx -y @ghostpaw/grimoire mcpInstall GhostPaw Grimoire MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.grimoire] command = "npx" args = ["-y", "@ghostpaw/grimoire", "mcp"]
Install GhostPaw Grimoire MCP in Gemini CLI
$ gemini mcp add -s user grimoire npx -- -y @ghostpaw/grimoire mcpInstall GhostPaw Grimoire MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"grimoire": {
"command": "npx",
"args": [
"-y",
"@ghostpaw/grimoire",
"mcp"
]
}
}
}Started by HostedMCP on 16 Nov 2026
We ran this command for @ghostpaw/grimoire 0.7.3 in an isolated container with no network and no keys. It answered and listed 11 tools.
GhostPaw Grimoire MCP tools 11
Read from the server with tools/listsearch_grimoireRead-onlySearch spell names, descriptions, and bodies.
review_grimoireRead-onlyReview check (resonance and saved catalogue), chapters, health, resonance, notes, drafts, validation, provenance, or index.
inspect_grimoire_itemRead-onlyInspect spell content, tier, resonance, validation, provenance, and history.
inscribe_spellActionCreate a spell from SKILL.md content (YAML frontmatter and Markdown).
update_spellActionWrite new content to an existing spell, leaving the change uncommitted.
hone_spellActionSeal pending spell changes into a git commit, advancing spell ranks.
manage_spellActionArchive, restore, move, delete, repair, or roll back spells.
drop_noteActionRecord an observation for later cataloguing.
manage_draftActionSubmit, approve, or dismiss spell drafts.
run_catalogueActionMaintain health, route notes, cluster orphans, and score honing pressure.
scout_skillsActionScout, search, adopt, and update spells from external sources.
Configuration
GHOSTPAW_GRIMOIRE_DBSQLite database path (default: ~/.ghostpaw/grimoire.db)
GHOSTPAW_GRIMOIRE_GIT_DIRGit history directory (default: <ROOT>/.grimoire-git)
GHOSTPAW_GRIMOIRE_ROOTSpells directory (default: ~/.ghostpaw/grimoire/)
Automated checks
Ran Nov 12, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHub@ghostpaw/grimoire
Agent skills as SKILL.md folders, every improvement sealed as a git commit you can roll back.
A procedural knowledge engine for Node.js, built on Git, SQLite, and the filesystem.
Grimoire treats spells (learned procedures), evidence, versioning, and health
as one coherent model instead of separate systems. It ships as a single
prebundled blob with zero runtime dependencies, designed for two audiences at
once: human developers working directly in code, and LLM agents operating
through a structured soul / tools / skills runtime.
Install
Release binary (default)
The installers verify the archive against SHA256SUMS before installing. The Unix
lines below install the latest release to ~/.local/bin and add that directory
to PATH for the current shell only; they do not edit ~/.profile or any other
file. The Windows installer updates the user PATH. Choose the line for your
target.
Linux x64:
curl -fsSL https://raw.githubusercontent.com/GhostPawJS/grimoire/main/install.sh | sh -s -- --target linux-x64 && export PATH="$HOME/.local/bin:$PATH"
Linux arm64:
curl -fsSL https://raw.githubusercontent.com/GhostPawJS/grimoire/main/install.sh | sh -s -- --target linux-arm64 && export PATH="$HOME/.local/bin:$PATH"
macOS arm64:
curl -fsSL https://raw.githubusercontent.com/GhostPawJS/grimoire/main/install.sh | sh -s -- --target darwin-arm64 && export PATH="$HOME/.local/bin:$PATH"
macOS x64:
curl -fsSL https://raw.githubusercontent.com/GhostPawJS/grimoire/main/install.sh | sh -s -- --target darwin-x64 && export PATH="$HOME/.local/bin:$PATH"
Windows x64:
irm https://raw.githubusercontent.com/GhostPawJS/grimoire/main/install.ps1 | iex
To keep ~/.local/bin on PATH in new shells, this variant also appends one
line to ~/.profile (skip it if that directory is already on your PATH):
curl -fsSL https://raw.githubusercontent.com/GhostPawJS/grimoire/main/install.sh | sh -s -- --target linux-x64 && echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.profile && export PATH="$HOME/.local/bin:$PATH"
To pin a version instead of taking the latest release, pass --version
(replace the target as needed):
curl -fsSL https://raw.githubusercontent.com/GhostPawJS/grimoire/main/install.sh | sh -s -- --target linux-x64 --version 0.6.0 && export PATH="$HOME/.local/bin:$PATH"
ghostpaw-grimoire --version prints the version and variant,
--version --short the bare semver, and --version --json a
{name, version, variant, target} record.
The binary includes its runtime. ghostpaw-grimoire skill --list lists the
bundled workflow guides; ghostpaw-grimoire skill <guide> prints one.
MCP configuration
claude mcp add ghostpaw-grimoire -- "$HOME/.local/bin/ghostpaw-grimoire" mcp
/plugin marketplace add GhostPawJS/grimoire
/plugin install ghostpaw-grimoire@ghostpaw-grimoire
Codex CLI (~/.codex/config.toml):
[mcp_servers.ghostpaw-grimoire]
command = "/absolute/home/.local/bin/ghostpaw-grimoire"
args = ["mcp"]
Cursor, Claude Desktop, or a project .mcp.json:
{"mcpServers":{"ghostpaw-grimoire":{"command":"/absolute/home/.local/bin/ghostpaw-grimoire","args":["mcp"]}}}
Download server.mcpb from releases for clients supporting MCP Bundles. Build the supplied Dockerfile with docker build -t ghostpaw-grimoire . and mount /data for persistence.
Supports MCP 2026-07-28 and initialize-based protocol versions (2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05). The database defaults to ~/.ghostpaw/grimoire.db; --db overrides GHOSTPAW_GRIMOIRE_DB. Spell root selection follows the state precedence. No credentials are required for local tools.
npx / npm (for npm-based environments)
Requires Node 24 or newer:
npm install -g @ghostpaw/grimoire
npx -y @ghostpaw/grimoire --help
For an npm-based MCP configuration:
{"mcpServers":{"ghostpaw-grimoire":{"command":"npx","args":["-y","@ghostpaw/grimoire","mcp"]}}}
Library (for harnesses embedding it in code)
npm install @ghostpaw/grimoire
import { DatabaseSync } from 'node:sqlite';
import { initGrimoireTables, write, read } from '@ghostpaw/grimoire';
const db = new DatabaseSync(':memory:');
initGrimoireTables(db);
write.dropNote(db, { source: 'practice', content: 'Verify the build before release.' });
const notes = read.pendingNotes(db);
db.close();
A session with a linux-x64 release binary against a fresh database and spell directory (output piped through jq to keep it short):

The same session as an animated GIF.
Other release installers:
mise use -g github:GhostPawJS/grimoire
ubi --project GhostPawJS/grimoire --exe ghostpaw-grimoire --in ~/.local/bin
eget GhostPawJS/grimoire
For aqua, define a
github_release package in aqua.yaml:
registries:
- name: grimoire
type: local
path: grimoire-registry.yaml
packages:
- name: GhostPawJS/grimoire@v0.4.3
registry: grimoire
grimoire-registry.yaml:
packages:
- type: github_release
repo_owner: GhostPawJS
repo_name: grimoire
asset: ghostpaw-grimoire-{{trimV .Version}}-{{.OS}}-{{.Arch}}.tar.gz
format: tar.gz
replacements: { amd64: x64 }
overrides:
- goos: windows
asset: ghostpaw-grimoire-{{trimV .Version}}-windows-{{.Arch}}.zip
format: zip
files:
- name: ghostpaw-grimoire
Install scripts verify SHA256SUMS. To verify a downloaded archive's build attestation:
gh attestation verify <archive> -R GhostPawJS/grimoire
Set GHOSTPAW_VERIFY=attestation for attestation verification in install.sh.
Binaries are unsigned; macOS binaries carry an ad-hoc signature. For a browser
download on macOS, remove quarantine with
xattr -d com.apple.quarantine /path/to/ghostpaw-grimoire.
Linux binaries require glibc 2.28+; use npx on Alpine.
See the binary build workflow.
Archive and binary sizes vary by release; see the assets on the release page.
The install check runs on ubuntu-24.04, macos-15 and windows-2025.
Running inside sandboxed agent harnesses
Inside a Codex CLI --sandbox workspace-write session, the database and its
parent directory must be inside a writable root, including SQLite's -wal and
-shm side files. A default DB under ~/.ghostpaw outside those roots can fail
with SQLITE_CANTOPEN or EPERM (often exit 70; directory creation failures
may exit 2), even when normal shell permissions allow access. Put the DB inside the workspace with --db ./state/grimoire.db,
or set GHOSTPAW_GRIMOIRE_DB="$PWD/state/grimoire.db" for CLI/MCP use.
To use an external DB directory, add it when starting the OpenAI Codex CLI
(replace <dir-with-db> with its absolute path):
codex exec --sandbox workspace-write --add-dir <dir-with-db> "Run the GhostPaw CLI"
Alternatively, set sandbox_workspace_write.writable_roots in
~/.codex/config.toml before starting the session:
[sandbox_workspace_write]
writable_roots = ["/absolute/dir-with-db"]
The spell root and Git directory must also be inside writable roots. Select
--root ./state/spells (or GHOSTPAW_GRIMOIRE_ROOT) as well as --db;
--db alone does not relocate the spell root. Git defaults to
<root>/.grimoire-git; keep it there or select a writable directory with
--git-dir ./state/spell-history / GHOSTPAW_GRIMOIRE_GIT_DIR. Add each
external directory with another --add-dir or writable_roots entry. Avoid a
protected workspace .git directory; use the dedicated spell history directory.
State
The database defaults to ~/.ghostpaw/grimoire.db; select it with --db or
GHOSTPAW_GRIMOIRE_DB. Spell root precedence is --root, GHOSTPAW_GRIMOIRE_ROOT, then
<parent of GHOSTPAW_GRIMOIRE_DB>/grimoire when that variable names a file,
then ~/.ghostpaw/grimoire. Relative DB paths resolve against the current directory.
Empty environment values count as unset; :memory: retains the home root default.
--db overrides the database only; the environment DB still supplies the default root.
Explicit root and Git settings always win.
Explicit --git-dir or GHOSTPAW_GRIMOIRE_GIT_DIR configuration suppresses the ignored-parent-history warning.
Each root stores Git history in <ROOT>/.grimoire-git, excluded from discovery.
--git-dir overrides GHOSTPAW_GRIMOIRE_GIT_DIR, which overrides this default.
A legacy <parent>/.grimoire-git is copied into the root only when its configured
work tree or HEAD tree identifies this root. The original stays in place, with a
MIGRATED_TO marker. Shared or uncertain legacy repositories stay at their old
location and produce one shared_git_dir warning per result; new writes use
the root-local repository. Git writes use a per-repository advisory
lock and path-scoped commits. File databases use WAL and a five-second busy timeout.
Library callers supply their database and should configure those pragmas before use.
CLI
ghostpaw-grimoire search <query>
ghostpaw-grimoire review <check|chapters|health|resonance|notes|drafts|validation|provenance|index>
ghostpaw-grimoire inspect <path>
ghostpaw-grimoire spell inscribe <name> --content TEXT
ghostpaw-grimoire spell update|hone <path> [flags]
ghostpaw-grimoire spell shelve|unshelve|delete|repair <path>
ghostpaw-grimoire spell move <path> <target>
ghostpaw-grimoire spell rollback <path> <ref>
ghostpaw-grimoire spell repair-all
ghostpaw-grimoire note drop <content> --source SOURCE
ghostpaw-grimoire draft submit <title> --rationale TEXT --note-ids ID --chapter NAME
ghostpaw-grimoire draft approve|dismiss <draftId>
ghostpaw-grimoire catalogue run
ghostpaw-grimoire scout adopt <source>
ghostpaw-grimoire scout search <query>
ghostpaw-grimoire scout check-updates
ghostpaw-grimoire scout apply-update <path>
ghostpaw-grimoire mcp|skill|tools|describe|call|completions|version|help
Global flags can appear anywhere: --db <path>, --root <path>, --git-dir <path>, --json, -q, --quiet,
--compact, --help/-h, --version/-V/-v, --no-color.
NO_COLOR is accepted; output uses no terminal colors.
Noun-verb commands print the full tool result as JSON with --json or when
stdout is piped. Write results contain compact metadata by default; --verbose includes full spell content.
-q, --quiet suppresses stdout. --compact removes JSON indentation.
Use help spell, bare spell, or spell update --help for schema-derived help.
skill --list lists bundled guides; skill <guide> prints the guide.
Search tokenizes multiple terms, removes common English stopwords, stems common
suffixes, and scores name/description/body matches with weights 3/2/1 and inverse
document frequency. Trigram Jaccard similarity of at least 0.3 adds fuzzy metadata
matches. Results expose score and sort by score, rank, then path. Legacy name
and description substring matches remain supported. Uncheckpointed spells remain visible.
Inscribe conflicts unless --force is supplied; identical forced content returns
no_op when it also matches committed content. Hone accepts positional paths and
returns no_op without a diff; supplied note IDs are still marked distilled. --note-ids and --note_ids both work for hone and draft submit.
Inspect includes commit hashes, short hashes, subjects, and ISO dates for rollback.
--now accepts epoch milliseconds, ISO 8601 date-time, or YYYY-MM-DD. Values more
than one minute ahead return a projection with a projected warning and preserve
stored health and notes.
review index --format prompt returns only the formatted prompt block in data.
Catalogue health fields measure honing pressure, rather than a quality rating:
a fresh seal can have zero pressure. Dormancy has a 14-day grace period after
the first seal. Catalogue expires pending notes older than 90 days and keeps at
most 50 pending notes, expiring the oldest first with a notes_expired count warning. Deleting a spell purges its events.
Array flags repeat and a final - reads JSON stdin (spell inscribe <name> - is supported). Spell --content, --replace, --with, and --body read files: @path reads the file, @- reads stdin, and @@text passes a literal @text. Every other value, including note text and positionals, is taken literally even if it starts with @.
Flags use kebab-case and override stdin fields. -- ends flags.
All value flags accept --flag=value; use this form for dash-leading text, for example
spell update general/example --replace="--soul <A>:owner" --with="--soul <B>:owner".
Use -- to end flag parsing before dash-leading positional arguments.
--replace and --with accept UTF-8 @file values, @- for stdin, and @@ for a literal leading @.
ghostpaw-grimoire check (also review check) combines current resonance with the
latest saved catalogue in data.resonance and data.snapshot (null if none exists).
It reads an existing database without initialization, migrations, Git migration,
note routing, or snapshot writes. Missing databases fail without creating files.
The facade and MCP expose the same operation as review_grimoire({ view: 'check' });
--now and --limit apply to resonance. The saved snapshot retains its original timestamp.
Database selection uses --db, GHOSTPAW_GRIMOIRE_DB, then ~/.ghostpaw/grimoire.db.
Spell files and Git history follow the full precedence in State.
Context initialization may run Git. Scout remote operations need network access;
local sources can stay offline.
| Exit | Noun-verb result |
|---|---|
| 0 | Success, including no_op |
| 1 | Tool error |
| 2 | Usage or input validation error |
| 3 | Clarification needed or not found |
| 4 | Conflict or version mismatch |
| 70 | Internal error |
Frontmatter validation warns about invalid YAML values and unknown fields by default.
Use { strict: true } with read.validateSkillMd, read.validate, or read.validateAll
to treat those warnings as errors; other warnings stay warnings. Write and scouting
APIs that validate frontmatter also accept strict in their input or options.
On the CLI, use review validation --strict or inspect <path> --strict;
spell inscribe, spell update, scout adopt, and scout apply-update accept it too.
Strict validation failures exit with code 2 and identify the field and value.
The matching MCP tools accept an optional strict boolean. Hone only seals files;
validate with inspect <path> --strict before honing manual edits.
Errors go to stderr. With --json, usage and internal errors also print
{ok:false,error:{code,message}} to stdout. Tool results retain their full
shape. Legacy tools [--json], describe <tool>, call <tool> [JSON|-]
and <tool_name> --parameter value use the same exit codes.
completion aliases completions. Bash and Zsh scripts complete command groups,
verbs, and command flags for both ghostpaw-grimoire and grimoire.
completions fish prints a Fish script.
ghostpaw-grimoire note drop "Verify the build" --source practice --db /tmp/grimoire.db --json
ghostpaw-grimoire review notes --db /tmp/grimoire.db --json
ghostpaw-grimoire spell update --help
Set GHOSTPAW_GRIMOIRE_ROOT to a temporary directory for an isolated session.
Agent Skill: see SKILL.md or install the skills/grimoire directory with its references.
Quick Start
import { DatabaseSync } from 'node:sqlite';
import { init, read, write } from '@ghostpaw/grimoire';
const db = new DatabaseSync(':memory:');
const root = '/path/to/my-grimoire';
// Bootstrap: filesystem + SQLite tables + bare git repo with initial commit
init(root, db);
// Inscribe a new spell (content is a spec-compliant SKILL.md string)
const { spell } = write.inscribe(root, db, {
name: 'deploy-service',
chapter: 'engineering',
content: '---\nname: deploy-service\ndescription: Deploy a service to production\n---\n\n# deploy-service\n\n## Steps\n\n1. Run `npm run build`\n2. Push to registry\n3. Apply manifests\n',
});
// Drop an observation note as evidence
write.dropNote(db, {
source: 'practice',
content: 'Build step fails if DOCKER_REGISTRY is not exported first.',
});
// Seal the improvement into a git commit, advancing rank
write.seal({ root }, db, [`engineering/${spell.name}`], 'Fix: document required env var for build step');
// Read back the enriched spell
const detail = read.getSpell(root, 'engineering/deploy-service', db);
const chapters = read.listChapters(root);
Docs
The live demo runs the library in your browser against an in-memory SQLite database. Each view below opens a different part of it:
- Dashboard: overview and actions
- Chapters: spells grouped by chapter
- Inscribe: write a new spell
- Notes: the observations inbox
- Catalogue: health analysis of every spell
- Scout: search and adopt spells
The Model
Eight concepts, strict separation of concerns:
| Concept | Purpose |
|---|---|
| Spell | A learned procedure stored as SKILL.md with YAML frontmatter and a markdown body |
| Chapter | A folder grouping related spells into a focused collection |
| Seal | A git commit marking a verified improvement — rank equals seal count |
| Tier | Mastery level computed from rank: Uncheckpointed → Apprentice → Journeyman → Expert → Master |
| Note | Raw evidence (observation, failure path, correction) awaiting distillation into a spell |
| Resonance | Read-time signal indicating which spells have the highest return on honing effort |
| Draft | A proposed new spell submitted for review before inscription |
| Catalogue | A health snapshot: staleness, dormancy, oversizing, velocity, and clustering |
The model means each kind of truth has its own home:
| What it looks like | What it actually is |
|---|---|
| A how-to guide or runbook | A Spell |
| Related spells grouped by domain | A Chapter |
| "This procedure is proven — preserve it" | A Seal |
| "We got burned by this edge case" | A Note |
| "This spell hasn't been touched in months" | A Catalogue health signal |
| "This spell is ready to hone next" | Resonance |
State is derived, not hand-toggled. Tier, resonance color, staleness, dormancy, and health scores are computed from evidence and commit history at read time, never stored as caller-written flags.
Tier progression at a glance
Grimoire computes tier markers on every read. They advance as spells accumulate sealed improvements:
Inscription
$\color{Gray}{\textsf{◎}}$ deploy-service uncheckpointed · no seals yet↓ seal a validated improvement Honing
$\color{SteelBlue}{\textsf{◎}}$ deploy-service apprentice · rank 1–2$\color{MediumSeaGreen}{\textsf{◎}}$ deploy-service journeyman · rank 3–5$\color{Goldenrod}{\textsf{◎}}$ deploy-service expert · rank 6–9$\color{Orchid}{\textsf{◎}}$ deploy-service master · rank 10+Attention signals
$\color{OrangeRed}{\textsf{●}}$ deploy-service resonance · hone now$\color{Gray}{\textsf{●}}$ deploy-service dormant · low return on effort
Rank is the only experience counter. Each tier raises the validation bar: from Journeyman on, a spell is expected to include failure and recovery paths; from Expert on, edge cases; at Master, a compiled summary.
Two Audiences
Human developers
Use the read and write namespaces for direct-code access to the domain:
import { read, write } from '@ghostpaw/grimoire';
// Inscribe and evolve a spell
write.inscribe(root, db, { name: 'lint-fix', chapter: 'general', content: '---\nname: lint-fix\ndescription: Run lint with autofix\n---\n\n# lint-fix\n\nRun `npx biome check --fix .`\n' });
write.dropNote(db, { source: 'practice', content: 'Biome needs --unsafe for some rules.' });
write.seal({ root }, db, ['general/lint-fix'], 'Add note about unsafe flag');
// Read derived state
const spell = read.getSpell(root, 'general/lint-fix', db);
const resonance = read.allResonance(db);
const catalogue = read.readCatalogue(db);
See HUMAN.md for the full direct-code guide with worked examples and modeling boundaries.
LLM agents
Use the tools, skills, and soul namespaces for a structured runtime
surface designed to minimize LLM cognitive load:
import { tools, skills, soul } from '@ghostpaw/grimoire';
// 10 intent-shaped tools with JSON Schema inputs and structured results
const allTools = tools.grimoireTools;
const searchTool = tools.getGrimoireToolByName('search_grimoire')!;
const result = await searchTool.handler({ root, db }, { query: 'deploy' });
// Workflow skills for common multi-step scenarios
const allSkills = skills.grimoireSkills;
// Thinking foundation for system prompts
const prompt = soul.renderGrimoireSoulPromptFoundation();
Every tool returns a discriminated result with outcome: 'success' | 'no_op' | 'needs_clarification' | 'error', structured entities, next-step hints, and
actionable recovery signals.
See LLM.md for the full AI-facing guide covering soul, tools, and skills.
GhostPaw Grimoire MCP questions
How do I add GhostPaw Grimoire MCP to Claude Code?
Run claude mcp add grimoire -- npx -y @ghostpaw/grimoire mcp in your terminal. Add --scope user to make it available in every project.
How do I add GhostPaw Grimoire MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does GhostPaw Grimoire MCP provide?
It exposes 11 tools, including search_grimoire, review_grimoire, inspect_grimoire_item, inscribe_spell, update_spell.
What is GhostPaw Grimoire?
It is a procedural knowledge engine for Node.js built on Git, SQLite, and the filesystem that treats learned procedures, evidence, and versioning as a coherent model.
Does it require any credentials for local tools?
No, no credentials are required when using the local tools.
How does it handle versioning for agent skills?
Agent skills are stored as SKILL.md folders, and every improvement is recorded as a git commit that can be rolled back.