Skip to main content

MCP server for revmng: revenue-management decisions for AI agents (seat protection, overbooking, pricing, bid prices, charts).

Project description

revmng-mcp

CI PyPI License: MIT

An MCP server that exposes revmng, the revenue-management library for Python, as tools for AI agents: seat protection (Littlewood, EMSR and the exact dynamic program), overbooking, pricing, group and length-of-stay decisions, network bid prices, and ready-to-show charts.

Agents asked to set a booking limit or evaluate a group tend to do the arithmetic themselves, and the standard methods are easy to get subtly wrong: a protection level computed from the wrong tail, a group accepted without costing the demand it displaces, EMSR confused with the optimum. The calculation belongs in a deterministic, versioned, validated library that the agent calls, which leaves the agent to choose the analysis and explain the result.

revmng-mcp architecture: an AI agent calls the server's analysis and chart tools, which route to the validated revmng core and return structured JSON or a PNG chart

Tools

Analysis tools return the library's payload: the decision, supporting figures and provenance.

Tool Purpose
protection_levels nested protection levels and booking limits (EMSR-b, EMSR-a or the exact optimal DP)
overbooking_limit authorization limit, by service level or the cost trade-off
newsvendor the critical-fractile stocking quantity
optimal_price the profit-maximising price for a linear or constant-elasticity demand curve
revenue_opportunity the revenue opportunity metric (ROM) against perfect and no-control benchmarks
evaluate_group accept or reject a group by displacement analysis
evaluate_stay accept or reject a multi-night stay against nightly bid prices
bid_prices network bid prices from the deterministic LP
metrics RevPAR, ADR, occupancy, yield and load factor
describe_inputs the input fields and the method definitions

Chart tools return a PNG image.

Tool Purpose
protection_chart the nested booking limits, or the EMSR curves
overbooking_chart the overbooking cost trade-off
price_chart revenue, profit and demand against price
newsvendor_chart expected profit against order quantity
revenue_opportunity_chart perfect, no-control and realised revenue
bid_price_chart the bid price per resource

All tools are read-only.

Installation

Run it with uv (no install needed):

uvx revmng-mcp

or install from PyPI:

pip install revmng-mcp

Configuration

Add it to your MCP client. For example:

{
  "mcpServers": {
    "revmng": {
      "command": "uvx",
      "args": ["revmng-mcp"]
    }
  }
}

If you installed with pip, use "command": "revmng-mcp" with no args.

Example

protection_levels(classes=[
  {"fare": 1000, "mean": 30, "sd": 12},
  {"fare": 700,  "mean": 40, "sd": 15},
  {"fare": 400,  "mean": 60, "sd": 20}
], capacity=120, method="emsr_b")
  -> { "method": "EMSR-b",
       "booking_limits_int": [120, 97, 50],
       "summary": "EMSR-b - capacity 120 ..." }

Design

The server is a thin, stateless wrapper. All of the arithmetic lives in the revmng library, which computes from the standard methods and is validated against published worked examples (Phillips 2005) and cross-checked against an exact dynamic program. The server adds the tool schema, read-only annotations and an input-schema helper so an agent can format the input and act on the result. Demand is supplied by the caller; forecasting is out of scope.

Related

  • revmng: the library this server wraps.

License

MIT. Written and maintained by Atakan Arikan, MSc Student at Tsinghua University and Politecnico di Milano.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

revmng_mcp-0.1.0.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

revmng_mcp-0.1.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file revmng_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: revmng_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for revmng_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c674ddaf0eb84f64b420c7087dcc65f562905781cb29ffe8ea6c1d9e5393a008
MD5 904bf27d47a257952bdce339c158e800
BLAKE2b-256 76222900eb2d686457dcac7b72be18f426a17a430fd5fbed98984b9604e33d1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for revmng_mcp-0.1.0.tar.gz:

Publisher: release.yml on arikanatakan/revmng-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file revmng_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: revmng_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for revmng_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efe2a0068537963db0e3661a9cdab8a6d563f95af505cce154ddcd0c1c3becdd
MD5 39e740439ef9a00b0ca2fa3a34003bad
BLAKE2b-256 635365dd17bc7784326b6dee20ad3c5eb9eafff292e2fa7a628c70ab468aa9a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for revmng_mcp-0.1.0-py3-none-any.whl:

Publisher: release.yml on arikanatakan/revmng-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page