Skip to main content

Agent Filetree Memory MCP

PyPI version Python versions PyPI status License

Agent Filetree Memory MCP is a framework-neutral memory service for agents. It stores a simple virtual Markdown file tree in PostgreSQL while keeping paths and document content encrypted at rest.

The project is designed around four boundaries:

  • The host verifies a short-lived capability and selects the workspace and durable agent profile. Models and UI components cannot choose or widen those identifiers.
  • Every document and directory version is immutable and encrypted with a fresh AES-256-GCM data key.
  • PostgreSQL is injected through an async SQLAlchemy session factory. Standalone users may construct one from a static database URL; hosting platforms may supply their own credential-aware factory.
  • MCP is an adapter. The application service can also be embedded directly in another Python service.

The headless tool surface is intentionally small: list, read, history-list, history-read, write, append, and delete. History metadata and historical content use separate capabilities. Writes use compare-and-swap versions and idempotency keys. Delete denies access immediately and makes encrypted data eligible for hard deletion after its configured retention window. The host must run the packaged janitor; the request-serving process does not schedule cleanup itself.

Status

This project is an early alpha. APIs, migrations, and data formats may change before 1.0.

Installation

Add the complete package to a uv-managed project:

uv add 'agent-filetree-memory-mcp[all]'

Or install its standalone commands in an isolated environment:

uv tool install 'agent-filetree-memory-mcp[all]'

The base package contains the framework-neutral domain and application layers. The postgres, mcp, app, and web extras are available for narrower integrations. See the standalone guide for database setup, security-sensitive configuration, and server startup.

Intended package layers

  • agent_filetree_memory.domain: dependency-light identifiers, paths, results, and errors.
  • agent_filetree_memory.application: authorization-first memory operations.
  • agent_filetree_memory.crypto: envelope encryption and pluggable data-key providers.
  • agent_filetree_memory.postgres: PostgreSQL persistence and packaged Alembic migrations.
  • agent_filetree_memory.control_plane: optional workspaces, durable agent profiles, membership, private-by-default workspace-read policies, independent management/content grants, and audit.
  • agent_filetree_memory.mcp: headless MCP tools.
  • agent_filetree_memory.mcp_app: an optional current-capability browser and editor.
  • agent_filetree_memory.web: the version-matched management API composition and bundled React UI.

Version history and attribution

Every retained document version has a canonical version_created_at timestamp. memory_history_list returns retained versions newest first without returning their Markdown; its metadata includes the caller-supplied change comment, so a host should still treat that capability as potentially sensitive. memory_history_read returns one retained version and can also produce a unified line diff by accepting compare_to_version. Pagination and retention are bounded; history is not an unbounded event log.

Writes and appends may include an optional change_comment and up to eight opaque co_authored_by identifiers. Version responses distinguish the two attribution levels:

  • committed_by identifies the authenticated principal whose verified capability committed the version and carries verification: "authenticated";
  • each co_authored_by entry is caller-declared and explicitly carries verification: "self_asserted".

Authenticated here means that principal's authorization was used. It does not prove who drafted, typed, or approved the Markdown. The optional change comment is also caller-supplied text, not verified attribution. Versions created before this metadata format remain readable and return unavailable attribution as null/empty values. Current list/read payloads retain updated_at as a compatibility alias for version_created_at.

Security properties

The service authorizes before storage lookup or decryption. Missing and unauthorized documents share the same public failure shape. Database rows contain opaque routing, authorization, version, and lifecycle fields; human-readable paths, titles, tags, snippets, Markdown, and directory manifests are encrypted.

See SECURITY.md for the threat model and disclosure guidance. See docs/authentication.md for the two-layer transport and durable agent-identity design. See docs/standalone.md for running the packaged stdio server and retention janitor from a static PostgreSQL URL. See docs/management-ui.md for mounting the bundled administrative UI with a host-supplied identity dependency.

The optional control plane is provider-neutral. Hosts inject verified principals, including a platform-administrator boolean, and may inject an external workspace-entitlement resolver. Platform administrators can inventory workspace metadata and create workspaces, but must explicitly take a workspace role before agent slugs become visible. Workspace administration and explicit agent management never imply content access or decryption. An agent may be explicitly shared read-only with its workspace; individual grants still control editing and deletion.

License

Apache License 2.0. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_filetree_memory_mcp-0.5.0.tar.gz (328.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_filetree_memory_mcp-0.5.0-py3-none-any.whl (252.8 kB view details)

Uploaded Python 3

File details

Details for the file agent_filetree_memory_mcp-0.5.0.tar.gz.

File metadata

File hashes

Hashes for agent_filetree_memory_mcp-0.5.0.tar.gz
Algorithm Hash digest
SHA256 81b9cc98e57a8c3bb4146a51a3cdc6af530fff740e091b3678ca5e1d70f3e25f
MD5 2ef528d385790014f7deed72672f885f
BLAKE2b-256 b34025397bb7f9fb34baa13858d7f5fc024e82e899349ce0a28ba6d62fea4045

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_filetree_memory_mcp-0.5.0.tar.gz:

Publisher: publish.yml on EmilioEsposito/agent-filetree-memory-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_filetree_memory_mcp-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_filetree_memory_mcp-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a099a0b5375caeda8e55efa3fe41d02a95a315e076b32b0474ca125c32598fed
MD5 4ff64e49304670c4c771a76b17d33d69
BLAKE2b-256 1c1917136684480d68770bb74d54993e9062caf4dda574a765dbab5f12fb814f

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_filetree_memory_mcp-0.5.0-py3-none-any.whl:

Publisher: publish.yml on EmilioEsposito/agent-filetree-memory-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.1

2 files

This release

0.5.0 This release

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page