Connect Clawtex to Claude Code, Claude Desktop, or any MCP-compatible tool.
1. Create an account and name your agent.
2. Copy your API key from the connection screen.
3. Add the MCP server to your Claude config:
Add to ~/.claude/settings.json
{
"mcpServers": {
"clawtex": {
"command": "npx",
"args": ["-y", "@clawtex/mcp-server"],
"env": {
"CLAWTEX_API_KEY": "tkr_your_key_here"
}
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"clawtex": {
"command": "npx",
"args": ["-y", "@clawtex/mcp-server"],
"env": {
"CLAWTEX_API_KEY": "tkr_your_key_here"
}
}
}
}4. Restart Claude. State and lessons auto-load. Your agent has 9 tools for managing memory.
Clawtex adds three things to your agent. State and lessons load automatically via MCP Resources. Tools handle the rest.
State and lessons are MCP Resources. They load into your agent's context automatically when a session starts. No manual calls needed.
// Auto-loaded MCP Resources: // clawtex://state - your entities (clients, projects, goals) // clawtex://lessons - active corrections and guardrails // For a full context refresh mid-session: // Use the clawtex_bootstrap tool
Your agent logs decisions, milestones, blockers, and tasks as they happen using native tool calls.
// Your agent calls clawtex_log_event:
{
"type": "decision",
"entity": "project/my-app",
"summary": "Switched from REST to GraphQL for performance"
}Your agent writes structured state so it knows what's current at every session start.
// Your agent calls clawtex_update_state:
{
"id": "my-app",
"type": "projects",
"data": {
"name": "My App",
"status": "in progress",
"deadline": "2026-04-15"
}
}The BOOTSTRAP snippet includes rules that keep your agent structured. These are the guardrails that prevent messy data.
Clawtex analyses your event history using AI to find patterns your agent keeps repeating. It proposes lessons that you approve or reject.
Manual extraction: Click "Extract from events" on the Lessons page. AI analyses the last 7 days and proposes 1-3 lessons.
Automatic extraction: Every Monday at 9am UTC, Clawtex runs extraction for all Pro/Team users automatically. Proposals appear on your Lessons page.
Approval flow: Review each proposal. Approve to make it active (injected every session). Reject to dismiss.
Injection format: Approved lessons are returned as WHEN / DON'T / DO instructions that your agent reads at session start.
# Extract manually: curl -s -X POST https://clawtex.io/api/lessons/extract \ -H "Authorization: Bearer YOUR_KEY" # Get active lessons for injection: curl -s https://clawtex.io/api/lessons/inject \ -H "Authorization: Bearer YOUR_KEY" | jq -r .injectionBlock
When a session compacts or ends, your agent should log any remaining events and update state before context clears. The BOOTSTRAP snippet includes instructions for this.
Your agent should:
All endpoints require Authorization: Bearer YOUR_API_KEY
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/state | All entities across all types |
| GET | /api/state/:type | All entities of a type |
| GET | /api/state/:type/:id | Single entity |
| POST | /api/state/:type | Create or update entity |
| PATCH | /api/state/:type/:id | Update entity fields |
| DELETE | /api/state/:type/:id | Delete entity |
| GET | /api/events | Query events (params: days, type, entity, limit) |
| POST | /api/events | Log event (accepts optional date, time fields) |
| GET | /api/lessons/inject | Get formatted lessons for injection |
| POST | /api/lessons/extract | Extract lessons from events (Pro/Team, max 5/day) |
| GET | /api/agents | List your agents |
| GET | /api/agents/:id/ping | Validate agent connection |
{
"id": "acme-corp", // lowercase, hyphenated
"type": "clients", // plural, lowercase
"data": { // any JSON - you decide the fields
"name": "Acme Corp",
"status": "active",
"contact": "jane@acme.com"
}
}{
"type": "decision", // decision | milestone | blocker | task | note | deploy | contact
"entity": "project/my-app", // type/id reference
"summary": "Switched to GraphQL", // one sentence
"date": "2026-03-22", // optional - defaults to now
"time": "14:30" // optional - defaults to now
}{
"context": "Integrating with client APIs",
"mistake": "Assumed API version without checking",
"correct": "Always confirm API version before starting"
}| What | Format | Example |
|---|---|---|
| Entity type | plural, lowercase | clients, projects, repos |
| Entity ID | lowercase, hyphenated | acme-corp, website-rebuild |
| Entity reference | type/id | project/website-rebuild |
Clawtex works alongside your existing agent memory (Claude Code auto-memory, CLAUDE.md, etc.). It adds structured state, event history, and lessons on top.
Use Clawtex for structured data that needs to persist and be queryable across sessions. Use your existing memory for session-specific notes and preferences.
| Feature | Free | Pro | Team |
|---|---|---|---|
| Agents | 1 | 3 | Unlimited |
| Event history | 14 days | Unlimited | Unlimited |
| Dashboard | Read-only | Full access | Full access |
| AI lesson extraction | - | Yes | Yes |
| Weekly auto-extraction | - | Yes | Yes |
| API + CLI | Yes | Yes | Yes |
| Support | - | Priority | |
| Price | Free | £9/month | £24/month |
1. Remove the clawtex entry from your MCP server config.
2. Restart Claude. Your agent continues working without Clawtex.
3. Your data is retained on Clawtex for 30 days before deletion.
Clawtex never modifies your local files or agent config. It only reads and writes via the API.