gremlin-mcp

gremlin-mcp

An MCP server that gives an agent terminal and file-management capabilities, including running shell/Python commands, searching and reading files, and creating/editing/deleting files and folders.

Category
Visit Server

README

gremlin_mcp

Learning from this Youtube TUT https://www.youtube.com/watch?v=io02ZM0ADqM MCP Full Course for Beginners Note: I asked Copilot or some other LLM to clean up the existing code for tools and added any others it thought would be useful. There are several tools that should be used with caution as they can modify the files and directories. I haven't tested tool usage properly. Need to build something useful with this mcp and with proper guardrails.

An MCP (Model Context Protocol) server that gives an agent terminal and file-management capabilities: run shell/Python commands, search and read files, and create/edit/delete files and folders.

Built on FastMCP.

Tools

The server exposes 21 tools, grouped as follows:

Shell / Python execution

Tool Purpose
run_command Run a shell command (cmd on Windows, sh on Unix)
python_code Execute a Python snippet with the running interpreter
python_file Execute a Python script file

Search & read

Tool Purpose
glob_files List absolute paths matching a glob pattern
grep Matching lines (with line numbers) in a single file
search_text Recursive search under a directory
read_file Read a whole file as UTF-8
read_file_lines Read a 1-based range of lines
get_env_var Read an environment variable

Files & folders

Tool Purpose
write_file / append_file Write or append UTF-8 text
replace_in_file Find & replace, returns the count changed
copy_file / move_file Copy or move (auto-creates parent dirs)
delete_file / delete_folder Delete a file or folder
create_folder Create a folder (including parents)
list_dir / get_cwd / file_info / tree Directory introspection

Requirements

  • Python >= 3.13
  • fastmcp >= 3.4.7

Installation

uv sync            # recommended
# or
python -m pip install -e .

Starting the server

The server communicates over stdio, which is FastMCP's default transport. Start it from the repo root with any of:

uv run python -m gremlin_mcp.main
python test.py serve
python start_gremlin_mcp_server.py

Testing

1. Offline smoke test (no MCP client needed)

python test.py

This imports the server, calls every tool (creating and cleaning up a temporary folder), and prints a [PASS]/[FAIL] summary plus a total.

2. Interactive web inspector

fastmcp dev inspector src/gremlin_mcp/main.py

Opens the MCP Inspector in your browser so you can browse the tools, read their descriptions/examples, and call them interactively.

Note: fastmcp dev is a subcommand group, so the inspector subcommand must be passed explicitly (fastmcp dev src/... alone will fail).

3. Quick CLI checks

fastmcp inspect src/gremlin_mcp/main.py    # server info + tool summary
fastmcp list   src/gremlin_mcp/main.py     # just the tool names

4. Connecting from an MCP client

Point your editor/client's MCP config at the server via stdio, for example:

{
  "mcpServers": {
    "gremlin-mcp": {
      "command": "uv",
      "args": ["run", "python", "-m", "gremlin_mcp.main"]
    }
  }
}

Example tool calls

As an agent would issue them:

list_dir(path="src")
search_text(pattern="TODO", directory="src")
read_file(file="pyproject.toml")
write_file(file="hello.py", content="print('hi')")
python_code(code="print(6 * 7)")          # -> exit=0 / 42
replace_in_file(path="config.py", old="DEBUG = True", new="DEBUG = False")
tree(path=".", depth=2)

Project layout

src/gremlin_mcp/
├── __init__.py
├── tools.py   # all tool definitions (21 tools)
└── main.py    # FastMCP server entry point
test.py        # offline smoke test / optional server launcher
start_gremlin_mcp_server.py   # minimal "run the server" launcher

Security note

run_command, python_code and python_file execute arbitrary code. Only expose this server to agents/clients you trust, and consider running it inside a sandbox or restricted working directory.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured