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

Tool Description
read_file Read a file's content
write_file Create or overwrite a file (atomic writes)
replace_text Search-and-replace with fuzzy whitespace matching
list_directory List files and folders
search_files Grep-like search across files
get_file_structure Recursive tree view

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 (via GenericMcpTools)

from ai.functions.mcp_generic import GenericMcpTools

# Connect to the published MCP server via uvx
file_tools = GenericMcpTools(
    command="uvx",
    args='["gia-file-tools"]',
    env='{"GIA_FILE_ROOT": "/path/to/sandbox"}'
)

# All 6 tools are now available to the agent

This works identically to how npx-based MCP servers are used:

# npx example (Node.js)
GenericMcpTools(command="npx", args='["-y", "firecrawl-mcp"]', env='{"API_KEY": "..."}')

# uvx example (Python) — same pattern
GenericMcpTools(command="uvx", args='["gia-file-tools"]', env='{"GIA_FILE_ROOT": "/tmp/sandbox"}')

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.0.tar.gz (6.1 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.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gia_file_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.0.tar.gz
Algorithm Hash digest
SHA256 256ded470679e1ced4b106926c0dbe54444575f2d27dd3f8f21effa8db32fd75
MD5 8f46e9f2f601b1d3119edb1b37523e0e
BLAKE2b-256 91c653571000053a361aacaec13acb6528b611df222fc3f686056482bf133f3f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gia_file_tools-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 339305dd4f74f473fe71f64c8d048853b8e2a6a4bc66f3c195843d4e5758faab
MD5 3774d5780a00b933b096679b07766909
BLAKE2b-256 4623e20af412a5e90e0317f5275836136b78d01aebee367aaf1d2addaa7ced04

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