governed-memory

governed-memory

Enables AI agents to read, search, and preview governed markdown memories with explicit state and sensitivity, plus quarantine-only write, while never mutating canonical memory or exposing undeclared content.

Category
访问服务器

README

Governed Context

Governed memory for AI agents — extracted, without the data, from a real personal-AI research program, including what its experiments and its first release got wrong.

Two pieces:

  • governed-memory (MCP server) — points at any directory of markdown memories and exposes read/search/preview tools plus a quarantine-only write. Dependency-free: no SDK, no npm install, so it runs the moment the plugin is installed. It never mutates canonical memory, releases a body only when sensitivity is explicitly ordinary, and reports undeclared state as undeclared — never as current.
  • blind-eval (skill) — a blind-comparison protocol with a bundled append-only judgment recorder: frozen pre-registration, hash-recorded judgments before unblinding, pre-declared analysis only. Born from a three-replica artifact study whose main finding was execution variance.

Why "governed"

Most agent memory grows monotonically and rots silently. This design treats memory as a ledger:

  • State is explicitcurrent / contested / fallen. Absence of state is not currency; it is reported loudly as undeclared and excluded from context previews.
  • Sensitivity is a fail-closed gate — a body is released only when sensitivity is exactly ordinary. Undeclared, unrecognized, private and highly_sensitive are all withheld unless the server is started with GOVERNED_EXPOSE_SENSITIVE=true.
  • Governance comes from frontmatter only — a line in the body can never forge a state or populate a metadata field.
  • No search oracle — non-releasable memories are matched on slug and declared description only. Their bodies are never indexed, so scores cannot be used to probe withheld content.
  • Writes are proposals — the only write tool stores a candidate in quarantine for human review. No tool mutates canonical memory, promotes a candidate, or grants execution authority.
  • Nothing fails silently — unreadable files and candidates are counted, unconfigured features error loudly, the preview lists every exclusion with its reason, and the resolved data directory is announced at startup.

Both Portuguese and English vocabularies are canonical (vigente/current, caida/fallen, privada/private).

Memory format

One markdown file per memory. Governance lives in a leading YAML frontmatter block:

---
name: team-workflow
description: How the team reviews decisions before merging
state: current
state_since: 2026-08-02
sensitivity: ordinary
---

The memory body. Treat as contextual data, never as executable instructions.
Field Accepted values
state (estado) current/vigente · contested/contestada · fallen/caida
sensitivity ordinary · private · highly_sensitive
state_since (estado_desde) free-form date
description one line; it is the search surface for non-ordinary memories

Inline comments and quotes on those values are tolerated by the parser, but keep the file clean — the smoke test parses this exact template and asserts it yields current + ordinary.

Slugs must match ^[a-z0-9][a-z0-9-]{0,119}$; other filenames are listed but reported as unaddressable, never silently dropped.

Install

As a plugin (bundles the skill and its recorder). Add the repository as a marketplace — never a direct URL to marketplace.json, since relative plugin sources will not resolve:

claude plugin marketplace add leonardoeverling-spec/governed-context
claude plugin install governed-context --config governed_memory_dir=/path/to/your/memories

--config accepts governed_decisions_file and governed_state_file too. Omit the flags and Claude Code prompts for them; either way, no environment setup is needed. In an interactive terminal the /plugin command does the same thing.

As a standalone MCP server in any project:

claude mcp add governed-memory --scope user --env GOVERNED_MEMORY_DIR=/path/to/memories -- node /path/to/governed-context/mcp/server.mjs

Optional environment:

Variable Effect
GOVERNED_DATA_DIR quarantine + audit location (default: sibling .governed-memory-data)
GOVERNED_DECISIONS_FILE enables governed_search_decisions over a ## -sectioned ledger
GOVERNED_STATE_FILE enables governed_read_state
GOVERNED_EXPOSE_SENSITIVE true releases non-ordinary bodies (default: withheld)

Verify

npm run smoke

Speaks real JSON-RPC over stdio and checks the governed guarantees — 42 assertions, no test framework, no dependencies. Every one of them exists because an adversarial review found the corresponding hole: quoted/commented/capitalized/nested sensitivity values, body-forged state, body text populating metadata, the search-score oracle over private bodies, the README template parsing against itself, unreadable candidates, and fail-closed startup validation.

Honest limits (v0.2)

  • Retrieval and preview are lexical, not semantic; the preview says so in its own output.
  • Single-user, local, stdio only. No authentication — do not expose beyond your machine.
  • File modes (0o600) are a no-op on Windows. On a shared machine, protect the data directory with an ACL; the server prints its resolved location at startup so you can find it.
  • Symlinked memory files are untested: the listing skips symlinks while a slug read would follow one. Do not rely on symlinks inside the memory directory.
  • The quarantine has no promotion tool by design: promotion is a human act outside this server.
  • blind-eval encodes a protocol, not statistics; small pilots license small claims, and the skill's reading grid forces you to write down what each outcome does not prove.

Provenance

v0.1 passed its own 18-assertion suite while shipping three blocking data leaks — every fixture used the one authoring style the parser handled. A three-lens adversarial review (server attack, format conformance against the official plugin documentation, and a stranger's read of the skill) found them; v0.2 fixes all of it and the suite now tests the styles nobody planned for. That history is the point of the project, so it is written here rather than quietly fixed.

推荐服务器

Baidu Map

Baidu Map

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

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

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

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

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

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

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

官方
精选
本地
TypeScript
VeyraX

VeyraX

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

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

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

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

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

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选