Skip to main content
Glama

🚀 DevAssist MCP Server

GitHub と競技プログラミングのための本番運用可能な Python MCP サーバー

Python MCP Render License Docker


🌐 ライブクラウドデプロイ: DevAssist MCP Server は Render.com にデプロイされ、稼働中です!

  • ベース URL とヘルスチェック: https://devassist-mcp-server.onrender.com/

  • SSE エンドポイント: https://devassist-mcp-server.onrender.com/sse

コードをローカルで実行しなくても、Claude Desktop、Cursor、VS Code クライアントをホストされている Render サーバーに直接接続できます。または、お使いのマシンでローカルに実行することもできます。


📖 概要とプロジェクト説明

DevAssist MCP Server は、Claude Desktop、Cursor、VS Code Copilot などの AI アシスタントを、リアルタイムの開発者ワークフロー、GitHub リポジトリインテリジェンス、競技プログラミング分析に接続するために設計された、本番グレードの非同期 Model Context Protocol (MCP) サーバーです。

🎯 目的と主要機能

現代の AI コーディングエージェントは、外部の開発者プラットフォームや競技プログラミングの指標に直接アクセスできないことがよくあります。DevAssist MCP は、標準の MCP プロトコルインターフェース(STDIO および Server-Sent Events / SSE)を介して 2 つの専用ツールを提供することで、この問題に対処します。

  1. 🐙 github_assistant: ユーザープロファイルの検索、リポジトリのメタデータ、コミット履歴、コード言語構成の内訳、アクティブなプルリクエスト、イシュートラッキング、コントリビューター統計、リリースノートなど、包括的な GitHub 統合を提供します。

  2. 🏆 cp_assistant: Codeforces と連携し、ユーザーのコンテストレーティング、提出パフォーマンス履歴、トピック別の正解率トラッキング、アルゴリズムの弱点特定、レーティングレベルと弱いタグに基づくパーソナライズされた練習問題の推奨を取得します。

ローカルにデプロイするか、ライブの Render.com クラウドエンドポイント(https://devassist-mcp-server.onrender.com/sse)経由でアクセスするかにかかわらず、DevAssist MCP は LLM がライブの開発者データを動的に推論できるようにします。

✨ 主な機能

機能

説明

🌐 クラウドデプロイ

Server-Sent Events(SSE)を完全サポートした Render.com でのライブホスティング

🐙 GitHub 統合

ユーザープロファイル、リポジトリ情報、コミット、PR、イシュー、統計

🏆 Codeforces 統合

プロファイル、コンテスト履歴、レーティング追跡、提出履歴

🧠 弱点トピック分析

AI による競技プログラミングの弱点領域の特定

💡 スマートレコメンデーション

スキルギャップに基づくパーソナライズされた問題提案

⚡ 非同期アーキテクチャ

httpx によるノンブロッキング I/O で最大のパフォーマンスを実現

🔒 本番運用対応

ロギング、エラー処理、型安全性、包括的なテスト


Related MCP server: GitBridge

🏗️ アーキテクチャ

graph TD
    A["🤖 AI Agent<br/>(Claude / Cursor / VS Code)"] -->|MCP Protocol / SSE| B["🌐 Live Render MCP Server / Local Server"]
    B --> C["🐙 github_assistant"]
    B --> D["🏆 cp_assistant"]
    C --> E["GitHub Service Layer"]
    D --> F["Codeforces Service Layer"]
    E -->|httpx async| G["GitHub REST API v3"]
    F -->|httpx async| H["Codeforces API"]
    
    style A fill:#4A90D9,stroke:#2C5F99,color:#fff
    style B fill:#6C3483,stroke:#4A235A,color:#fff
    style C fill:#27AE60,stroke:#1E8449,color:#fff
    style D fill:#E67E22,stroke:#CA6F1E,color:#fff

🔌 Claude Desktop への接続(claude_desktop_config.json)

Claude Desktop でこの MCP サーバーを使用するには、claude_desktop_config.json ファイルを開くか作成してください。

📍 ファイルの場所:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json (例:C:\Users\<username>\AppData\Roaming\Claude\claude_desktop_config.json)

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json


オプション A: Render ライブデプロイを使用(推奨)

mcp-remote ブリッジを使用して Render.com のクラウドホストサーバーに直接接続します:

{
  "mcpServers": {
    "devassist-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://devassist-mcp-server.onrender.com/sse"
      ]
    }
  }
}

