Skip to main content
Glama

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実行

ツール

目的

run_command

シェルコマンドを実行(Windowsではcmd、Unixではsh)

python_code

実行中のインタプリタでPythonスニペットを実行

python_file

Pythonスクリプトファイルを実行

検索と読み取り

ツール

目的

glob_files

グロブパターンに一致する絶対パスを一覧表示

grep

単一ファイル内の一致行(行番号付き)

search_text

ディレクトリ下を再帰的に検索

read_file

ファイル全体をUTF-8で読み取り

read_file_lines

1から始まる行範囲を読み取り

get_env_var

環境変数を読み取り

ファイルとフォルダ

ツール

目的

write_file / append_file

UTF-8テキストを書き込みまたは追記

replace_in_file

検索と置換、変更数を返す

copy_file / move_file

コピーまたは移動(親ディレクトリを自動作成)

delete_file / delete_folder

ファイルまたはフォルダを削除

create_folder

フォルダを作成(親フォルダも含む)

list_dir / get_cwd / file_info / tree

ディレクトリの内観

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 names

4. 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_commandpython_codepython_fileは任意のコードを実行します。このサーバーは信頼できるエージェント/クライアントにのみ公開し、サンドボックスまたは制限された作業ディレクトリ内で実行することを検討してください。

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

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

View all MCP Connectors

Latest Blog Posts

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