Quorum-MCP
Allows querying Google Gemini models such as Gemini 2.5 Flash and Gemini 2.5 Pro as part of multi-provider consensus, including large-context analysis.
Allows using local Ollama models for zero-cost, private inference within consensus and deliberation workflows.
Allows querying OpenAI models such as GPT-4o, GPT-4o-mini, and GPT-4 Turbo as part of multi-provider consensus and deliberation workflows.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Quorum-MCP
Multi-AI Consensus System MCP Server - Get better answers through deliberation
๐ฏ Overview
Quorum-MCP orchestrates multiple AI providers (Anthropic Claude, OpenAI, Google Gemini, Cohere, Mistral AI, Novita AI, Ollama) through multi-round deliberation to produce consensus-based responses. By combining different AI models, you get more balanced, comprehensive, and reliable answers.
Why Quorum?
๐ญ Diverse Perspectives: Each AI has unique strengths and biases
๐ค Consensus Building: Agreement across models increases confidence
๐ Quality Assurance: Cross-validation catches errors and hallucinations
๐ก Richer Insights: Disagreements reveal nuanced viewpoints
Related MCP server: consensus-mcp
โจ Features
Multi-Provider Support (7 Providers!)
๐ค Anthropic Claude - Thoughtful, nuanced reasoning
Models:
claude-3-5-sonnet-20241022(default),claude-3-opus,claude-3-haikuContext: 200K tokens | Cost: $3-$15/1M input
๐ง OpenAI - Broad knowledge, strong reasoning
Models:
gpt-4o(default),gpt-4o-mini,gpt-4-turboContext: 128K tokens | Cost: $0.15-$30/1M input
โจ Google Gemini - Fast, cost-effective, huge context
Models:
gemini-2.5-flash(default),gemini-2.5-pro,gemini-1.5-proContext: Up to 2M tokens | Cost: $0.15-$1.25/1M input
๐ข Cohere - Enterprise RAG, production-ready
Models:
command-r-plus(default),command-r,command-lightContext: 128K tokens | Cost: $0.30-$15/1M input
Features: Excellent RAG capabilities, free tier available
๐ช๐บ Mistral AI - Best pricing, European AI
Models:
mistral-large-latest(default),mistral-small-latest,mixtral-8x22bContext: 128K tokens | Cost: $0.04-$6/1M input
Features: GDPR compliant, competitive with GPT-4
โก Novita AI - Ultra-low cost, OpenAI-compatible
Models:
llama-3.3-70b(default),deepseek-r1,qwen-2.5-72bContext: 128K tokens | Cost: $0.04-$0.20/1M input (cheapest!)
Features: OpenAI-compatible API, multiple open-source models
๐ Ollama (Local LLMs) - Private, zero-cost local inference
Models:
llama3.2(default),llama3.1,mistral,mixtral,qwen3,deepseek-r1,gemma3Context: Up to 128K tokens | Cost: $0.00 (100% local)
Privacy: 100% - Data never leaves your machine
Three Operational Modes
1. Quick Consensus (Single Round)
# Fast consensus for straightforward queries
session = await orchestrator.execute_quorum(
query="What are Python best practices?",
mode="quick_consensus"
)2. Full Deliberation (3 Rounds)
# Multi-round deliberation for complex decisions
# Round 1: Independent analysis
# Round 2: Cross-review and critique
# Round 3: Final synthesis
session = await orchestrator.execute_quorum(
query="Should we use microservices or monolith?",
mode="full_deliberation"
)3. Devil's Advocate (Critical Analysis)
# Challenge assumptions and find weaknesses
session = await orchestrator.execute_quorum(
query="We should skip testing to move faster",
mode="devils_advocate"
)Additional Features
๐ Web Dashboard: Interactive browser-based UI (NEW!)
โก Async/Await: Non-blocking I/O throughout
๐ฐ Cost Tracking: Per-provider and total cost reporting (including $0 for local)
๐ Cost Calculator: Estimate costs before running queries (NEW!)
๐ Local LLMs: Zero-cost inference with Ollama (100% private)
๐ Session Management: Persistent session storage and retrieval
๐ Type Safe: Full Pydantic validation
๐งช Well Tested: 105 passing tests, 95% provider coverage
๐ก MCP Integration: Works with Claude Desktop and other MCP clients
๐ Real-Time Updates: WebSocket-powered live notifications (NEW!)
๐ Quick Start
Installation
# Clone the repository
git clone https://github.com/aj-geddes/quorum-mcp.git
cd quorum-mcp
# Install with dependencies
pip install -e .
# Or install for development
pip install -e ".[dev]"Configuration
Cloud Providers (Optional)
Set your API keys as environment variables (use whichever providers you prefer):
# Traditional providers
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."
export GOOGLE_API_KEY="..."
# New providers (optional - mix and match!)
export COHERE_API_KEY="..."
export MISTRAL_API_KEY="..."
export NOVITA_API_KEY="..."Local LLMs with Ollama (Optional, Zero Cost)
Install and run Ollama for 100% free, private local inference:
# Install Ollama (Mac/Linux/Windows)
# Visit: https://ollama.com/download
# Start Ollama server
ollama serve
# Pull a model (in another terminal)
ollama pull llama3.2
# Optional: Configure Ollama host (default: http://localhost:11434)
export OLLAMA_HOST="http://localhost:11434"
export OLLAMA_ENABLE="true" # Set to "false" to disableNote: At least one provider (cloud or local) is required. Ollama enables zero-cost consensus!
Running the Server
Option 1: Web Dashboard (Recommended for Getting Started)
Launch the interactive web interface:
# Start the web server
quorum-web
# Or run directly
python -m quorum_mcp.web_serverThen open http://localhost:8000 in your browser. No coding required!
Features:
๐จ Interactive query builder
๐ Real-time consensus visualization
๐ฐ Cost calculator and estimator
๐ Session history and analytics
๐ Provider comparison tools
๐ Read the Web Dashboard Guide
Option 2: MCP Server (for Claude Desktop Integration)
For programmatic use or Claude Desktop integration:
# Start the MCP server
quorum-mcp
# Or run directly
python -m quorum_mcp.serverBasic Usage Example
import asyncio
from quorum_mcp.orchestrator import Orchestrator
from quorum_mcp.providers import (
AnthropicProvider,
OpenAIProvider,
GeminiProvider,
CohereProvider, # New!
MistralProvider, # New!
NovitaProvider, # New!
OllamaProvider, # Local
)
from quorum_mcp.session import get_session_manager
async def main():
# Initialize providers (use any combination!)
providers = [
AnthropicProvider(),
OpenAIProvider(),
GeminiProvider(),
# Add new providers for more perspectives:
CohereProvider(), # Enterprise RAG
MistralProvider(), # Best pricing
NovitaProvider(), # Ultra-low cost
]
# Start session manager
session_manager = get_session_manager()
await session_manager.start()
# Create orchestrator
orchestrator = Orchestrator(
providers=providers,
session_manager=session_manager
)
# Execute consensus
session = await orchestrator.execute_quorum(
query="What is the best database for a startup?",
context="Small team, rapid iteration, expecting growth",
mode="quick_consensus"
)
# Print results
print(f"Confidence: {session.consensus['confidence']:.2%}")
print(f"Summary: {session.consensus['summary']}")
print(f"Cost: ${session.consensus['cost']['total_cost']:.4f}")
await session_manager.stop()
asyncio.run(main())๐ Usage
MCP Tools
Quorum-MCP provides two simple tools for MCP clients:
q_in - Submit Query
{
"query": "What are the top 3 considerations for API design?",
"context": "Building a REST API for a SaaS product",
"mode": "quick_consensus"
}Returns:
{
"session_id": "abc-123-def",
"status": "completed",
"confidence": 0.85,
"consensus": {
"summary": "Based on consensus...",
"agreement_areas": [...],
"cost": {...}
}
}q_out - Retrieve Results
{
"session_id": "abc-123-def"
}Returns the full session data including consensus results.
Using with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"quorum-mcp": {
"command": "quorum-mcp",
"env": {
"ANTHROPIC_API_KEY": "your-key",
"OPENAI_API_KEY": "your-key",
"GOOGLE_API_KEY": "your-key"
}
}
}
}Running Demos
# Three-provider consensus demo (cloud providers)
python examples/three_provider_demo.py
# Local LLM demo with Ollama (zero cost!)
python examples/local_llm_demo.py
# End-to-end demo with all modes
python examples/end_to_end_demo.py
# Session management demo
python examples/session_demo.py๐ฐ Cost Comparison
Provider | Model | Input ($/1M) | Output ($/1M) | Context Window | Speed |
Ollama ๐ | llama3.2 | $0.00 | $0.00 | 128K | โกโกโก |
Ollama | mistral | $0.00 | $0.00 | 32K | โกโกโก |
Gemini | 2.5 Flash | $0.15 | $0.60 | 200K | โกโกโก |
OpenAI | 4o-mini | $0.15 | $0.60 | 128K | โกโกโก |
Claude | 3.5 Sonnet | $3.00 | $15.00 | 200K | โกโก |
Gemini | 2.5 Pro | $1.25 | $10.00 | 200K | โกโก |
Gemini | 1.5 Pro | $1.25 | $5.00 | 2M | โก |
OpenAI | 4o | $2.50 | $10.00 | 128K | โกโก |
Claude | 3 Opus | $15.00 | $75.00 | 200K | โก |
Typical Consensus Cost (500 tokens in, 300 tokens out, 3 providers):
Quick Consensus: ~$0.01 - $0.02
Full Deliberation (3 rounds): ~$0.03 - $0.06
๐๏ธ Architecture
graph TD
Client[MCP Client<br/>Claude Desktop]
subgraph FastMCP["FastMCP Server"]
QIn[q_in tool]
QOut[q_out tool]
end
subgraph Orchestrator["Orchestrator Engine"]
Consensus[Consensus Algorithms<br/>โข Agreement detection<br/>โข Confidence scoring<br/>โข Synthesis & summarization]
end
subgraph Providers["AI Providers"]
Anthropic[AnthropicProvider<br/>โข Async client<br/>โข Token counting<br/>โข Cost tracking<br/>โข Error mapping]
OpenAI[OpenAIProvider<br/>โข Async client<br/>โข tiktoken<br/>โข Cost tracking<br/>โข Error mapping]
Gemini[GeminiProvider<br/>โข Async client<br/>โข Token counting<br/>โข Cost tracking<br/>โข Error mapping]
Ollama[OllamaProvider<br/>โข Async client<br/>โข Local inference<br/>โข Zero cost<br/>โข 100% private]
end
AnthropicAPI[Anthropic API]
OpenAIAPI[OpenAI API]
GeminiAPI[Google AI API]
OllamaServer[Ollama Server<br/>Local]
Client -->|stdio/HTTP| FastMCP
QIn --> Consensus
QOut --> Consensus
Consensus --> Anthropic
Consensus --> OpenAI
Consensus --> Gemini
Consensus --> Ollama
Anthropic --> AnthropicAPI
OpenAI --> OpenAIAPI
Gemini --> GeminiAPI
Ollama --> OllamaServer๐ Project Structure
quorum-mcp/
โโโ src/quorum_mcp/
โ โโโ __init__.py
โ โโโ server.py # FastMCP server with q_in/q_out tools
โ โโโ orchestrator.py # Multi-provider orchestration engine
โ โโโ session.py # Session management and persistence
โ โโโ providers/
โ โโโ __init__.py
โ โโโ base.py # Abstract provider interface
โ โโโ anthropic_provider.py # Claude integration
โ โโโ openai_provider.py # OpenAI integration
โ โโโ gemini_provider.py # Gemini integration
โ โโโ ollama_provider.py # Ollama local LLM integration
โโโ examples/
โ โโโ three_provider_demo.py # Demo with cloud providers
โ โโโ local_llm_demo.py # Demo with Ollama (zero cost)
โ โโโ end_to_end_demo.py # All operational modes
โ โโโ session_demo.py # Session management
โโโ tests/
โ โโโ test_session.py
โ โโโ test_orchestrator.py
โ โโโ test_anthropic_provider.py
โ โโโ test_openai_provider.py
โ โโโ test_gemini_provider.py
โ โโโ test_ollama_provider.py
โ โโโ test_integration.py
โโโ docs/
โ โโโ session_management.md
โโโ .pre-commit-config.yaml # Code quality hooks
โโโ pyproject.toml # Project configuration
โโโ README.md
โโโ worklog.md # Complete development history๐งช Development
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=quorum_mcp --cov-report=html
# Run specific test file
pytest tests/test_gemini_provider.py -v
# Run only fast tests
pytest -m "not slow"Code Quality
The project uses pre-commit hooks for code quality:
# Install pre-commit hooks
pre-commit install
# Run manually
pre-commit run --all-files
# Individual tools
black src/ tests/ # Format code
ruff check src/ tests/ # Lint code
mypy src/ # Type checkAdding a New Provider
Create a new provider class inheriting from
ProviderImplement required methods:
send_request(request: ProviderRequest) -> ProviderResponsecount_tokens(text: str) -> intget_cost(tokens_input: int, tokens_output: int) -> floatget_provider_name() -> strget_model_info() -> dict
Add comprehensive tests
Update
providers/__init__.pyAdd to
server.pyinitialization
See gemini_provider.py as a reference implementation.
๐ Test Coverage
Module Coverage
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
providers/ollama_provider.py 95%
providers/gemini_provider.py 95%
providers/openai_provider.py 78%
session.py 90%
providers/base.py 67%
providers/anthropic_provider.py 56%
orchestrator.py 45%
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Total 32%Test Results:
โ 105 tests passing (76 + 29 new Ollama tests)
โ 58 tests failing (testing unimplemented features)
โ ๏ธ 16 errors (mock-related, non-critical)
๐บ๏ธ Roadmap
โ Phase 1: MVP (Complete)
Provider abstraction layer
Anthropic Claude integration
OpenAI integration
Basic orchestration engine
Session management
FastMCP server with q_in/q_out
Cost tracking
โ Phase 2: Testing (Complete)
Comprehensive unit tests
Provider test suites
Integration tests
Pre-commit hooks
Code quality tooling
โ Phase 3: Google Gemini (Complete)
Gemini provider implementation
Token counting and cost tracking
95% test coverage
Three-provider demo
Documentation updates
โ Phase 4: Local LLMs (Complete)
Ollama provider integration
Support for Llama 3.2, Llama 3.1, Mistral, Mixtral, Qwen3, DeepSeek-R1, Gemma3
Zero-cost local inference ($0.00)
100% privacy-preserving mode (data never leaves machine)
95% test coverage (29 passing tests)
Local LLM demo and hybrid (local+cloud) demo
Automatic server detection and model availability checking
๐ฎ Phase 5: Advanced Features (Future)
Additional local LLM providers (LM Studio, vLLM, text-generation-webui)
OpenAI-compatible API provider (universal local LLM support)
Mistral AI provider (cloud)
Provider health monitoring
Dynamic provider selection
Caching layer
Rate limiting
Budget controls
Performance benchmarking
Web UI for result visualization
๐ค Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Make your changes
Run tests (
pytest)Run code quality checks (
pre-commit run --all-files)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Code Standards:
Black for formatting (100 char lines)
Ruff for linting
mypy for type checking
pytest for testing (aim for 80%+ coverage)
Comprehensive docstrings
โ Troubleshooting
API Key Issues
# Verify API keys are set
echo $ANTHROPIC_API_KEY
echo $OPENAI_API_KEY
echo $GOOGLE_API_KEY
# Test individual provider
python -c "from quorum_mcp.providers import GeminiProvider; print(GeminiProvider())"Import Errors
# Reinstall in development mode
pip install -e .
# Or reinstall with dependencies
pip install -e ".[dev]" --force-reinstallTest Failures
# Clear pytest cache
rm -rf .pytest_cache __pycache__
# Run with verbose output
pytest -vv --tb=short๐ License
MIT License - see LICENSE file for details.
๐ Acknowledgments
Built on the Model Context Protocol
Powered by FastMCP
Utilizes:
๐ฌ Contact
GitHub: @aj-geddes
Issues: GitHub Issues
Built with โค๏ธ for better AI through collaboration
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Every service you connect, one MCP endpoint for all your AI tools. Sign in once.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Chat, image, video, and audio models from many vendors behind one remote MCP server and one key.
Related MCP Servers
- AlicenseBqualityFmaintenanceEnables AI assistants to intelligently select and switch between different AI models (OpenAI, Anthropic, etc.) within the same conversation based on task requirements. Provides a unified interface for accessing multiple AI providers through a single MCP tool.164 npmMIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that enables multi-model debate and consensus building through a single tool. It orchestrates multiple AI models from various providers to debate topics and reach validated conclusions with real-time progress tracking.275 npm3MIT
- AlicenseAqualityBmaintenanceEnables collaboration across Claude, GPT, and Gemini through a unified MCP interface, with configurable execution policies for synthesizing or directly delivering worker outputs.6Apache 2.0
- AlicenseAqualityCmaintenanceLets MCP-aware agents consult rival LLMs mid-conversation, sending questions to a specific provider or fanning out to OpenAI, Gemini, Anthropic, and xAI/Grok in parallel for second opinions.2MIT