
Voting Mcp
io.github.HrishiKabraPublished by GitHub account HrishiKabrav0.1.3Updated Oct 24, 2026
Social-choice voting rules (Borda, Copeland, Condorcet, STV, opinion pool) as MCP tools.
Overview
Exposes social-choice voting rules such as Borda, Copeland, Condorcet, STV and opinion pool as MCP tools for aggregating ranked or approval ballots.
- What you can do
- Provides callable tools that take a profile of candidates and ballots and return a Result with the full co-winner set, a tie-broken winner, a ranking, per-candidate scores and a note. Rules include borda, copeland, condorcet, approval, stv, opinion_pool, plurality, majority and an aggregate_rule dispatcher. Tie-breaking is an explicit parameter (lexicographic by default, none, or seeded random). A separate benchmark script aggregates an ensemble of LLMs and compares each rule to naive majority vote.
- When to use it
- Useful when an assistant or multi-agent system needs to combine several voters' or models' preferences rather than just counting first choices, for example aggregating an LLM ensemble or running social-choice experiments. The benchmark is meant for measuring whether a rule beats majority vote on a reasoning dataset.
- Requirements
- Runs locally over stdio as a PyPI package (voting-mcp), typically launched with uvx or from source with uv. No accounts, API keys, environment variables or headers are declared. The optional benchmark needs the bench extra and an OpenAI-compatible client via OpenRouter, plus network access for dataset fetch and API calls.
Installation
In SourceWeft
- Open Voting Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
voting-mcp
Principled social-choice aggregation as MCP tools — with a benchmark that measures the accuracy lift over naive majority vote.
Almost every multi-agent system aggregates votes with Counter(votes).most_common(1), throwing
away preference order and confidence. voting-mcp ships the real rules (Borda, Copeland,
Condorcet, approval, STV, linear opinion pool) as callable MCP tools — each with its known
axiomatic behavior and explicit, documented tie-breaking — plus a reproducible benchmark that
aggregates a diverse ensemble of LLMs on a reasoning set and reports accuracy with bootstrap
confidence intervals.
The server is pure compute: stdio transport, no network, no file writes, no secrets — clean against the OWASP MCP Top 10 by construction.
Install
Add it to an MCP client (e.g. Claude Desktop claude_desktop_config.json):
Tools
Every tool takes a profile ({candidates, ballots}) and returns a Result with the full
co-winner set (winners, so ties are never hidden), the single tie-broken winner (or null
when none exists), a ranking, per-candidate scores, and a note.
Tie-breaking is an explicit parameter (lexicographic default, none, or seeded random).
Benchmark
Aggregate an ensemble of 5 models (one OpenAI-compatible client via OpenRouter) on ARC-Challenge and compare each rule to the naive majority vote:
Every raw response is cached under bench/results/raw/; re-runs never re-call the API, so
aggregation tweaks are free.
Results
5-model ensemble (gpt-4o-mini · gemini-2.5-flash-lite · deepseek-v3 · claude-haiku-4.5 ·
glm-4.7), n = 200, bootstrap 95% CI. Two datasets of different difficulty; full write-up and
both plots in RESULTS.md.
MMLU-Pro (hard, baseline 73.5%) — the informative case:
Δ is tested with a paired bootstrap on the per-question accuracy difference (same questions, so shared difficulty cancels), not by eyeballing the independent CIs.
The finding (honest): the value isn't "fancy voting beats majority." It's that the
confidence-preserving rule (opinion_pool) wins when the crowd is uncertain (+2.0pp, the only
rule above baseline — suggestive but not significant at n=200, paired p=0.225), while forcing
the distributions into full rankings actively hurts, significantly — every ranking rule is
below baseline at paired p≤0.014, and borda collapses to 0.472 because with 10 options the
tail of the ranking is mostly noise. Aggregate the confidence; don't throw it away. On
ARC-Challenge (baseline 96.8%, near-ceiling) nothing separates — no rule differs
significantly. See RESULTS.md.
Develop
Note: if you keep this repo under an iCloud-synced folder (e.g.
~/Desktop), iCloud can spawn duplicate.pthfiles that intermittently break the editable install. Tests usepythonpath=src; run the server withPYTHONPATH=srcif an import fails, or move the repo off the synced folder.
Related research
The choice of rules here grows out of the author's work on voting-rule design: Optimizing Voting Rules for Social Welfare and Beyond (AAMAS). That line of work asks which aggregation rules maximize welfare given how voters actually express preferences; this project applies the same lens to LLM ensembles — where the benchmark's answer is that confidence-preserving aggregation (the linear opinion pool) is what pays off, and forcing cardinal beliefs into ordinal rankings destroys signal.
License
MIT
Source: README.md at commit 1c7fb21
Tools
0Version history
1- v0.1.3LatestSep 16, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.