ClawStash
Mirror all stashes into a GitHub repository with scheduled, on-change, or manual backups, supporting GitHub sign-in or PAT authentication.
Supports Markdown content with file attachments and inline Mermaid diagram rendering.
Render Mermaid diagrams from .mmd files or inline ```mermaid blocks in Markdown, with lazy-loading for performance.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ClawStashsave this Python script to my stashes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ClawStash
Persistent storage for AI agents. Store text, code, configs, and files — retrieve them via MCP or REST API.
Built for agents like OpenClaw that need a reliable place to save and recall information across sessions.
Why ClawStash?
AI agents lose context between sessions. ClawStash gives them a persistent memory:
Store anything — code snippets, configs, notes, multi-file projects
Organize with tags & metadata — structured key-value metadata and tags for easy retrieval
Full-text search — find stashes by content, name, description, or tags
Token-efficient — MCP tools return summaries first, full content only on demand
Version history — every change is tracked, diffable, and restorable
GitHub backup — mirror all stashes into a GitHub repo (scheduled, on change, or manual) with "Sign in with GitHub" or a PAT — see docs/backup.md
Mermaid diagrams —
.mmdfiles and inline```mermaidblocks in Markdown render as diagrams (lazy-loaded, no bundle bloat)Web GUI included — dark-themed dashboard to browse, search, and manage stashes manually
Related MCP server: Librarian
Get Started
1. Let your agent do it (recommended)
Copy this into your OpenClaw agent — it installs ClawStash, creates test stashes, and sets up MCP automatically:
Install ClawStash (ghcr.io/fo0/clawstash) on my server and set it up as your default persistent storage via MCP. Server: <HOST_OR_IP>, User: <SSH_USER>, Auth: <PASSWORD_OR_KEY>. Use port <PORT> (docker compose port mapping "<PORT>:3000"). Set ADMIN_PASSWORD to a secure value. After install: create an API token (scopes: read, write, mcp), create 2 test stashes to verify, then fetch /api/mcp-onboarding to read the full MCP spec and configure yourself. Details: https://raw.githubusercontent.com/fo0/clawstash/main/docs/openclaw-onboarding-prompt.mdReplace the <...> placeholders with your server details — your agent handles the rest.
Step-by-step version: docs/openclaw-onboarding-prompt.md
2. Manual setup
Run this on your server — no clone needed:
mkdir clawstash && cd clawstash && cat > docker-compose.yml <<'EOF'
services:
clawstash:
image: ghcr.io/fo0/clawstash:latest
ports:
- "3000:3000"
volumes:
- ./data:/app/data
environment:
- NODE_ENV=production
- DATABASE_PATH=/app/data/clawstash.db
# - ADMIN_PASSWORD=your-secret-password
restart: unless-stopped
EOF
docker compose up -dOpen http://localhost:3000 — done. Database persists in ./data/.
Change port mapping (e.g.
"8080:3000") for a different port. UncommentADMIN_PASSWORDto protect the instance. If login fails and the logs showSQLITE_READONLY(data directory created by an older version), runsudo chown -R 1000:1000 ./dataonce and restart — details in Deployment → Bind mounts & file permissions.
After starting, point your AI agent at the onboarding endpoint to self-configure:
GET http://<HOST_OR_IP>:<PORT>/api/mcp-onboardingThis returns all available MCP tools, schemas, and recommended workflows — your agent reads it and starts using ClawStash immediately.
MCP Connection
Add to your MCP client config (OpenClaw, Claude Code, Cursor, etc.):
{
"mcpServers": {
"clawstash": {
"type": "streamable-http",
"url": "http://<HOST_OR_IP>:<PORT>/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}Create API tokens in the web GUI under Settings > API & Tokens (scopes: read, write, mcp).
MCP Tools
Tool | What it does |
| Store new content with files, tags, metadata |
| Get stash metadata + file list (content on demand) |
| Read a single file — most token-efficient |
| Browse all stashes with summaries |
| Full-text search with ranked results |
| Update existing stash content |
| Remove a stash |
| Archive/unarchive a stash without deleting |
| List all tags with usage counts |
| Explore tag relationships |
| Storage statistics |
| Fetch the OpenAPI 3.0 schema (JSON) |
| Fetch the full MCP specification (markdown) |
| Get latest tool specs (for connected agents) |
| Check for updates |
Documentation
Doc | Content |
Copy-paste prompt for full agent-driven setup | |
REST endpoints, examples, query parameters | |
MCP tools, token-efficient patterns, transport options | |
Admin login, API tokens, scopes | |
Mirror stashes into a GitHub repo: setup, security | |
Docker, CI/CD, GHCR, production setup |
Development
Prerequisites: Node.js 20+ (project pins Node 26 in Docker)
git clone https://github.com/fo0/clawstash.git
cd clawstash
npm install
cp .env.example .env # adjust DATABASE_PATH / ADMIN_PASSWORD as needed
npm run dev # Next.js dev server at http://localhost:3000
npm test # vitest test suite
npm run build # production build
npm start # serve the production build
npm run mcp # MCP server (stdio transport, for local MCP client testing)See CONTRIBUTING.md for code-style rules and the PR workflow.
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/fo0/clawstash'
If you have feedback or need assistance with the MCP directory API, please join our Discord server