convez.ai
MCP ServerIntegração & APIsIntermediário
fo0

ClawStash

fo0/clawstash

Memória persistente para agentes IA com RAG dinâmico

Ver no GitHub
BomPluginScore · de 0 a 100

Servidor MCP para armazenamento persistente de agentes IA. Guarda código, configurações, notas e arquivos com busca full-text, versionamento e interface web. Ideal para agentes que precisam de memória confiável entre sessões.

Instalação

$npx convez-ai fo0/clawstash

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
1
Acompanhando
0
Saúde
85%
Último commit
há 2 dias
Versão
—
Issues abertas
17
Contribuidores
3

Casos de uso

  • Armazenar e recuperar snippets de código entre sessões do agente
  • Manter histórico versionado de configurações e documentos
  • Buscar informações estruturadas via tags e metadados
  • Backup automático de stashes em repositório GitHub

Veredito

Solução robusta de memória persistente para agentes IA via MCP. Token-eficiente, com busca full-text e versionamento — pronto para produção em OpenClaw e compatíveis.

README

A tradução para o português deste README ainda está na fila.

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 — .mmd files and inline ```mermaid blocks in Markdown render as diagrams (lazy-loaded, no bundle bloat)
  • Web GUI included — dark-themed dashboard to browse, search, and manage stashes manually

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.md

Replace 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 -d

Open http://localhost:3000 — done. Database persists in ./data/.

Change port mapping (e.g. "8080:3000") for a different port. Uncomment ADMIN_PASSWORD to protect the instance. If login fails and the logs show SQLITE_READONLY (data directory created by an older version), run sudo chown -R 1000:1000 ./data once 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-onboarding

This 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

ToolWhat it does
create_stashStore new content with files, tags, metadata
read_stashGet stash metadata + file list (content on demand)
read_stash_fileRead a single file — most token-efficient
list_stashesBrowse all stashes with summaries
search_stashesFull-text search with ranked results
update_stashUpdate existing stash content
delete_stashRemove a stash
archive_stashArchive/unarchive a stash without deleting
list_tagsList all tags with usage counts
get_tag_graphExplore tag relationships
get_statsStorage statistics
get_rest_api_specFetch the OpenAPI 3.0 schema (JSON)
get_mcp_specFetch the full MCP specification (markdown)
refresh_toolsGet latest tool specs (for connected agents)
check_versionCheck for updates

Documentation

DocContent
OpenClaw OnboardingCopy-paste prompt for full agent-driven setup
API ReferenceREST endpoints, examples, query parameters
MCP GuideMCP tools, token-efficient patterns, transport options
AuthenticationAdmin login, API tokens, scopes
GitHub BackupMirror stashes into a GitHub repo: setup, security
DeploymentDocker, CI/CD, GHCR, production setup

License

MIT

Ver o original no GitHub

Bom para

Relacionados