Skip to main content

MCP server exposing secure, sandboxed file operations (read, write, search, replace, tree)

Project description

GIA File Tools — MCP Server

A Model Context Protocol (MCP) server that exposes secure, sandboxed file operations to AI agents.

Tools Provided (10 total)

Tool Description
read_file Read the exact content of a text or code file
read_file_summarized Read a large file from storage with context pruning to fit within token limits
write_file Create a new file or completely overwrite an existing one (atomic write)
replace_text Search-and-replace a block of text inside a file (supports fuzzy whitespace matching)
batch_replace Replace multiple blocks of text in a file in one single operation
delete_file Delete a single file
delete_directory Delete a directory and all files within it
list_directory List files and folders in a directory
search_files Grep-like search across files for a string or regex pattern
get_file_structure Recursive tree view of a directory structure

All paths are sandboxed to a root directory (set GIA_FILE_ROOT env var, defaults to cwd).

Local Development

# Install in dev mode
cd mcp/uvx
pip install -e .

# Run directly
gia-file-tools

# Test via uvx (from project root)
uvx --from ./mcp/uvx gia-file-tools

Publish to PyPI

cd mcp/uvx

# Build
pip install build
python -m build

# Upload (needs PyPI API token)
pip install twine
twine upload dist/*

After publishing, anyone can run:

uvx gia-file-tools

Use in GIA Agent System

The GenericMcp class (inheriting from ElectronAwareToolkit) is the native wrapper in the GIA backend.

from ai.functions.mcp import GenericMcp

# Connect to the published MCP server.
# The `conv_id` will automatically configure `GIA_FILE_ROOT` for a remote sandbox.
# If the user is connected via the Electron desktop app, the commands are automatically
# routed via WebSockets to execute locally on their own computer instead!
file_tools = GenericMcp(
    command="uvx",
    args='["gia-file-tools"]', 
    conv_id="abc-123-xyz",
    user=current_user
)

# All 10 tools are inherently registered and schema-aware.

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

gia_file_tools-0.1.2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

gia_file_tools-0.1.2-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file gia_file_tools-0.1.2.tar.gz.

File metadata

  • Download URL: gia_file_tools-0.1.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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}

File hashes

Hashes for gia_file_tools-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a4babd127cec92cdb658155d4ddb1fc6841740b687d8ac481bd3b26bbbc3f33d
MD5 d105f257512e135ce708e61fb7c9788c
BLAKE2b-256 dd262d1e27e8c658ffcf9365408a7014a6275f430523dd8086af8ae92a672dfc

See more details on using hashes here.

File details

Details for the file gia_file_tools-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: gia_file_tools-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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}

File hashes

Hashes for gia_file_tools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 840dc47a685d1c8f2ae510de1f0d402529b3560fa07cfa93c2714bb3784cab0e
MD5 6f8959ef8bfc56fb30338a394e45da61
BLAKE2b-256 0a8eb7fb0a728b60ebee53a9aa01c0a2888e14f91fe4866b770b8005c12b0c23

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