mt4110
MCP Servermt4110public

a2a_mcp_demo

entry point a2a and mcp

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
MIT License
License

About This Server

entry point a2a and mcp

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

A2A ⇄ MCP Demo

このリポジトリは、Mac(Mシリーズ)上で A2A (Application-to-Application) → MCP (Model Context Protocol) の最小プロトタイプを素早く立ち上げるための雛形です。

🚀 前提条件

• macOS(Mシリーズ)
• Homebrew インストール済み
• Python 3.12(bootstrap.sh が自動でセットアップ)
• .env ファイルに以下を設定済み

OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ANTHROPIC_API_KEY=claude-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
MODEL_PROVIDER=openai     # openai / anthropic

🛠️ セットアップ手順

1.	リポジトリをクローン & ディレクトリ移動

git clone

2.	環境変数ファイルを準備

cp .env.example .env

.env を開いて API キーと MODEL_PROVIDER をセット

3.	依存関係と仮想環境のインストール

chmod +x bootstrap.sh ./bootstrap.sh source .venv/bin/activate

▶️ 実行方法

1. MCP サーバーを起動

# デフォルトポート(3333)で起動
python mcp_server.py

# カスタムポート例(4444)
MCP_PORT=4444 python mcp_server.py

確認: curl http://127.0.0.1:3333/capabilities

→ Tool 定義が JSON で返ってくれば OK

2. A2A エージェントを実行

python a2a_agent.py

期待出力:

MCP response: {'rows': [{'id': 1, 'name': 'Alice'}, {'id': 2, 'name': 'Bob'}]}

💡 拡張アイディア

マルチエージェント化:
a2a_protocol.AgentHub を使い、役割別のエージェントを同時に管理・実行

キャッシュ & リトライ:
tenacity で再試行、diskcache で /run 結果をローカルキャッシュ

認可・監査:
fastapi-users で JWT 認証、structlog で構造化ログを記録

CLI 追加:
argparse を導入して、エージェントに投げるクエリや出力形式を引数で柔軟に変更

カスタムツール統合:
mcp_server.py の /capabilities に新ツールを定義し、.env 経由で動的追加

Cline 連携:
cline add-tool sql.query でスキーマを自動取得し、即座に VS Code, cursorなどのIDE から呼び出し

Devin 連携:

devin refactor mcp_server.py --add-tests

などのバッチ型自動リファクタリング

CI/CD デプロイ:
Dockerize して Fly.io / Render に展開し、自動スケール or Webhook 連携

Quick Start

1

Clone the repository

git clone https://github.com/mt4110/a2a_mcp_demo
2

Install dependencies

cd a2a_mcp_demo
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownermt4110
Repoa2a_mcp_demo
LanguagePython
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation