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 tools support directory browsing, recursive filename and content search, paged reads, exact-text edits, history, writes, appends, and deletion. See the tool contract for parameters, limits, examples, and the 0.6 upgrade notes. 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.

Development

With uv installed and Docker running, uv sync --locked followed by uv run python -m devtools.postgres runs the complete test suite against a disposable PostgreSQL instance. No manually managed database is needed. The optional agent eval harness measures real model task success, tool usage, and saved state, with local reports and opt-in Logfire experiments.

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.

The package ships schema migrations; the host applies them during deployment. See database migrations and upgrades for the standalone agent-filetree-memory-migrate command and integration with an existing Alembic environment.

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 separate workspace-creation and platform-administrator permissions, 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. Eligible users create workspaces as owners, invite teammates, and create agent memories. Joined workspaces do not consume their creation quota.

License

Apache License 2.0. See LICENSE.

Metadata

Release files for agent-filetree-memory-mcp 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-filetree-memory-mcp 0.6.2
File Size Uploaded Provenance Actions
agent_filetree_memory_mcp-0.6.2.tar.gz 508.6 kB With provenance Details for agent_filetree_memory_mcp-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-filetree-memory-mcp 0.6.2
File Interpreter ABI Platform Actions
agent_filetree_memory_mcp-0.6.2-py3-none-any.whl Python 3 none any Details for agent_filetree_memory_mcp-0.6.2-py3-none-any.whl

Total release size: 779.6 kB

Release files / agent_filetree_memory_mcp-0.6.2.tar.gz

Download URL agent_filetree_memory_mcp-0.6.2.tar.gz
Size 508.6 kB
Tags Source
SHA-256 checksum
How to use checksums
94e3f55cc7cadbc24fcdd340b35adbef5974e2be2ed889805b9c78c25f5ca41c
BLAKE2b-256 checksum
How to use checksums
80480b40a89850cc37612fd91862242845a44f2af685190ecfb449d674d57be9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Release files / agent_filetree_memory_mcp-0.6.2-py3-none-any.whl

Download URL agent_filetree_memory_mcp-0.6.2-py3-none-any.whl
Size 271.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50ffa9c1f70a9495fb2de00bafd895ed0962f61a851cb11cc0ea4461f2b88ab9
BLAKE2b-256 checksum
How to use checksums
657ebc62bde5b91c834a9dfd84a3a274b8e0c5b384ce677bad0b4cd4d063b951
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Security for agent-filetree-memory-mcp 0.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agent_filetree_memory_mcp-0.6.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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