Skip to main content

filekeeper-mcp

The Model Context Protocol server for Filekeeper. It is a thin adapter: every tool delegates to the filekeeper Core library, so an operation behaves identically whether it arrives through the CLI or through MCP.

This is a separate distribution. pip install filekeeper-cli installs only Core and the keeper CLI and never pulls the MCP SDK. pip install filekeeper-mcp installs both.

Install and run

uv tool install filekeeper-mcp     # or: pip install filekeeper-mcp
filekeeper-mcp --root ~/project

The transport is STDIO. There is no network listener in this release, and no option that binds a socket.

Start-up options:

Option Meaning
--workspace NAME serve a registered workspace by name or id
--root PATH serve a directory as a transient workspace (nothing registered)
--home PATH Filekeeper home directory; defaults to FILEKEEPER_HOME or the user data dir
--actor NAME identity recorded on every mutation (optional audit metadata)
--task-id ID optional external task identifier recorded on every mutation
--log-level LEVEL debug, info, warning (default), error, critical; stderr only

--workspace and --root are mutually exclusive. Selection precedence is the same as the CLI: explicit name, explicit root, then the configured default, then the single registered workspace. The server never guesses between several.

Allowed roots come from start-up configuration only. No tool argument can widen the workspace, register a workspace, or point the server at another tree.

Example host configuration:

{
  "mcpServers": {
    "filekeeper": {
      "command": "filekeeper-mcp",
      "args": ["--root", "/home/me/project", "--actor", "editor"]
    }
  }
}

Tools

Read-only:

workspace_list, workspace_info, file_read, file_read_many, directory_list, file_info, file_search, content_search, history_list, history_get, history_diff.

Mutating:

file_create, file_write, file_copy, file_move, file_delete, directory_create, directory_delete, file_replace_text, file_replace_lines, file_insert_lines, file_delete_lines, file_apply_patch, undo_operation, undo_last.

Conventions that hold for every tool:

  • Paths are workspace-relative. Absolute paths are accepted only when they resolve inside the selected workspace.
  • Line numbers are 1-based and inclusive. Out-of-range references are refused, never clamped. End-of-file insertion is position: "end".
  • Every mutating tool returns the Core operation_id and undo_available. operation_id is null for a dry run.
  • expected_hash (whole file, from file_info or file_read) and expected_content (the exact text of the edited region) are the guards. Pass at least one on content you did not just read.
  • dry_run validates every guard and writes nothing. It is available on every mutating tool.
  • file_replace_text requires an explicit match policy, "first" or "all", and reports the matching stage (exact or normalised) in its result.
  • i_accept_secret_write_risk is the only way past the credential-shaped write refusal. The override records a warning in the result.
  • Destructive tools (file_delete, directory_delete, file_apply_patch and the no-undo-free content replacements) state their scope in their description and never operate outside the selected root. Recursive directory deletion requires both recursive and confirm_recursive.

Every tool carries MCP annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) that describe what it actually does. A whole file write is not read-only and not idempotent; a directory create is additive; readers are read-only and idempotent.

Limits

The adapter refuses oversized requests instead of truncating them silently:

Bound Value
paths in file_read_many 32
patch size 1 MiB
requested search results 200
requested directory entries 1000
requested history entries 200

Core's own configurable limits (max_read_bytes, max_write_bytes, max_search_results, max_directory_entries, max_recursion_depth) still apply and are described in the main README. A bounded result reports truncated rather than pretending to be complete.

Errors

Failures are structured data, never a stack trace:

{
  "ok": false,
  "error": {
    "code": "CONTENT_CONFLICT",
    "message": "file content changed since it was read; refusing to overwrite",
    "retryable": false,
    "details": {
      "path": "notes.txt",
      "expected_hash": "sha256:...",
      "actual_hash": "sha256:...",
      "recovery": "re-read the target, then retry against its current hash"
    }
  }
}

The envelope is the same one the CLI emits: a failure document has exactly ok and error at the top level, and error has exactly code, message, retryable and details. The caller's own path is in error.details.path; server-side host paths are not preserved. retryable describes the identical request, so a stale hash is false: the caller must re-read the target and write against its current hash.

Not in this release

Advisory locks, user-facing snapshots and restore, batch execution, file watching, HTTP transport, redo, and binary/media reads are deferred. They are not half-implemented and not advertised as tools.

Dependency pin

The server is built and tested against mcp>=2.3,<3. The SDK's server API changed between 1.x and 2.x, so the major version is pinned; see docs/decisions.md in the repository for the reasoning.

License

MIT. See LICENSE.

Metadata

Release files for filekeeper-mcp 0.1.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 filekeeper-mcp 0.1.2
File Size Uploaded Provenance Actions
filekeeper_mcp-0.1.2.tar.gz 14.8 kB With provenance Details for filekeeper_mcp-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for filekeeper-mcp 0.1.2
File Interpreter ABI Platform Actions
filekeeper_mcp-0.1.2-py3-none-any.whl Python 3 none any Details for filekeeper_mcp-0.1.2-py3-none-any.whl

Total release size: 32.6 kB

Release files / filekeeper_mcp-0.1.2.tar.gz

Download URL filekeeper_mcp-0.1.2.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9973154840f9c392f8c520f8468bbb1c721b6e77238e2fef25645999c2107f2e
BLAKE2b-256 checksum
How to use checksums
99584ddec6d06afb56077010058e9d5599323d91ee6a01733a7366039dae3512
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 31, 2026.

Transparency log

Release files / filekeeper_mcp-0.1.2-py3-none-any.whl

Download URL filekeeper_mcp-0.1.2-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2332c8053e73eeb8c2a422b497e33c8d4d96116ce60419d8b2a60f1a8940ab7
BLAKE2b-256 checksum
How to use checksums
339ed4c222efaf67cc9a2fdd8e16d6902460a54b0a9fd4df697aac7495d1d61d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 31, 2026.

Transparency log

Security for filekeeper-mcp 0.1.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 filekeeper_mcp-0.1.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 Oct 31, 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