clawstashCAUTION
AI-optimized stash storage — dynamic RAG for agents. Store, search, and retrieve docs, code, and data on demand via MCP or REST API.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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; the last 200 snapshots per stash are kept (
STASH_VERSION_LIMIT,0= keep everything — what gets deleted, and when) - Duplicate a stash — open any stash as a pre-filled new one and use it as a template
- Import files from disk — drop text files onto the editor (or pick them) to add them as file rows, instead of copy-pasting each one
- 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) - One-click code copy — every fenced code block in rendered Markdown gets a copy button (keyboard reachable, always visible on touch)
- Maximize a file — blow any one file of a stash (HTML preview, Mermaid diagram, Markdown, code) up to fill the screen; the Restore button or a backdrop click restores it, Esc too once focus is outside the HTML preview
- Web GUI included — dark-themed dashboard to browse, search, and manage stashes manually, with a resizable sidebar that reme
134e4d7bc342OBSERVED · 2026-10-11Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add clawstash --env ADMIN_PASSWORD=${ADMIN_PASSWORD} -- npx -y [email protected]{
"mcpServers": {
"clawstash": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"ADMIN_PASSWORD": "${ADMIN_PASSWORD}"
}
}
}
}Exposed tools (16)
15 read · 1 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
Alpha | read | first |
Backup | write | GitHub backup configuration and sync |
First | read | |
Hello | read | desc |
Notes | read | |
Second | read | |
Stash | read | |
Stashes | read | Stash CRUD operations |
System | read | System endpoints |
Tokens | read | API token management |
changed | read | new-desc |
list_stashes | read | List stashes |
n | read | d |
name-v1 | read | desc-v1 |
original | read | orig-desc |
unrelated | read | random |
Trust audit
CAUTIONgrade B · trust 83/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (3 observation(s))
- Network
- declared (8 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
'oauth_application[callback_url]': 'http://localhost',
CMD node -e 'fetch("http://127.0.0.1:"+(process.env.PORT||3000)+"/api/health").then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))'const token = 'ghp_supersecret_value';
.git-blame-ignore-revs
.prettierignore
.prettierrc.json
import nextConfig from '../../next.config';
import App from '../../App';
import ErrorBoundary from '../../components/ErrorBoundary';
import type { StashListItem } from '../../types';import type { StashListItem } from '../../types';const bin = atob(s);
@modelcontextprotocol/sdk, adm-zip, archiver, better-sqlite3, diff, marked, mermaid, next
| 48 | 2026-03-19 | 2026-05-23 | Code Smells | src/server/auth.ts + src/app/api/\_helpers.ts | Already unified — `requireAdmi
- **BREAKING — MCP tools are now scope-gated.** `POST /mcp` checked the `mcp` scope and nothing else, and the tools themselves checked nothing at all, so a token holding **only** `mcp` could call `cre
- **Module layout:** `github-client.ts` (device flow + REST + Git Data), `backup-service.ts` (sync engine: hash diff, commit planning, LWW retry on 422), `backup-scheduler.ts` (globalThis-singleton: i
- **The token never leaves the server.** API responses only carry a `tokenSet` flag and the connected account login; error messages and the sync log are redacted (explicit token value plus anything ma
SESSION=$(curl -s -X POST http://<HOST_OR_IP>:<PORT>/api/admin/auth \
**Migration.** Affected: any agent whose token carries `mcp` but not `write` (or not `read`) — its tool calls now fail with the scope error instead of succeeding. Fix: create a new token with the scop
| `admin` | Full access including token management (implies all) |
operator's own privileges, so it runs with full access, as before.
**Migration.** Affected: any agent whose token carries `mcp` but not `write` (or not `read`) — its tool calls now fail with the scope error instead of succeeding. Fix: create a new token with the scop
This starts the Next.js development server on port 3000 with both the frontend and API routes. Without a `.env` the app falls back to port 3000, `./data/clawstash.db` and open admin access; see [`.env
- **Open mode** (default) — no `ADMIN_PASSWORD` set, all features accessible without login
The stdio process does **not** read `.env`: Next.js loads that file for `npm run dev` /
Gates applied: no_behavioural_pass.
134e4d7bc342full audit observations/trust-audit/mcp-server/fo0__clawstash.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-11 | 134e4d7bc342 | CAUTION | B | 83 | first audit |
Questions
What is the clawstash MCP server?
AI-optimized stash storage — dynamic RAG for agents. Store, search, and retrieve docs, code, and data on demand via MCP or REST API.
What tools does clawstash expose?
16 in total: 15 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is clawstash safe to connect to an agent?
With care. The audit graded it B (83/100) and found 25 things worth knowing before you trust this server, listed below with the exact line each was found on.
What credentials does clawstash need?
It reads ADMIN_PASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does clawstash run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as clawstash at 1.0.0.
How current is this page?
The grade is for one exact copy of the source (134e4d7bc342), read on 2026-10-11. The repository is watched and re-audited when it changes.