Skip to main content

klark-local-file-ops-mcp

Local stdio MCP companion that lets your coding agent upload files from your machine into KLARK. Pairs with the remote KLARK platform MCP — the remote side reserves an upload slot, this local side streams the bytes.


Use with Claude Code

1. Install uv

uvx (ships with uv) fetches this MCP on first call and caches it. No per-project install step.

brew install uv
# or: curl -LsSf https://astral.sh/uv/install.sh | sh

2. Add the MCP to your project

Create .mcp.json at the root of your project:

{
  "mcpServers": {
    "klark-local-file-ops-mcp": {
      "command": "uvx",
      "args": ["klark-local-file-ops-mcp"]
    }
  }
}

Commit this file if you want teammates to pick up the same setup.

3. Restart Claude Code

Close and reopen your Claude Code session. On first launch you'll see:

"A new MCP server klark-local-file-ops-mcp is configured in .mcp.json. Approve?"

Say yes. Claude Code runs uvx klark-local-file-ops-mcp, which fetches the package from PyPI and starts the stdio server.

4. Try it

In the Claude Code chat, ask:

Upload ~/Desktop/logo.png to KLARK and show me the file ID

Claude Code will call:

  1. klark_platform.begin_upload → reserves an Azure upload slot, returns a scoped SAS URL
  2. klark-local-file-ops-mcp.upload_local_file_via_session → streams your file to the SAS URL
  3. klark_platform.finalize_upload → registers the file in KLARK Drive, returns a drive_file_id

You'll see the drive_file_id in the reply and can reference the file in later turns (show me that file, attach it to …).


The remote KLARK MCP is a prerequisite

This package is the local half of a pair. The remote half — klark_platform — must also be configured in Claude Code. If KLARK is already wired into your setup (e.g., by your admin), begin_upload and finalize_upload are already there. If not, add it alongside:

{
  "mcpServers": {
    "klark_platform": {
      "type": "http",
      "url": "<KLARK_AI_URL>/klark-mcp/mcp",
      "headers": { "Authorization": "Bearer <YOUR_TOKEN>" }
    },
    "klark-local-file-ops-mcp": {
      "command": "uvx",
      "args": ["klark-local-file-ops-mcp"]
    }
  }
}

Ask your KLARK admin for the URL and a bearer token.


Use with Codex

codex mcp add klark-local-file-ops-mcp -- uvx klark-local-file-ops-mcp

The prerequisite (klark_platform) and the upload flow are the same.


Tools

Tool Purpose
inspect_local_file(path) Stat a local file before upload — returns existence, size, sniffed content type, readability.
upload_local_file_via_session(path, upload_target) Streams the local file to the SAS URL carried in upload_target (minted by klark_platform.begin_upload). Enforces contract_version.

Both tools are stateless. They read local files; they do not write, move, or delete anything on your machine.


Troubleshooting

"A new MCP server … Approve?" never appears You're on an older Claude Code. Update (npm update -g @anthropic-ai/claude-code) and restart.

uvx: command not found uv isn't installed or isn't on PATH. brew install uv, then restart Claude Code.

CONTRACT_VERSION_MISMATCH at upload time Your KLARK backend and this package are on incompatible versions. Upgrade: uv cache prune and restart Claude Code so uvx re-fetches the newest release.

LOCAL_FILE_NOT_FOUND The agent used a bad path. Paths must be absolute and readable by your user account.


Alternate install paths

If uvx doesn't fit your workflow:

# Pinned install (offline-friendly)
pipx install klark-local-file-ops-mcp
# then in .mcp.json use: "command": "klark-local-file-ops-mcp"

# Direct module run (for development)
python -m klark_local_file_ops_mcp

License

KLARK Inc. Proprietary — see LICENSE. For licensing inquiries: aker@useklark.com.

Release files for klark-local-file-ops-mcp 0.2.1

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

Source distribution (sdist)

Source distribution for klark-local-file-ops-mcp 0.2.1
File Size Uploaded
klark_local_file_ops_mcp-0.2.1.tar.gz 17.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for klark-local-file-ops-mcp 0.2.1
File Interpreter ABI Platform
klark_local_file_ops_mcp-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.9 kB

Release files / klark_local_file_ops_mcp-0.2.1.tar.gz

Download URL klark_local_file_ops_mcp-0.2.1.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
471f02ad8e8123690082f8873258d9c1381a567b303f1801ce3587d0f7311b90
BLAKE2b-256 checksum
How to use checksums
668d3459da63b7957779fc2ed45f993fe3ace545777c96cd09e79270c60b5d50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / klark_local_file_ops_mcp-0.2.1-py3-none-any.whl

Download URL klark_local_file_ops_mcp-0.2.1-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db99e1cc4cb54593201b0a879667f8a6fce8fb212bfd316af98eb7dd10640578
BLAKE2b-256 checksum
How to use checksums
eaa74d53398f55b5007c10913e2ca92d2df4a126d45abf21c9b0bfd33d9cee27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.1.0

2 release 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