Skip to main content
Glama

MCPサーバー

FastAPIで構築されたモジュール式のModel Context Protocol (MCP) サーバーで、LLMインタラクションのためのツールを提供します。

機能

  • モジュール式アーキテクチャ - 各ツールは容易に保守可能

  • ファイル操作 - ファイルの読み取り、書き込み、追記、置換、挿入

  • ウェブ検索 - DDGSを使用したライブウェブ検索

  • URL取得 - ウェブコンテンツのスクレイピングと要約

  • コマンド実行 - サンドボックス環境でのシェルコマンド実行

  • 厳格な分離 - 使い捨ての /tmp を備えたBubblewrapサンドボックス

Related MCP server: mcp-toolkit

ツール

ツール

説明

today

今日の日付と時刻を取得

add

2つの数値を加算

web_search

ライブウェブで情報を検索

fetch_content

URLをスクレイピングしてコンテンツを抽出

list_files

ファイルとディレクトリを一覧表示

read_file

行ベースのウィンドウイングでファイルを読み取り

write_file

ファイルにテキストを書き込み

append_to_file

既存のファイルにテキストを追記

replace_in_file

ファイル内のテキストを検索して置換

insert_after_marker

マーカー行の後にテキストを挿入

run_command

サンドボックス内でシェルコマンドを実行

インストール

# Clone the repository
git clone <repository-url>
cd mcp_server

# Install dependencies using uv
uv sync

使用方法

# Start the server
python main.py

サーバーは http://0.0.0.0:8000 で起動します。

アーキテクチャ

mcp_server/
├── main.py              # FastAPI application entry point
├── tools.json           # Tool definitions (JSON schema)
└── tools/               # Tool implementations
    ├── __init__.py      # Exports all handlers
    ├── add.py           # Math operations
    ├── today.py         # Date/time
    ├── web_search.py    # Web search
    ├── fetch_content.py # URL scraping
    ├── files.py         # All file operations
    └── run_command.py   # Shell command execution

サンドボックス設定

run_command ツールは分離のためにbubblewrapを使用します:

  • 読み取り専用ルートファイルシステム (--ro-bind / /)

  • 使い捨て一時ディレクトリ (--tmpfs /tmp)

  • 書き込み可能なリソースディレクトリ (--bind resources resources)

  • DNS解決有効 (/etc 制限なし)

免責事項

このプロジェクトは、Alibaba GroupのTongyi Labによる大規模言語モデル Qwen 3.6 の支援を受けて開発されました。コード生成、ドキュメント作成、リファクタリングにおいてAIの支援を受けましたが、すべての技術的決定および最終的な実装は、人間の開発者によってレビューおよび検証されています。

ライセンス

MITライセンス

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A general-purpose MCP server providing web search, persistent memory storage, and secure code execution capabilities. It enables AI agents to search the web, store and retrieve data, and run Python/JavaScript code in sandboxed environments.
    8
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A comprehensive MCP server enabling LLMs to execute commands, manage files, interact with Figma, search the web, generate images, and more, extending their capabilities beyond text generation.
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    A secure, production-grade MCP server that provides filesystem operations, AST math evaluation, and system diagnostics for LLM agents.
    MIT