または、お使いの Claude Desktop のバージョンがネイティブ SSE 設定をサポートしている場合:

{
  "mcpServers": {
    "devassist-mcp": {
      "url": "https://devassist-mcp-server.onrender.com/sse"
    }
  }
}

オプション B: ローカルマシンで実行する

お使いのマシンで MCP サーバーをローカルに実行したい場合は、次のようにします:

{
  "mcpServers": {
    "devassist-mcp": {
      "command": "python",
      "args": ["C:/path/to/devassist-mcp/server.py"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

注: C:/path/to/devassist-mcp/server.py を、お使いのマシン上の server.py の絶対パスに置き換えてください。


💻 その他の IDE 設定

Cursor

Cursor の MCP 設定(.cursor/mcp.json)に追加します:

Render クラウドエンドポイントを使用する場合:

{
  "mcpServers": {
    "devassist-mcp": {
      "url": "https://devassist-mcp-server.onrender.com/sse"
    }
  }
}

ローカル Python スクリプトを使用する場合:

{
  "mcpServers": {
    "devassist-mcp": {
      "command": "python",
      "args": ["C:/path/to/devassist-mcp/server.py"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

VS Code(Copilot 使用時)

VS Code の設定に追加します:

{
  "mcp": {
    "servers": {
      "devassist-mcp": {
        "command": "npx",
        "args": [
          "-y",
          "mcp-remote",
          "https://devassist-mcp-server.onrender.com/sse"
        ]
      }
    }
  }
}

📋 前提条件とローカルセットアップ

前提条件

  • Python 3.12+

  • GitHub Personal Access Token(ここで生成)— より高いレート制限のため

  • pip または uv パッケージマネージャー

オプション 1: uv を使用(推奨)

# Clone the repository
git clone https://github.com/Champion-2006/DevAssist-MCP-Server.git
cd DevAssist-MCP-Server

# Create virtual environment and install dependencies
uv venv
uv pip install -r requirements.txt

オプション 2: pip を使用

# Clone the repository
git clone https://github.com/Champion-2006/DevAssist-MCP-Server.git
cd DevAssist-MCP-Server

# Create virtual environment
python -m venv venv

# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

⚙️ ローカル設定

  1. 環境テンプレートをコピーします:

    cp .env.example .env
  2. .env を設定内容に合わせて編集します:

    GITHUB_TOKEN=ghp_your_personal_access_token_here
    LOG_LEVEL=INFO
    TRANSPORT=stdio
    PORT=8000

注: GitHub トークンは任意ですが推奨されます。トークンがない場合、リクエストは 1 時間あたり 60 API コールに制限されます。トークンを使用すると、制限は 1 時間あたり 5,000 リクエストに増加します。


🚀 ローカルでのスタンドアロン実行

STDIO モード(デフォルト)

python server.py

SSE トランスポートモード

python server.py --sse
# or
TRANSPORT=sse PORT=8000 python server.py

🛠️ ツールドキュメント

ツール 1: github_assistant

アクション

説明

repository が必要

get_user_profile

GitHub ユーザープロファイルを取得

❌

get_user_repos

ユーザーが所有する公開リポジトリをすべて一覧表示

❌

get_user_activity

最近のユーザーアクティビティを取得(コミット、PR、スター)

❌

get_repo_info

リポジトリの詳細を取得

✅

get_latest_commits

最近のコミットを取得

✅

get_repo_stats

リポジトリの統計を取得

✅

get_repo_languages

プログラミング言語の割合の詳細な内訳

✅

get_repo_contributors

リポジトリへの主要コントリビューター

✅

get_latest_release

最新リリースのバージョンとリリースノート

✅

get_pull_requests

プルリクエストを取得

✅

get_issues

リポジトリのイシューを取得

✅

例 — ユーザープロファイルを取得:

"Show me the GitHub profile of octocat"
{
  "login": "octocat",
  "name": "The Octocat",
  "public_repos": 42,
  "followers": 20000,
  "location": "San Francisco"
}

例 — リポジトリ統計を取得:

"What are the stats for octocat/Hello-World?"
{
  "repository": "octocat/Hello-World",
  "stars": 2500,
  "forks": 450,
  "language": "Python",
  "open_issues": 12
}

ツール 2: cp_assistant

アクション

説明

get_user_profile

Codeforces のレーティングとランクを取得

get_contest_history

過去のコンテスト参加履歴

get_recent_submissions

最近の問題提出

get_rating_history

時間経過に伴うレーティング変化

analyze_weak_topics

弱点となる問題分野を特定

recommend_problems

パーソナライズされた問題の提案

例 — 弱点トピックの分析:

"Analyze the weak topics for Codeforces user tourist"
[
  {
    "tag": "geometry",
    "total_attempts": 15,
    "successful": 5,
    "failed": 10,
    "success_rate": 33.3
  }
]

例 — レコメンデーションの取得:

"Recommend practice problems for my Codeforces handle"
[
  {
    "name": "Theatre Square",
    "rating": 1000,
    "tags": ["math"],
    "url": "https://codeforces.com/problemset/problem/1/A"
  }
]

🧪 テスト

# Run all tests
pytest tests/ -v

# Run with coverage
pytest tests/ -v --cov=. --cov-report=term-missing

# Run specific test file
pytest tests/test_github_service.py -v

# Run specific test
pytest tests/test_codeforces_service.py::test_analyze_weak_topics -v

📁 プロジェクト構成

devassist-mcp/
├── server.py                          # MCP server entry point (STDIO & SSE)
├── config.py                          # Pydantic settings
├── .env.example                       # Environment template
├── requirements.txt                   # Dependencies
├── pyproject.toml                     # Project metadata & tool configs
├── Dockerfile                         # Multi-stage Docker build
├── .dockerignore                      # Docker build exclusions
├── .gitignore                         # Git exclusions
├── README.md                          # Comprehensive documentation
├── tools/
│   ├── github.py                      # GitHub MCP tool
│   └── cp.py                          # Codeforces MCP tool
├── services/
│   ├── github_service.py              # GitHub API client
│   └── codeforces_service.py          # Codeforces API client
├── models/
│   ├── github_models.py               # GitHub Pydantic models
│   └── cp_models.py                   # Codeforces Pydantic models
├── utils/
│   ├── logger.py                      # Structured logging
│   └── exceptions.py                  # Custom exception hierarchy
├── tests/
│   ├── conftest.py                    # Shared test fixtures
│   ├── test_github_service.py         # GitHub service tests
│   ├── test_codeforces_service.py     # Codeforces service tests
│   ├── test_github_tool.py            # GitHub tool tests
│   └── test_cp_tool.py               # Codeforces tool tests
└── logs/                              # Log files (auto-created)

🐳 デプロイガイド

Render デプロイ(ライブ本番環境)

このプロジェクトは、SSE トランスポートモードで動作する Web Service として Render.com にライブデプロイされています:

  1. サービス タイプ: Web Service

  2. ビルドコマンド: pip install -r requirements.txt

  3. 開始コマンド: python server.py --sse

  4. 環境変数:

    • TRANSPORT: sse

    • PORT: 10000(または Render のデフォルト)

    • GITHUB_TOKEN: ghp_your_github_token

  5. ライブ URL: https://devassist-mcp-server.onrender.com


🤝 コントリビューション

  1. リポジトリをフォークします

  2. フィーチャーブランチを作成します:git checkout -b feature/amazing-feature

  3. 変更をコミットします:git commit -m 'Add amazing feature'

  4. ブランチにプッシュします:git push origin feature/amazing-feature

  5. プルリクエストを開きます

コード品質

# Format code
black .

# Lint
ruff check .

# Type check
mypy .

Python、FastMCP、httpx を使用して ❤️ を込めて構築

Related MCP Connectors

Related MCP Servers