MCP server exposing the pyrestoolbox reservoir engineering library to AI agents
pip install pyrestoolbox-mcp Copy PIP instructions
A Model Context Protocol server that gives AI agents (Claude Code, Claude Desktop, Cursor, VS Code Copilot, any MCP host) the whole pyrestoolbox reservoir engineering library: gas, oil and brine PVT, VLP/IPR and nodal analysis, chokes and liquid loading, deliverability tests, gas pipelines, decline curves, material balance, capacitance-resistance models, simulator tables and more.
Requires Python 3.10 or later; installs pyrestoolbox 3.10.1 or later and the official mcp SDK (1.22 or later, 1.x and 2.x both supported).
With uv installed there is nothing to install first; uvx fetches and caches the server.
claude mcp add pyrestoolbox -- uvx pyrestoolbox-mcp Claude Desktop (claude_desktop_config.json) or Cursor (.cursor/mcp.json):
{ "mcpServers": { "pyrestoolbox": {"command": "uvx", "args": ["pyrestoolbox-mcp"]} } } VS Code (.vscode/mcp.json):
{ "servers": { "pyrestoolbox": {"command": "uvx", "args": ["pyrestoolbox-mcp"]} } } Without uv: pip install pyrestoolbox-mcp, then use pyrestoolbox-mcp as the command with no arguments. Desktop apps launched from a dock or start menu often do not see your shell's PATH; if the host reports that it cannot start the server, give the full path to uvx or pyrestoolbox-mcp (which uvx, or where uvx on Windows).
To pin the version for repeatable numbers: uvx pyrestoolbox-mcp@0.1.0 and, if the library must stay fixed too, uvx --with pyrestoolbox==3.10.1 pyrestoolbox-mcp.
A small set of tools that reach all 120-odd public functions, instead of one tool per function:
The same documentation is also served as MCP resources (docs://gas, docs://index, ...).
A typical exchange: the agent calls search("flowing bottomhole pressure"), gets nodal.fbhp, calls describe("nodal.fbhp"), then
call("nodal.fbhp", {"thp": 500, "well_type": "gas", "qg_mscfd": 5000, "completion": {"tid": 2.441, "length": 10000, "tht": 100, "bht": 200}}) and gets {"result": 935.8, "engine": {"pyrestoolbox": "3.10.1", "rust": true}}. Every result names the library version and whether the compiled Rust path or pure Python produced it.
pyrestoolbox-mcp --transport streamable-http --host 0.0.0.0 --port 8000 Serves the MCP endpoint at /mcp, stateless, so no session affinity is needed behind a load balancer. A Dockerfile is included (runs as a non-root user, pins the library version). The server has no authentication of its own: put a gateway in front of it.
One calculation runs at a time per process (the library's warning capture is process-global); scale with more processes or replicas.
Every tool is a pure calculation, annotated read-only, idempotent and closed-world, so hosts can auto-approve them.
From the repository root, with an mcp SDK installed:
PYTHONPATH=$PWD:$PWD/mcp python -m pytest mcp/tests/ -q Licence GPL-3.0-or-later, as for pyrestoolbox.
Both files in this release have provenance metadata.
mcp petroleum reservoir pyrestoolbox pvt agent
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Both files in this release have been uploaded with provenance metadata.
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.




