Skip to main content

magatama - AI Coding Support MCP Server

PyPI version Python 3.11+ License: MIT

MAGATAMA(YATA のフォーク)の MCP サーバーパッケージです(PyPI 配布名 magatama / import 名 magatama_mcp / CLI コマンド magatama)。

Model Context Protocol (MCP) サーバーとして、AI コーディングツールに知識グラフコンテキストを提供します。

特徴

  • 🤖 MCP 完全対応: 36 Tools, 3 Prompts, 1 Resource
  • 🔌 comP Bridge: comP の .comp/index.db を再パースなしで知識グラフに取り込み
  • 🔌 AI ツール連携: Claude Desktop, GitHub Copilot, Cursor
  • 📡 複数トランスポート: stdio / SSE
  • 🔒 プライバシー: 完全ローカル実行

インストール

pip install magatama

使用方法

CLI コマンド

# ファイルを解析
magatama parse path/to/file.py

# ディレクトリを解析
magatama parse path/to/project --pattern "**/*.py"

# MCP サーバーを起動(stdio)
magatama serve

# MCP サーバーを起動(SSE)
magatama serve --transport sse --port 8080

# エンティティを検索
magatama query "function_name" --type function

# 統計情報を表示
magatama stats

# グラフの整合性を検証
magatama validate --graph graph.json --repair

AI ツール設定

Claude Desktop

{
  "mcpServers": {
    "magatama": {
      "command": "magatama",
      "args": ["serve"]
    }
  }
}

GitHub Copilot (VS Code)

.vscode/mcp.json:

{
  "mcpServers": {
    "magatama": {
      "command": "magatama",
      "args": ["serve"]
    }
  }
}

MCP Tools

全 36 ツールを提供します(基本・フレームワーク知識・検索・品質分析・ AI 支援・comP Bridge)。下表は基本ツールの抜粋で、全 36 ツールの一覧は ルート README を参照してください。

Tool 説明
parse_file ソースファイルを解析してエンティティを抽出
parse_directory ディレクトリ内のファイルを一括解析
search_entities 名前や型でエンティティを検索
get_entity / get_related_entities 詳細取得 / 関連エンティティ取得
get_graph_stats 知識グラフの統計情報を取得
save_graph / load_graph JSON への保存 / 読み込み
read_external_graph comP Bridge: comP インデックスを取り込み
get_external_graph_info comP Bridge: comP インデックスの統計を確認

MCP Prompts

Prompt 説明
analyze_codebase コードベース構造を分析
explain_entity コードエンティティを説明
find_dependencies 依存関係を分析

ライセンス

MIT License - 詳細は LICENSE を参照してください。

関連プロジェクト

Metadata

Release files for magatama 0.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for magatama 0.7.2
File Size Uploaded Provenance Actions
magatama-0.7.2.tar.gz 49.7 kB Without provenance Details for magatama-0.7.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for magatama 0.7.2
File Interpreter ABI Platform Actions
magatama-0.7.2-py3-none-any.whl Python 3 none any Details for magatama-0.7.2-py3-none-any.whl

Total release size: 82.1 kB

Release files / magatama-0.7.2.tar.gz

Download URL magatama-0.7.2.tar.gz
Size 49.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5e22490e6e7b9efe34ff07efefb2520e2d2259deca70a8f8389508403b10f1e0
BLAKE2b-256 checksum
How to use checksums
a0d1741a7a582697cde8a8b3d0149dff365792abce1808ef7a5d67d350c3696d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / magatama-0.7.2-py3-none-any.whl

Download URL magatama-0.7.2-py3-none-any.whl
Size 32.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4b8bb1b6d4f9c069e7a1c1592d8596859983d920c85b6cb44df20f309b67117
BLAKE2b-256 checksum
How to use checksums
873fc816fa1ec9d6269b91a87a6d2f30d6f607b281f6ca7fd2935200f986e793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for magatama 0.7.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.7.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page