Open Source · MIT

A local-first coding agent
with memory, search, and governance

Index your codebase. Search it in milliseconds. Run governed AI agents from your terminal. Everything lives in a SQLite file in your repo.

$ npx moneypenny init
View on GitHub
$
Searching 12,847 chunks across 342 files...

BM25 + Vector

src/middleware/auth.ts 0.94

verifyToken(): lines 12-45

Validates JWT, checks expiry, attaches user to req

src/routes/login.ts 0.87

handleLogin(): lines 8-32

Generates token pair, sets refresh cookie

src/config/auth.ts 0.71

AUTH_CONFIG: lines 1-18

Token expiry, issuer, allowed origins

3 results | 2.1ms | 0 API calls

What is Moneypenny?

Moneypenny is a CLI tool that gives coding agents persistent memory, fast code search, and enforceable governance. It creates a .mp/ directory in your repo — a SQLite-backed brain that agents read from and write to.

It works standalone from your terminal, as an MCP sidecar for Cursor or Claude Code, or as a daemon running scheduled agents on cron. The context engine, policy enforcement, and cost tracking are the same in every mode.

.mp/

your-project/

├── .mp/

│ ├── mp.db ← sessions, costs, skills, config

│ ├── workspace.sqlite ← BM25 + vector search index

│ ├── agents/

│ │ ├── pr-reviewer.md ← agent as markdown

│ │ └── test-gen.md

│ ├── policies/

│ │ └── base.yaml ← governance rules

│ └── skills/

│ └── caching-strategy.md ← learned knowledge

├── src/

└── package.json

Architecture

A modular stack. Each layer is an independent package. The database is the runtime — code search, policy evaluation, and audit logging all execute inside SQLite.

Interfaces

CLI (mp chat) · MCP Sidecar · HTTP / SSE · Cron

Agents

Agent loader · Scheduler · Delegation · Skills

Agent Loop

Turn execution · LLM providers · Streaming · Cost tracking

Context

Prompt assembly · Governance pipeline · Policy engine

Tools

File ops · Bash · Git · Search · MCP client

Intelligence

Hybrid search · Indexer · Embeddings · Memory

Storage

SQLite · FTS5 · sqlite-vec · sqlite-ai

SQLite is the product

No services to run. No ports to open. mp.db stores sessions, costs, skills, and config. workspace.sqlite holds a hybrid search index — BM25 full-text via FTS5 and vector embeddings via sqlite-vec. Local inference via sqlite-ai handles naming and extraction at zero API cost.

Governance as code

Define policies in YAML alongside your code. Block destructive commands, protect sensitive paths, cap session costs. Every tool call passes through the policy engine. Denied actions feed back into the agent's context — it adapts instead of crashing.

Agents as markdown

An agent is a .md file with YAML frontmatter defining its model, tools, schedule, and policy overrides. The markdown body is its system prompt. Store agents in .mp/agents/, review them in PRs, deploy them with git push.

Memory that compounds

Sessions persist. At the end of each session, architecture decisions, conventions, and debugging insights are extracted into reusable skills. The next session starts with everything the last one learned.

Get started in 30 seconds

1

Initialize

$ npx moneypenny init

Created .mp/ directory

Indexing 342 files... done (1.2s)

Embedded 12,847 chunks (local, zero cost)

2

Search or chat

$ mp search "authentication flow" # instant hybrid search

$ mp chat "add input validation" # governed agent session

3

Connect to your IDE

$ mp setup cursor # MCP sidecar for Cursor

$ mp setup claude-code # or Claude Code

Three modes. One stack.

Same context engine, same governance, same cost controls — regardless of how you run it.

CLI

Interactive Agent

Every session builds on the last. Edit files, run tests, search your codebase — with full project context and persistent memory.

$ mp chat "add input validation"

MCP

IDE Sidecar

Give Cursor, Claude Code, or any MCP client access to Moneypenny's search, context engine, and governance.

$ mp setup cursor

Daemon

Background Agents

Define agents in markdown, schedule with cron. PR reviews, test generation, issue triage — autonomous and governed.

$ mp serve