gremlin-mcp
gremlin_mcp
このYoutubeチュートリアルhttps://www.youtube.com/watch?v=io02ZM0ADqM MCP Full Course for Beginnersから学習 注: Copilotまたは他のLLMに既存のツールコードを整理してもらい、有用と思われるものを追加してもらいました。ファイルやディレクトリを変更できるツールがいくつかあるため、注意して使用する必要があります。ツールの使用法は適切にテストしていません。このmcpと適切なガードレールを使って何か有用なものを作る必要があります。
エージェントにターミナルとファイル管理機能を提供するMCP(Model Context Protocol)サーバー:シェル/Pythonコマンドの実行、ファイルの検索と読み取り、ファイルやフォルダの作成/編集/削除。
FastMCP上に構築。
ツール
サーバーは21のツールを公開しており、以下のようにグループ化されています。
シェル / Python実行
ツール | 目的 |
| シェルコマンドを実行(Windowsではcmd、Unixではsh) |
| 実行中のインタプリタでPythonスニペットを実行 |
| Pythonスクリプトファイルを実行 |
検索と読み取り
ツール | 目的 |
| グロブパターンに一致する絶対パスを一覧表示 |
| 単一ファイル内の一致行(行番号付き) |
| ディレクトリ下を再帰的に検索 |
| ファイル全体をUTF-8で読み取り |
| 1から始まる行範囲を読み取り |
| 環境変数を読み取り |
ファイルとフォルダ
ツール | 目的 |
| UTF-8テキストを書き込みまたは追記 |
| 検索と置換、変更数を返す |
| コピーまたは移動(親ディレクトリを自動作成) |
| ファイルまたはフォルダを削除 |
| フォルダを作成(親フォルダも含む) |
| ディレクトリの内観 |
Related MCP server: emcp
要件
Python >= 3.13
fastmcp >= 3.4.7
インストール
uv sync # recommended
# or
python -m pip install -e .サーバーの起動
サーバーはstdio上で通信します。これはFastMCPのデフォルトのトランスポートです。リポジトリルートから以下のいずれかで起動します。
uv run python -m gremlin_mcp.main
python test.py serve
python start_gremlin_mcp_server.pyテスト
1. オフラインスモークテスト(MCPクライアント不要)
python test.pyこれによりサーバーをインポートし、すべてのツールを呼び出し(一時フォルダを作成してクリーンアップ)、[PASS]/[FAIL]のサマリーと合計を出力します。
2. インタラクティブなWebインスペクタ
fastmcp dev inspector src/gremlin_mcp/main.pyブラウザでMCPインスペクタが開き、ツールの参照、説明/例の読み取り、対話的な呼び出しが可能になります。
注:
fastmcp devはサブコマンドグループであるため、inspectorサブコマンドは明示的に渡す必要があります(fastmcp dev src/...単独では失敗します)。
3. クイックCLIチェック
fastmcp inspect src/gremlin_mcp/main.py # server info + tool summary
fastmcp list src/gremlin_mcp/main.py # just the tool names4. MCPクライアントからの接続
エディタ/クライアントのMCP設定をstdio経由でサーバーに向けます。例:
{
"mcpServers": {
"gremlin-mcp": {
"command": "uv",
"args": ["run", "python", "-m", "gremlin_mcp.main"]
}
}
}ツール呼び出しの例
エージェントが発行する場合:
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)プロジェクト構成
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セキュリティに関する注意
run_command、python_code、python_fileは任意のコードを実行します。このサーバーは信頼できるエージェント/クライアントにのみ公開し、サンドボックスまたは制限された作業ディレクトリ内で実行することを検討してください。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn MCP server that provides tools for reading, writing, and editing files on the local filesystem.1,608Apache 2.0
- Alicense-qualityDmaintenanceAn MCP server that gives AI agents SSH capabilities to execute commands, transfer files, and inspect remote systems through a preconfigured host list.43MIT
- Alicense-qualityBmaintenanceMCP server for terminal operations and file editing, enabling AI assistants to manage files, run commands, and process large content with auto-chunking.16MIT
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
An MCP server for deep research or task groups
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jvcaesar/gremlin-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server