txtscape

Your AI agent forgets everything between conversations. Fix that.

Try it in 30 minutes

Build a text adventure game while learning how txtscape gives your AI agent persistent memory. No prior setup beyond an IDE with AI chat.

Start the tutorial →

txtscape is an MCP server that gives your agent a persistent, searchable memory — plain .txt files committed to git. No database. No external service. Just files in your repo that your agent reads and writes.

Install

Then open your editor and start a new AI chat. Ask: "List the txtscape pages."

Without txtscape vs. with

❌ Without

"Remind me, are we using Postgres or SQLite?"

"What's our error handling pattern again?"

Random .md files proliferating across your project tree.

Every conversation starts from zero.

✅ With txtscape

"Read the architecture decisions and follow the existing patterns."

Everything in one .txtscape/ folder. Your project tree stays clean.

The agent reads your pages and already knows.

How it works

1
Define your structure

Create a config.json with "concerns" — named folders like decisions/, runbooks/, architecture/. Add optional templates so every page follows the same shape.

2
Your agent writes knowledge

As you work, the agent stores decisions, patterns, and context using put_page. Pages are plain text with markdown formatting, living in .txtscape/pages/.

3
Every conversation starts informed

New chat session? The agent calls search_pages or snapshot and picks up right where you left off. Knowledge accumulates. Context never evaporates.

What it looks like

You "Record that we chose Postgres over SQLite. Reason: we need concurrent writes and the team already knows it."
Agent put_pagedecisions/database-choice.txt created
— next day, new conversation —
You "Add a users table migration."
Agent search_pages → found decisions/database-choice.txt
"I see you chose Postgres for concurrent writes. I'll write the migration using PostgreSQL syntax with a serial primary key…"

What's in the box

11 MCP tools. Your agent picks the right one automatically.

put_page create/update
get_page read a page
search_pages text/regex search
list_pages browse tree
snapshot bulk read
str_replace_page surgical edit
append_page add to end
delete_page remove
move_page rename/move
related_pages cross-refs
page_history git log

Pages are plain text with markdown formatting, stored in .txtscape/pages/. Committed to git. Diffable. Reviewable in PRs. No database, no external service.

Why txtscape

📦
Zero dependencies

Pure Go standard library. Nothing to audit, nothing to break.

💾
No database

The filesystem is the storage layer. Plain .txt files.

🔀
Plain text in git

Diffable, reviewable in PRs, portable across tools.

🗂️
Configurable taxonomy

Each project defines its own memory structure.

🔓
No lock-in

Stop using txtscape and your .txt files stay. They're just files.

🧹
Stays out of your way

Pages live in .txtscape/, not scattered across your project.

🤖
LLM-native

Plain text that any model already understands. No special format.

🔌
Stdio subprocess

No ports, no background process, no attack surface.

⚖️
MIT licensed

Use it however you want. Free and open source.

Works with any MCP-compatible editor
VS Code (Copilot) Cursor Windsurf Claude Desktop Claude Code Zed JetBrains Neovim

Project structure

.txtscape/
├── config.json          # define your concerns + templates
└── pages/
    ├── decisions/
    │   └── use-postgres.txt
    ├── architecture/
    │   └── api-design.txt
    └── learnings/
        └── auth-gotchas.txt

Every project defines its own shape. A startup might have customers/ and pricing/. An infra team might have runbooks/ and incidents/. You decide what matters.

⭐ Star on GitHub — open source, MIT licensed