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.1.tar.gz (11.4 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.1-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gia_file_tools-0.1.1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for gia_file_tools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2286251ec4b6cd857805ae561f0af7fdd1218a6d7573135912b9a9199cb96a3d
MD5 13fed3ec11472f28ab63d3c6e1f7ec09
BLAKE2b-256 46e50dc877c8ac63590e2f64f7ee469b93646cea13c4849362148bb97ee922e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gia_file_tools-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for gia_file_tools-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 336393edf92f98d4c9361ccfe5e96456272b9a15d3386dc1dbcbb5902a2cc206
MD5 c62a1c41eae30bf0e2314809b1867305
BLAKE2b-256 1296ee4e97b4e2674cdb54d0d4acccaa0439fc2077966f4ccc2108b6728515db

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