Token导航 LogoToken导航TokenDH.com
AI Consensus MCP logo
AI代理未说明官方级别未说明来源级核验

AI Consensus MCP

MCP Server

一个通过并行查询多个AI模型(Gemini、Codex和Copilot)来达成共识的Model Context Protocol (MCP)服务器,适用于需要多模型协作和决策的场景。

工具数

18

提示词数

0

GitHub Stars

1

资源数

0
PythonClaudeAI代理Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

gokmensercan

提供方

gokmensercan

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

AI Consensus MCP Server

Birden fazla AI'dan (Gemini, Codex ve Copilot) paralel yanıtlar alarak konsensüs sağlayan Model Context Protocol (MCP) sunucusu.

Özellikler

  • FastMCP 3.0.0b1 altyapısı ile modern MCP desteği
  • Asenkron paralel sorgulama - Gemini, Codex ve Copilot'a eş zamanlı istek
  • 18 MCP aracı - Tekil sorgular, konsensüs, council pipeline ve multi-agent orchestration
  • Modüler yapı - Providers, tools, models ve utils ayrımı
  • Pydantic modelleri ile yapılandırılmış çıktılar
  • Context logging ve ilerleme raporlama

Ön Koşullar

GereksinimAçıklama
Python 3.11+Async/await ve modern tip desteği için
Gemini CLIGoogle AI'a erişim için kurulu ve yapılandırılmış olmalı
Codex CLIOpenAI Codex'e erişim için kurulu ve yapılandırılmış olmalı
Copilot CLIGitHub Copilot'a erişim için kurulu ve yapılandırılmış olmalı

Kurulum

Bağımlılıkları Yükle

pip install "fastmcp>=3.0.0b1" pydantic

Claude Code'a Ekle

claude mcp add ai-consensus -- python3 /path/to/ai-consensus-mcp/server.py

Doğrulama

claude mcp list

Yapılandırma

Ortam değişkenleri ile yapılandırma:

DeğişkenVarsayılanAçıklama
GEMINI_DEFAULT_MODEL-Varsayılan Gemini modeli (örn: gemini-2.0-flash)
MCP_LOG_LEVELINFOLog seviyesi
MCP_MASK_ERRORSfalseHata detaylarını maskele

Araçlar

Tekil Sorgular

AraçAçıklamaParametreler
ask_geminiGemini AI'a soru sorprompt, model (opsiyonel)
ask_codexCodex AI'a soru sorprompt
ask_copilotCopilot AI'a soru sorprompt

Konsensüs

AraçAçıklamaParametreler
consensusÜçüne paralel sor, yanıtları karşılaştırprompt, gemini_model, use_cache
consensus_with_synthesisParalel sor + Gemini ile sentezleprompt, gemini_model, use_cache
consensus_with_elicitationParalel sor, çakışmada kullanıcıya sorprompt, gemini_model
get_last_consensusSon cache'lenmiş sonucu getir-
clear_consensus_cacheTüm cache'i temizle-

LLM Council Pipeline

karpathy/llm-council'dan ilham alan 3 aşamalı pipeline:

AraçAçıklamaParametreler
council3 aşamalı konsey pipelineprompt, gemini_model, chairman, use_cache

3 Aşama:

  1. Stage 1 - İlk Görüşler: Gemini, Codex ve Copilot'a paralel sorgu
  2. Stage 2 - Peer Review: Her model, diğer modellerin yanıtlarını anonim olarak değerlendirir
  3. Stage 3 - Başkan Sentezi: Seçilen başkan model (varsayılan: Gemini) tüm yanıtları + değerlendirmeleri alarak nihai sentez üretir

Multi-Agent Orchestration

AraçAçıklamaParametreler
agent_handoffSenkron agent delegasyonuagent_name, prompt, timeout
agent_assignAsenkron görev atamaagent_name, prompt, timeout
check_taskAsync görev durumu kontrolütask_id
list_tasksTüm görevleri listeleagent_name, status (opsiyonel)
send_agent_messageAgent inbox'a mesaj gönderagent_name, content
read_agent_inboxAgent mesajlarını okuagent_name
inbox_summaryAgent inbox özetiagent_name
list_agentsKayıtlı agent'ları listele-
cleanup_tasksEski görevleri temizlemax_age_hours

Slash Commands

Claude Code içinden slash command olarak kullanım:

KomutAçıklama
/consensus Paralel sorgu + karşılaştırma
/consensus-synthesize Paralel sorgu + sentez
/council 3 aşamalı LLM Council pipeline
/orchestrate Multi-agent orchestration

MCP İstemci Entegrasyonu

Claude Code

