Skip to main content

Python SDK for Undisk MCP — undo-first versioned file storage for AI agents

Project description

undisk-mcp

[!TIP] Home: https://mcp.undisk.app Issues: https://github.com/kiarashplusplus/undisk-mcp-tracker/issues

Python SDK for Undisk MCP — undo-first versioned file storage for AI agents.

Install

pip install undisk-mcp

Quick Start

import asyncio
from undisk_mcp import UndiskClient

async def main():
    async with UndiskClient(api_key="your-api-key") as client:
        await client.initialize()

        # Write a file
        await client.write_file("hello.txt", "Hello from Python!")

        # Read it back
        result = await client.read_file("hello.txt")
        print(result.text)

        # List all files
        files = await client.list_files()
        print(files.text)

asyncio.run(main())

Features

  • Typed client with convenience methods for common MCP tools
  • Session management (automatic Mcp-Session-Id tracking)
  • Retry with exponential backoff (configurable)
  • Async-first design using httpx
  • Context manager support (async with)

API Reference

UndiskClient

client = UndiskClient(
    api_key="your-key",
    endpoint="https://mcp.undisk.app",  # default
    max_retries=3,                       # default
    timeout=60.0,                        # default
)

Methods

Method Description
initialize() Initialize MCP session
call_tool(name, args) Call any MCP tool by name
read_file(path) Read a file
write_file(path, content) Write a file
create_file(path, content) Create a new file (fails if exists)
list_files(path) List files
delete_file(path) Delete a file
move_file(from_path, to_path) Move or rename a file
search_files(pattern) Search file contents
list_versions(path) Get version history
restore_version(path, version_id) Restore a version
get_diff(path, from_version, to_version) Compare two versions
append_log(path, content) Append to a log file
close() Close the client

License

MIT

Project details


Download files

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

Source Distribution

undisk_mcp-0.46.1.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

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

undisk_mcp-0.46.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file undisk_mcp-0.46.1.tar.gz.

File metadata

  • Download URL: undisk_mcp-0.46.1.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for undisk_mcp-0.46.1.tar.gz
Algorithm Hash digest
SHA256 3e69440a438f918cf0d90a4c98606ed9b952c1af181d4f4196b141924cdd69d0
MD5 29cb7934b4f64e693785fa92e72414e8
BLAKE2b-256 373e561f210d6817a75c21e47c141da6097eb7d1d0bdf2f25c44fbb53d052089

See more details on using hashes here.

File details

Details for the file undisk_mcp-0.46.1-py3-none-any.whl.

File metadata

  • Download URL: undisk_mcp-0.46.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for undisk_mcp-0.46.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8221d825913a1819a0ea98aff1f06d83d97408986cf99ca5f7319016d03b75e2
MD5 5c67a3bd7caa497ba431e5e6bcbf3aa2
BLAKE2b-256 58422f1a545d463c81b168926dfb7b93fac44cecae0f8c9d71c3c243798dae23

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page