Skip to main content

gametheory-mcp

mcp-name: io.github.ryuxik/gametheory-mcp

Equilibrium-aware primitives for AI agents — negotiation, auctions, mechanism design — exposed over MCP and importable as a Python library.

LLMs are structurally bad at multi-round, opponent-modeling problems with closed-form solutions. This package gives them the math.

PyPI License: Apache 2.0

Install

pip install gametheory-mcp

Use it as an MCP server

Add to your MCP-aware client config (Claude Desktop, etc.):

{
  "mcpServers": {
    "gametheory": {
      "command": "gametheory-mcp"
    }
  }
}

The server is stdio-only. 13 tools across three tiers:

  • Tier 1 — Negotiation: gt_negotiation_sell_next_offer, gt_negotiation_buy_next_offer, gt_negotiation_detect_anchor_attack
  • Tier 2 — Auctions: gt_auction_optimal_bid, gt_auction_optimal_reserve, gt_auction_format_recommendation, gt_auction_simulate
  • Tier 3 — Mechanism Design: gt_mechanism_gale_shapley, gt_mechanism_optimal_auction_design, gt_mechanism_posted_price_optimal

Use it as a library

from gametheory_mcp.negotiation import sell_next_offer
from gametheory_mcp.auctions import optimal_bid
from gametheory_mcp.mechanism import gale_shapley

# Sell-side next-offer recommendation
rec = sell_next_offer(
    my_reservation=0.4,
    opponent_offer_history=[0.6, 0.55],
    my_offer_history=[0.85],
    deadline_rounds=8,
    pareto_knob=0.5,  # 0=max deal rate, 1=max margin
)
# → {recommended_offer, acceptance_probability, expected_payoff, ...}

# Vickrey is dominant-strategy truthful
bid = optimal_bid(
    auction_format="second_price_vickrey",
    my_valuation=0.7,
    n_competing_bidders=3,
    competitor_value_prior={"family": "uniform",
                             "params": {"low": 0, "high": 1}},
)
# → {optimal_bid: 0.7, dominant_strategy: True, ...}

What's in the package

The math primitives — Rubinstein 1982 SPE, Myerson 1981 optimal auction, Gale-Shapley deferred acceptance, Bayesian particle filter for opponent WTP inference. Empirical Pareto frontier data and tournament-tuned parameters are bundled in gametheory_mcp/_data/.

What's NOT in the package

The hosted API at https://api.snhp.dev adds:

  • Cryptographic first-strike commit-reveal for buy-side defense (requires server-side EdDSA keys + global commitment ledger; can't run cleanly in a stdio MCP process)
  • Vertical-specific Bayesian priors that warm-start new agents from the opt-in telemetry corpus
  • GDPR-compliant data export and deletion for the corpus

The hosted API is free for math endpoints (600 requests/min per key). Self-serve key issuance at POST https://api.snhp.dev/v1/keys.

Empirical anchor

SNHP — the negotiation strategy this package wraps — was rank #1 of 21 in a NegMAS round-robin tournament against well-known programmatic opponents (Aspiration, Anchorer, BATNA Bluffer, etc.). Statistically beats Aspiration (p=0.011), Split-the-Diff (p=0.014), Fair Demand (p<0.001).

Live leaderboard with LLM baselines: https://snhp.dev

License

Apache 2.0. See LICENSE.

Metadata

Release files for gametheory-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gametheory-mcp 0.1.2
File Size Uploaded Provenance
gametheory_mcp-0.1.2.tar.gz 38.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for gametheory-mcp 0.1.2
File Interpreter ABI Platform
gametheory_mcp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 83.5 kB

Release files / gametheory_mcp-0.1.2.tar.gz

Download URL gametheory_mcp-0.1.2.tar.gz
Size 38.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5780bd6f9777b9529deafe35683e8fa17c2a04d130ccd9052e804ec78087cbd0
BLAKE2b-256 checksum
How to use checksums
5fb78a26c4b883b1b3a896d62648b4d0c9bf006e55bcfaa5a3a94840b5d37e90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / gametheory_mcp-0.1.2-py3-none-any.whl

Download URL gametheory_mcp-0.1.2-py3-none-any.whl
Size 45.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84e17ada67c6b7133d04d808da7d429d76a11e0097256bc45052185b818f86c6
BLAKE2b-256 checksum
How to use checksums
c9ab68d8f1f565da7ee3645f282728bc2e71c89fee67cf974ae3474dfda92f60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for gametheory-mcp 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page