structured.sh

by structured-sh

Not rated
GitHub

About

Self-hosted MCP server for persistent agent memory. Define typed schemas, write records, and query with SQL via DuckDB against Parquet files on disk.

Details

Author
structured-sh
Categories
AI, Database, Other, Knowledge Base

Setup

Install structured.sh in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/structured-sh/structured

Follow the installation instructions in the repository README, then restart your MCP client.

■ structured
schema-native memory for AI agents

structured.sh·Quick Start·Connect to Claude·MCP Tools·API Reference·Deploy

Define schemas. Write structured data. Query with SQL. All as Parquet files you own.

Structured gives AI agents (and humans) persistent, queryable memory:
- Define a memory— name + typed schema (like a table)
- Write records— buffered and auto-flushed to Parquet files
- Query with SQL— DuckDB runs directly against the Parquet files
- Own your data— everything is local files on disk, no vendor lock-in

Works with Claude Desktop, Cursor, Windsurf, Cline, or any MCP-compatible client.

┌──────────────────────────────────────────────────────┐ │ docker compose up │ │ │ │ ┌──────────┐ ┌──────────────┐ ┌────────────┐ │ │ │Dashboard │ │ REST API │ │ MCP Server │ │ │ │ :3000 │───▶│ :3001 │◀───│ stdio │ │ │ │ │ │ │ │ │ │ │ │Vite+React│ │ Hono + WASM │ │ 9 tools │ │ │ └──────────┘ │ │ └────────────┘ │ │ │ SQLite (sql.js) │ │ │ DuckDB (wasm) │ │ │ Parquet (tiny-parquet) │ │ └──────┬───────┘ │ │ │ │ │ ./data/ │ │ ├── structured.db ← metadata │ │ └── parquet/ ← your data │ │ ├── user_prefs/ │ │ │ └── 2026/04/09/...parquet │ │ └── campaign_data/ │ │ └── 2026/04/09/...parquet │ └──────────────────────────────────────────────────────┘

Zero native dependencies.Everything runs in WASM — no C++ builds, no platform issues.

git clone https://github.com/structured-sh/structured.git cd structured

Editdocker-compose.ymland set your credentials:

environment: - API_KEY=your-secret-api-key # Used by MCP clients & scripts - DASHBOARD_PASSWORD=your-password # Protects the dashboard UI

- API_KEY— machine auth for MCP clients, scripts, and analytics ingestion
- DASHBOARD_PASSWORD— human auth for the web dashboard. Leave unset to disable login (local-only use).

curl -X POST http://localhost:3001/memories \ -H "Authorization: Bearer your-secret-api-key" \ -H "Content-Type: application/json" \ -d '{ "name": "user_preferences", "fields": [ { "name": "key", "type": "string" }, { "name": "value", "type": "string" }, { "name": "priority", "type": "int32" } ], "description": "User preference settings" }'
curl -X POST http://localhost:3001/memories/user_preferences/write \ -H "Authorization: Bearer your-secret-api-key" \ -H "Content-Type: application/json" \ -d '{ "data": [ { "key": "theme", "value": "dark", "priority": 1 }, { "key": "language", "value": "en", "priority": 2 } ] }'
curl -X POST http://localhost:3001/query \ -H "Authorization: Bearer your-secret-api-key" \ -H "Content-Type: application/json" \ -d '{ "sql": "SELECT  FROM user_preferences ORDER BY priority" }'

Memory names work as table names — DuckDB resolves them to Parquet files automatically.

# Files on disk ls ./data/parquet/user_preferences/ # DuckDB CLI duckdb -c "SELECT  FROM read_parquet('./data/parquet/user_preferences//.parquet')" # Python import duckdb duckdb.sql("SELECT  FROM './data/parquet/user_preferences//.parquet'").show()

Add to~/Library/Application Support/Claude/claude_desktop_config.json:

{ "mcpServers": { "structured": { "command": "docker", "args": ["exec", "-i", "structured-mcp", "node", "index.js"] } } }

ForCursor, add to Settings → Features → MCP Servers:

{ "structured": { "command": "docker", "args": ["exec", "-i", "structured-mcp", "node", "index.js"] } }

Coming soon — hosted version atstructured.sh

{ "mcpServers": { "structured": { "command": "npx", "args": ["-y", "@anthropic-ai/mcp-proxy", "https://mcp.structured.sh"] } } }

Once connected, just talk naturally. The AI picks the right tool.

Use the templates intemplates/to send events from external systems:

// Example: track an install from your iOS app import { track } from './templates/ingest-app-analytics.js'; await track('install', 'user_abc', { platform: 'ios', app_version: '1.0.0' });
SELECT event, COUNT() as n, COUNT(DISTINCT user_id) as users FROM app_events WHERE timestamp > now() - INTERVAL '30 days' GROUP BY event ORDER BY n DESC

Records rejected bystrictorevolveschema modes arenot dropped— they're automatically written to_dlq_{memory_name}for inspection:

-- See what was rejected and why SELECT _reason, _payload, _rejected_at FROM _dlq_app_events ORDER BY _rejected_at DESC LIMIT 20

Rotate your API key at any time from the dashboardConnectpage without restarting:
- Go toConnectAPI Keysection
- ClickRotate Key
- Copy the new key (shown once)
- Update your MCP config and any scripts

Only 7 npm packages. No native addons — everything runs in WASM or pure JS.

Because everything runs in WASM, there are no C++ builds, nonode-gyp, no platform-specific binaries. The Docker image works on any architecture Docker supports.

# Local dev (no Docker) cd api && npm install && node index.js cd dashboard && npm install && npm run dev # Full stack docker compose up --build

Built withtiny-parquet· Powered byDuckDB·structured.sh

Perseus Vault is a single Rust binary that gives AI agents durable memory across sessions. One binary. One file. No Docker. No Postgres. No cloud. Just persistent memory that works with any MCP host.

Official MCP server for dbt (data build tool) providing integration with dbt Core/Cloud CLI, project metadata discovery, model information, and semantic layer querying capabilities.

Engram is a hosted MCP server that provides reliable memory for AI agents:

Self-hosted MCP memory server for personal use and teams

Agent memory with git-like version control. Custom LLMs turn conversations into structured facts with automatic conflict detection - your agent sees how decisions evolved, not four contradictory text blobs. 80% token reduction vs RAG/graph systems. MCP + REST.

Query and analyze data with MotherDuck and local DuckDB

A collection of tools for managing the platform, addressing data quality and reading and writing to Teradata Database.

Persistent memory, teams, and projects for AI agents. 76 MCP tools for storing, recalling, and sharing knowledge across sessions.

A read-only MCP server for Avro data sources, powered by the CData JDBC Driver.

Run SQL queries on data in Amazon S3 using AWS Athena.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.