claude mcp add ai-consensus -- python3 /absolute/path/to/server.py

Claude Desktop

~/.config/claude/claude_desktop_config.json dosyasına ekleyin:

{
  "mcpServers": {
    "ai-consensus": {
      "command": "python3",
      "args": ["/absolute/path/to/ai-consensus-mcp/server.py"],
      "env": {
        "GEMINI_DEFAULT_MODEL": "gemini-2.0-flash"
      }
    }
  }
}

Proje Yapısı

ai-consensus-mcp/
├── server.py              # Ana MCP sunucusu
├── config.py              # Ortam değişkenleri yapılandırması
├── providers/
│   ├── __init__.py
│   ├── gemini.py          # Gemini CLI entegrasyonu
│   ├── codex.py           # Codex CLI entegrasyonu
│   ├── copilot.py         # Copilot CLI entegrasyonu
│   └── subprocess_runner.py # Subprocess yönetimi
├── tools/
│   ├── __init__.py
│   ├── single.py          # ask_gemini, ask_codex, ask_copilot araçları
│   ├── consensus.py       # consensus, synthesis, elicitation araçları
│   ├── council.py         # 3 aşamalı LLM Council pipeline
│   └── orchestration.py   # Multi-agent orchestration araçları
├── models/
│   ├── __init__.py
│   ├── responses.py       # AIResponse, ConsensusResult, SynthesisResult
│   ├── council.py         # PeerReview, CouncilResult
│   └── orchestration.py   # Agent/task modelleri
├── agents/
│   ├── __init__.py
│   ├── base.py            # BaseAgent soyut sınıfı
│   ├── gemini_agent.py    # Gemini worker agent
│   ├── codex_agent.py     # Codex worker agent
│   ├── copilot_agent.py   # Copilot worker agent
│   └── registry.py        # Agent registry
├── skills/
│   ├── consensus/         # /consensus slash command
│   ├── consensus-synthesize/ # /consensus-synthesize slash command
│   ├── council/           # /council slash command
│   └── orchestrate/       # /orchestrate slash command
└── utils/
    ├── __init__.py
    ├── context_helpers.py # Context logging yardımcıları
    └── state.py           # Session state ve cache yönetimi

Geliştirme

Sunucuyu Test Et

fastmcp inspect server.py

MCP Inspector ile Debug

npx @anthropics/inspector python3 server.py

Mimari

┌────────────────────────────────────────────────────────────┐
│                      MCP İstemci                           │
│              (Claude Code / Claude Desktop)                │
└─────────────────────────┬──────────────────────────────────┘
                          │ MCP Protocol (stdio)
┌─────────────────────────▼──────────────────────────────────┐
│                  AI Consensus Server                       │
│                    (FastMCP 3.0)                           │
├────────────────────────────────────────────────────────────┤
│  Tools Layer                                               │
│  ┌──────────────┐  ┌──────────────────┐  ┌─────────────┐ │
│  │ single.py    │  │ consensus.py     │  │ council.py  │ │
│  │ - ask_gemini │  │ - consensus      │  │ - council   │ │
│  │ - ask_codex  │  │ - synthesis      │  │  (3-stage)  │ │
│  │ - ask_copilot│  │ - elicitation    │  └─────────────┘ │
│  └──────────────┘  └──────────────────┘                   │
│  ┌─────────────────────────────────────────────────────┐  │
│  │ orchestration.py                                     │  │
│  │ - handoff, assign, messaging, task management        │  │
│  └─────────────────────────────────────────────────────┘  │
├────────────────────────────────────────────────────────────┤
│  Providers Layer (asyncio.gather ile paralel çalışır)     │
│  ┌────────────────┐  ┌────────────────┐  ┌─────────────┐ │
│  │ gemini.py      │  │ codex.py       │  │ copilot.py  │ │
│  │ subprocess→CLI │  │ subprocess→CLI │  │ subprocess  │ │
│  └───────┬────────┘  └───────┬────────┘  │  → CLI      │ │
└──────────┼───────────────────┼───────────┴──┬──────────┘─┘
           │                   │              │
           ▼                   ▼              ▼
    ┌─────────────┐     ┌─────────────┐  ┌─────────────┐
    │ Gemini CLI  │     │ Codex CLI   │  │ Copilot CLI │
    │ (gemini)    │     │ (codex)     │  │ (copilot)   │
    └─────────────┘     └─────────────┘  └─────────────┘

Lisans

MIT

目录标签

目录标签

PythonClaudeAI代理多模型协作本地部署AI共识并行查询决策支持MCP协议

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

session

工具数量(toolCount,工具数)

18

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明session部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP