uctx

uctx

A local, user-owned memory MCP server that allows AI agents to share context via a SQLite file you own.

Category
访问服务器

README

uctx — your context, not the vendor's

A local, user-owned memory that you fill once and every AI agent can read.

Today each assistant keeps its own siloed memory. Tell Claude you prefer Python; ChatGPT still has no idea. uctx is a tiny MCP server backed by a local SQLite file you own — so the same context is readable and writable by any MCP-enabled agent (Claude Desktop, Cursor, …).

No cloud. No account. The data is a file on your machine (~/.uctx/context.db).

   Claude Desktop ┐
                  ├──► uctx (MCP server) ──► ~/.uctx/context.db   ← you own this
   Cursor        ┘

The 30-second demo

  1. In Claude Desktop: "Remember that I prefer Python, tabs over spaces, and I'm learning agentic frameworks." → it calls save_context.
  2. In Cursor (or a fresh Claude chat): "What do you know about my coding preferences?" → it calls search_context and answers correctly.

Two different agents, one shared memory you control. That's the whole idea.

Or run the demo right now (no agent setup)

uv sync
uv run python examples/two_agents_demo.py
Agent A = 'claude-desktop'  — saves what the user tells it:
  [claude-desktop] save_context('Prefers Python, tabs over spaces') -> Saved context #1
  [claude-desktop] save_context('Based in Boston')                  -> Saved context #2
  [claude-desktop] save_context('Learning agentic frameworks')      -> Saved context #3

---- Switch apps. Brand-new agent, same local store, no shared chat. ----

Agent B = 'cursor'  — recalls it without ever seeing the above:
  [cursor] search_context('coding')
        -> #1 [preference] Prefers Python, tabs over spaces  ·tags: coding style  ·from claude-desktop
=>  Two different agents. One context you own.

Two separate MCP clients, one local store — the cross-app share, proven in one command.

Install (two commands)

Requires uv (Python 3.10+).

uv tool install git+https://github.com/tmeng7777/uctx.git   # installs the `uctx` command
uctx setup                                                  # auto-wire Claude Desktop + Cursor

uctx setup detects your MCP clients, backs up their configs, and adds the uctx server — no hand-editing JSON. Then restart the app(s) to load the tools.

Just want to try it without installing? uvx --from git+https://github.com/tmeng7777/uctx.git uctx web.

The uctx command:

uctx                        run the MCP server (what your agents call)
uctx setup [claude|cursor]  wire uctx into your AI clients
uctx web                    open the local dashboard
uctx sync [set|pull|push]   sync your context across devices

Manual config (fallback)

If you'd rather edit JSON, add this to Claude Desktop's claude_desktop_config.json (Settings → Developer → Edit Config) or Cursor's ~/.cursor/mcp.json:

{ "mcpServers": { "uctx": { "command": "uctx", "args": [] } } }

Web UI — see & manage your context

uctx web UI preview

A local dashboard for the same store your agents use — view, search, add, edit, and delete anything, so you can see what's been remembered about you (and change what shouldn't be).

uv run uctx-web        # then open http://127.0.0.1:8787

Reads/writes the same ~/.uctx/context.db. Localhost-only, single-user.

Sync — your context on every device (you own the file)

Point uctx at a folder your own cloud already syncs (Dropbox, iCloud Drive, Google Drive) or a git repo. Your context travels with you — and you hold the file, not a uctx server.

uctx-sync set ~/Dropbox/uctx     # once, per machine
uctx-sync                        # pull others' changes in, push yours out

Each machine keeps its own fast local SQLite store and shares a portable context.jsonl snapshot through the folder. (We sync JSONL, not the raw .db, because cloud tools corrupt live SQLite files — this stays safe, human-readable, and git-diffable.)

v0 limitation: sync is additive/union and dedupes by content — edits and deletes don't propagate yet. That needs stable per-item UUIDs + tombstones (roadmap). Encryption of the synced file (so the provider can't read it) is the planned next step.

Tools

Tool What it does
save_context(content, type, tags, source_app) Remember a preference / fact / note
search_context(query, limit) Keyword-search saved context
list_context(limit) List everything, most recent first
forget_context(item_id) Delete one item

The v0 schema (small on purpose)

{
  "id": 1,
  "type": "preference | fact | note",
  "content": "Prefers Python, tabs over spaces",
  "tags": "coding style",
  "source_app": "claude-desktop",
  "created_at": "2026-07-19T..."
}

source_app + created_at are the seed of provenance — so trust and versioning can be added later without a migration.

Deliberately NOT in v0 (the roadmap)

These are the genuinely hard parts, and they come only if people actually use v0:

  • Semantic search (embeddings) instead of keyword LIKE
  • Provenance / signing — verify who wrote a memory
  • Temporal validity — facts that expire or get superseded
  • Access control — per-app read/write scopes, revocation
  • Multi-user / identity

Why local-first

Portable, user-owned context is something the big labs are structurally disinclined to build — your memory is their lock-in. uctx keeps the data in a file you own, and moves it between vendors instead of trapping it inside one.

Status

Early prototype. Built to find out one thing: does anyone actually reach for this once the novelty wears off? If that's you — open an issue and tell me what you'd want next.

MIT licensed.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选