prun-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@prun-mcp show me the exchange prices for RAT"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
prun-mcp
MCP server for Prosperous Universe game data via the FIO API.
Overview
This is a Model Context Protocol (MCP) server that provides tools for accessing Prosperous Universe game data. It uses the FIO REST API to fetch live game information.
Related MCP server: factory-resource-manager-mcp
Installation
Requires Python 3.11+ and uv.
# Clone the repository (includes submodules)
git clone --recurse-submodules <repo-url>
cd prun-mcp
# Or if already cloned without submodules:
git submodule update --init
# Install dependencies
uv syncNote: This MCP Server uses content from fnar/prun-community-derived-mechanics as a git submodule for game mechanics formulas.
Note on toon-format
This project uses toon-python for TOON serialization (30-60% token reduction vs JSON). The library is installed directly from GitHub because the PyPI version (v0.1.0) has an unimplemented encoder. This is configured in pyproject.toml via [tool.uv.sources].
Usage
Local
uv run prun-mcpDocker
# Build the image
docker build -t prun-mcp:latest .
# Run with STDIO transport
docker run -i prun-mcp:latestClaude Code Configuration
Add the server (local):
claude mcp add prun-mcp -- uv run --directory /path/to/prun-mcp prun-mcpAdd the server (Docker):
claude mcp add prun-mcp -- docker run -i prun-mcp:latestManagement commands:
claude mcp list # List configured servers
claude mcp remove prun-mcp # Remove the serverManual Configuration
Alternatively, add to your MCP client configuration (~/.claude.json):
{
"mcpServers": {
"prun-mcp": {
"command": "uv",
"args": ["run", "--directory", "/path/to/prun-mcp", "prun-mcp"]
}
}
}Or with Docker:
{
"mcpServers": {
"prun-mcp": {
"command": "docker",
"args": ["run", "-i", "prun-mcp:latest"]
}
}
}Available Tools
Category | Tools | Documentation |
Materials |
| |
Buildings |
| |
Planets |
| |
Recipes |
| |
Exchange |
| |
Market Analysis |
| |
COGM |
| |
Permit I/O |
| |
Base Plans |
|
Available Resources
URI | Description |
| List all commodity exchanges with codes and names |
| List workforce types in tier order (Pioneers → Scientists) |
| List habitation buildings with workforce capacities |
| Building efficiency formula and factors overview |
| Workforce satisfaction impact on efficiency |
| Expert bonus system (up to ~28.4%) |
| CoGC ADVERTISING program bonuses (up to 25%) |
| Building condition and maintenance |
| List of available game mechanics topics |
| ARC level formula |
| Building condition and repair cost formulas |
| HQ upgrade costs and efficiency formula |
| Planet resource extraction formulas |
| Population needs, happiness, and growth |
| Ship construction formulas and component volumes |
| Workforce efficiency formulas |
Configuration
Environment Variable | Description | Default |
| Directory for cache files (materials, buildings, recipes) |
|
Development
# Install dev dependencies
uv sync
# Run tests
PYTEST_DISABLE_PLUGIN_AUTOLOAD="" uv run pytest
# Lint and format
uv run ruff check .
uv run ruff format .
# Type check
uv run pyrightProject Structure
prun-mcp/
├── data/
│ └── community-mechanics/ # Git submodule: FNAR community-derived game mechanics
├── src/prun_mcp/
│ ├── __init__.py
│ ├── app.py # FastMCP instance
│ ├── server.py # Entry point
│ ├── fio/ # FIO API client
│ │ ├── __init__.py
│ │ ├── client.py # HTTP client for FIO API
│ │ └── exceptions.py # Custom exceptions
│ ├── cache/ # JSON-based caching layer (24h TTL)
│ │ ├── __init__.py
│ │ ├── materials_cache.py
│ │ ├── buildings_cache.py
│ │ ├── recipes_cache.py
│ │ └── workforce_cache.py
│ ├── models/ # Pydantic models for type safety
│ │ ├── __init__.py
│ │ ├── fio.py # FIO API response models
│ │ └── domain.py # Domain output models (COGM, BuildingCost, etc.)
│ ├── prun_lib/ # Business logic layer (reusable as standalone library)
│ │ ├── __init__.py # Public API exports
│ │ ├── exceptions.py # Unified exception classes
│ │ ├── building.py # Building cost calculations
│ │ ├── cogm.py # COGM (Cost of Goods Manufactured) calculations
│ │ ├── market.py # Market analysis logic
│ │ ├── base_io.py # Base I/O calculations
│ │ ├── exchange.py # Exchange validation and data fetching
│ │ └── ... # Additional business logic modules
│ ├── storage/ # Persistent storage
│ │ ├── __init__.py
│ │ ├── base_plan_storage.py # Base plan JSON storage
│ │ └── validation.py # Plan validation rules
│ ├── resources/ # Static reference data (MCP resources)
│ │ ├── __init__.py
│ │ ├── buildings.py # Building efficiency documentation
│ │ ├── exchanges.py # Exchange data resource
│ │ ├── extraction.py # Extraction building constants
│ │ ├── mechanics.py # Community mechanics resources
│ │ └── workforce.py # Workforce types and habitation
│ └── tools/ # Thin MCP tool wrappers
│ ├── __init__.py
│ ├── materials.py # Material-related tools
│ ├── buildings.py # Building-related tools
│ ├── planets.py # Planet-related tools
│ ├── recipes.py # Recipe-related tools
│ ├── exchange.py # Exchange/pricing tools
│ ├── market_analysis.py # Market analysis tools
│ ├── cogm.py # COGM calculation tool
│ ├── building_cost.py # Building cost calculation tool
│ ├── permit_io.py # Permit I/O calculation tool
│ ├── base_plans.py # Base plan management tools
│ └── info.py # Server info tools (version, cache status)Architecture Note: Tools are "ultra-thin" wrappers that validate input, delegate to prun_lib for business logic, and serialize output with TOON. This separation allows prun_lib to be used as a standalone library for Prosperous Universe calculations.
License
MIT
Available Tools
28 toolsanalyze_fill_costA
Calculate expected cost/proceeds for a specific quantity.
Walks the order book to account for slippage when executing a trade.
Args:
ticker: Material ticker symbol (e.g., "RAT"). Single ticker only.
exchange: Exchange code (e.g., "CI1").
Valid: AI1, CI1, CI2, IC1, NC1, NC2.
quantity: Number of units to buy or sell.
direction: "buy" or "sell".
Returns:
TOON-encoded fill analysis including fills breakdown, VWAP,
slippage, and limit price recommendations.
Inputs: ticker (required), exchange (required), quantity (required), direction (required). Returns: result
calculate_building_costA
Calculate total cost to build a building on a planet.
Calculates the complete material requirements including base building
costs and infrastructure materials based on planetary environment
(surface type, pressure, gravity, temperature).
Args:
building_ticker: Building ticker (e.g., "FP", "HB1", "FRM").
planet: Planet identifier (name, natural ID, or planet ID).
exchange: Optional exchange code for cost calculation (e.g., "CI1").
Valid: AI1, CI1, CI2, IC1, NC1, NC2.
Returns:
TOON-encoded breakdown of materials including base costs
and infrastructure requirements based on planet environment.
If exchange is provided, includes price and cost per material.
Inputs: planet (required), building_ticker (required), exchange. Returns: result
calculate_cogmA
Calculate Cost of Goods Manufactured for a recipe.
Args:
recipe: Recipe name (e.g., "1xGRN 1xBEA 1xNUT=>10xRAT")
exchange: Exchange code for pricing (e.g., "CI1").
Valid: AI1, CI1, CI2, IC1, NC1, NC2.
efficiency: Production efficiency multiplier (default: 1.0 = 100%)
self_consume: If True, use produced output to satisfy workforce needs.
Returns:
TOON-encoded COGM breakdown including cogm_per_unit, costs, and output.
Inputs: recipe (required), exchange (required), efficiency, self_consume. Returns: result
calculate_permit_ioA
Calculate daily material I/O for a base.
Args:
production: List of production lines with recipe, count, efficiency.
habitation: List of habitation buildings with building, count.
exchange: Exchange code for pricing. Valid: AI1, CI1, CI2, IC1, NC1, NC2.
permits: Number of permits for this base (default: 1).
extraction: Optional extraction operations with building, resource, count.
planet: Planet identifier (required if extraction is provided).
Returns:
TOON-encoded daily I/O breakdown with materials, workforce, area.
Inputs: exchange (required), habitation (required), production (required), planet, +2 more. Returns: result
calculate_plan_ioA
Calculates daily I/O for a saved base plan.
Loads the specified plan and calculates material input/output,
workforce requirements, and daily costs using current market prices.
Args:
name: Plan identifier.
exchange: Exchange code for pricing (e.g., "CI1").
Valid: AI1, CI1, CI2, IC1, NC1, NC2.
Returns:
TOON-encoded I/O breakdown (same format as calculate_permit_io):
- materials: List of {ticker, in, out, delta, cis_per_day}
- workforce: Required workers by type
- habitation: Capacity vs required validation
- area: Used vs limit validation
- totals: Net CIS/day
Inputs: name (required), exchange (required). Returns: result
delete_base_planB
Removes a base plan.
Args:
name: Plan identifier.
Returns:
Success confirmation or error if not found.
Inputs: name (required). Returns: result
get_all_materialsB
Get all materials from the cache.
Returns:
TOON-encoded list of all materials with their properties.
Inputs: no named parameters. Returns: result
get_base_planA
Retrieves a single base plan by name.
Args:
name: Plan identifier.
Returns:
TOON-encoded plan data or error if not found.
Inputs: name (required). Returns: result
get_building_infoA
Get information about a building by its ticker symbol.
Args:
ticker: Building ticker symbol(s). Can be single (e.g., "PP1")
or comma-separated (e.g., "PP1,HB1,FRM").
Also accepts BuildingId (32-character hex string).
Returns:
TOON-encoded building data including name, area, expertise,
construction costs, and workforce requirements.
Inputs: ticker (required). Returns: result
get_cache_infoB
Get cache status for all data caches.
Returns:
TOON-encoded cache info including validity, counts, age, and file paths.
Inputs: no named parameters. Returns: result
get_exchange_allA
Get summary prices for all materials on a specific exchange.
Args:
exchange: Exchange code(s). Can be single (e.g., "CI1")
or comma-separated (e.g., "CI1,NC1").
Valid: AI1, CI1, CI2, IC1, NC1, NC2.
Returns:
TOON-encoded list of all material prices on the exchange(s).
Inputs: exchange (required). Returns: result
get_exchange_pricesA
Get current market prices with full order book for material(s).
Args:
ticker: Material ticker symbol(s). Can be single (e.g., "RAT")
or comma-separated (e.g., "RAT,BSE,H2O").
exchange: Exchange code(s). Can be single (e.g., "CI1")
or comma-separated (e.g., "CI1,NC1").
Valid: AI1, CI1, CI2, IC1, NC1, NC2.
Returns:
TOON-encoded price data including full order book (BuyingOrders,
SellingOrders), bid/ask, supply/demand, and price statistics.
Inputs: ticker (required), exchange (required). Returns: result
get_market_summaryA
Get a quick market snapshot with actionable warnings.
Args:
ticker: Material ticker symbol(s). Single (e.g., "RAT") or
comma-separated (e.g., "RAT,COF,SF").
exchange: Exchange code (e.g., "CI1"). Single exchange only.
Valid: AI1, CI1, CI2, IC1, NC1, NC2.
Returns:
Plain text market summary with bid/ask, spread, supply/demand,
and warnings about market conditions.
Inputs: ticker (required), exchange (required). Returns: result
get_material_infoA
Get information about a material by its ticker symbol.
Args:
ticker: Material ticker symbol(s). Can be single (e.g., "BSE")
or comma-separated (e.g., "BSE,RAT,H2O").
Also accepts MaterialId (32-character hex string).
Returns:
TOON-encoded material data including name, category, weight, and volume.
Inputs: ticker (required). Returns: result
get_order_book_depthA
Get full order book in TOON tabular format.
Args:
ticker: Material ticker symbol(s). Single (e.g., "RAT") or
comma-separated (e.g., "RAT,COF").
exchange: Exchange code (e.g., "CI1"). Single exchange only.
Valid: AI1, CI1, CI2, IC1, NC1, NC2.
side: "buy" (bids), "sell" (asks), or "both". Default: "both".
levels: Maximum price levels per side. Capped to 10 for multi-ticker.
Valid: 1-100. Default: 20.
Returns:
TOON-encoded order book with aggregated levels and cumulative
calculations for cost/proceeds analysis.
Inputs: ticker (required), exchange (required), side, levels. Returns: result
get_planet_infoA
Get information about a planet by its identifier.
Args:
planet: Planet identifier(s). Can be single (e.g., "Katoa")
or comma-separated (e.g., "Katoa,Montem,Promitor").
Accepts PlanetId, PlanetNaturalId (e.g., "XK-745b"), or PlanetName.
Returns:
TOON-encoded planet data including resources, environment, and other details.
Inputs: planet (required). Returns: result
get_price_historyA
Get historical price data in TOON tabular format.
Args:
ticker: Material ticker symbol(s). Single (e.g., "RAT") or
comma-separated (e.g., "RAT,COF,SF").
exchange: Exchange code (e.g., "CI1"). Single exchange only.
Valid: AI1, CI1, CI2, IC1, NC1, NC2.
days: Historical lookback period in days. Valid: 1-30. Default: 7.
Returns:
TOON-encoded time series with daily OHLCV data and summary
statistics for trend analysis.
Inputs: ticker (required), exchange (required), days. Returns: result
get_price_history_summaryA
Compare current market conditions to historical norms.
Args:
ticker: Material ticker symbol(s). Single (e.g., "RAT") or
comma-separated (e.g., "RAT,COF,SF").
exchange: Exchange code (e.g., "CI1"). Single exchange only.
Valid: AI1, CI1, CI2, IC1, NC1, NC2.
days: Historical lookback period in days. Valid: 1-30. Default: 7.
Returns:
Plain text historical comparison with current vs. historical
prices, spreads, volume, and insights.
Inputs: ticker (required), exchange (required), days. Returns: result
get_recipe_infoA
Get recipes that produce a specific material.
Args:
ticker: Material ticker symbol(s). Can be single (e.g., "BSE")
or comma-separated (e.g., "BSE,RAT,H2O").
Returns:
TOON-encoded recipe data including building, inputs, outputs, and duration.
Inputs: ticker (required). Returns: result
get_versionA
Get prun-mcp server version.
Returns:
Server version string.
Inputs: no named parameters. Returns: result
list_base_plansA
Lists all stored base plans.
Args:
active: Filter by active status (optional).
If None, returns all plans.
If True, returns only active plans (real in-game bases).
If False, returns only inactive plans (planning/reference).
Returns:
TOON-encoded array of plan summaries containing:
- name: Plan identifier
- planet: Planet ID
- planet_name: Human-readable name (if set)
- active: Whether the plan is active
- updated_at: Last update timestamp
Inputs: active. Returns: result
refresh_buildings_cacheA
Refresh the buildings cache from FIO API.
Forces a fresh download of all building data, bypassing the TTL.
Returns:
Status message with the number of buildings cached.
Inputs: no named parameters. Returns: result
refresh_materials_cacheA
Refresh the materials cache from FIO API.
Forces a fresh download of all materials data, bypassing the TTL.
Returns:
Status message with the number of materials cached.
Inputs: no named parameters. Returns: result
refresh_recipes_cacheA
Refresh the recipes cache from FIO API.
Forces a fresh download of all recipe data, bypassing the TTL.
Returns:
Status message with the number of recipes cached.
Inputs: no named parameters. Returns: result
save_base_planA
Creates or updates a base plan.
Args:
name: Plan identifier (unique name).
planet: Planet ID (e.g., "KW-020c").
habitation: Habitation buildings, each with:
- building: Building ticker (e.g., "HB1")
- count: Number of buildings
production: Recipe assignments, each with:
- recipe: Full recipe name (e.g., "1xGRN 1xALG 1xVEG=>10xRAT")
- count: Number of buildings running this recipe
- efficiency: Efficiency multiplier (e.g., 1.33 for 133%)
planet_name: Human-readable planet name (optional).
cogc_program: Active COGC program if any (optional).
expertise: Expert counts by category using PascalCase keys (optional).
Valid keys: Agriculture, Chemistry, Construction, Electronics,
FoodIndustries, FuelRefining, Manufacturing, Metallurgy,
ResourceExtraction.
storage: Storage buildings with capacity (optional), each with:
- building: Storage ticker (e.g., "STO")
- count: Number of buildings
- capacity: Storage capacity
extraction: Resource extraction operations (optional), each with:
- building: Extraction building ticker (EXT, RIG, COL)
- resource: Material ticker to extract (e.g., "GAL", "FEO")
- count: Number of buildings
- efficiency: Efficiency multiplier (default: 1.0)
notes: Freeform notes (optional).
active: Whether the plan represents an active in-game base (default: False).
Active plans represent real bases/permits; inactive plans are for
planning or reference only.
overwrite: Must be true to update an existing plan.
Returns:
TOON-encoded saved plan with any validation warnings.
Inputs: name (required), planet (required), habitation (required), production (required), +8 more. Returns: result
search_buildingsA
Search buildings by construction materials, expertise, or workforce.
Args:
commodity_tickers: Material tickers (e.g., ["BSE", "BBH"]).
Returns buildings that use ALL specified materials.
expertise: Expertise type. Valid values: AGRICULTURE, CHEMISTRY,
CONSTRUCTION, ELECTRONICS, FOOD_INDUSTRIES, FUEL_REFINING,
MANUFACTURING, METALLURGY, RESOURCE_EXTRACTION.
workforce: Workforce type. Valid values: Pioneers, Settlers,
Technicians, Engineers, Scientists.
Returns:
TOON-encoded list of matching buildings (Ticker and Name only).
Use get_building_info for full details. All buildings if no filters.
Inputs: expertise, workforce, commodity_tickers. Returns: result
search_planetsA
Search planets by resource criteria.
Args:
include_resources: Comma-separated material tickers that must be present
(e.g., "FEO,LST"). Maximum 4 materials.
exclude_resources: Comma-separated material tickers to exclude
(e.g., "H2O,O"). Client-side filtering.
limit: Maximum planets to return (default 20).
top_resources: Number of top resources to show per planet (default 3).
Returns:
TOON-encoded list of planets with name, id, gravity, temperature,
fertility, and top resources by factor.
Inputs: limit, top_resources, exclude_resources, include_resources. Returns: result
search_recipesA
Search recipes by building, input materials, or output materials.
Args:
building: Building ticker to filter by (e.g., "PP1", "FP").
input_tickers: Input material tickers (e.g., ["GRN", "BEA"]).
Returns recipes that use ALL specified materials.
output_tickers: Output material tickers (e.g., ["RAT"]).
Returns recipes that produce ALL specified materials.
Returns:
TOON-encoded list of matching recipes.
Inputs: building, input_tickers, output_tickers. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 28 tools
Most tools target clearly distinct resources or actions across base plans, buildings, recipes, planets, materials, and market data. However, several market/analysis pairs overlap in surface purpose—get_exchange_prices vs get_order_book_depth, get_price_history vs get_price_history_summary, and calculate_plan_io vs calculate_permit_io—so agents must read descriptions to choose the right granularity/format.
Tool names consistently use snake_case and start with clear action verbs such as get_, list_, search_, calculate_, refresh_, save_, and delete_. The few compound names and the calculate_cogm acronym still fit the overall pattern and remain readable.
At 28 tools, the server is above the typical sweet spot and includes multiple market-analysis variants that could plausibly be consolidated. Still, it covers several substantive domains—base planning, recipes, buildings, planets, materials, and market data—so the count is heavy rather than wildly excessive.
Base plans have full create/read/update/delete plus IO calculation, and recipes, buildings, materials, planets, and market data have solid lookup/search coverage. Minor gaps exist, such as no broader planet environment search or production-chain solver, but the core workflows are covered.
Maintenance
Related MCP Connectors
BusCalc 1.8.0 exposes 33 public tool families: 26 calculations and seven attributed data lookups. Calculate business pricing, finance, uncertainty, lease economics and emergency dispatch margins. Look up metals, energy, exchange rates, weather, BLS, USDA, Census and selected emergency sources, including NOAA gauges and USGS flood-impact points. Calculations include unsigned replayable receipts. Lookup results include source and observation dates where available. Road and outage coverage varies by location. The public Streamable HTTP endpoint is https://buscalc.com/api/mcp. Direct access is anonymous and rate limited. Full guide: https://buscalc.com/for-ai/
Derived prediction-market flow, price changes, trader research and news. 11 read-only tools.
Official Intrinio MCP server. US stock prices, options and fundamentals for AI agents.
OpenFinance gives any AI agent easy trading across every major market through one hosted MCP server. Trade crypto spot and perpetuals on Hyperliquid with market, limit and TWAP orders, leverage and margin control. Trade stocks, indices, commodities, forex and pre-IPO names as Hyperliquid HIP-3 perps. Trade Polymarket prediction markets with odds, order books, positions, PnL and trader leaderboards. Swap and bridge across 40+ EVM chains and Solana with Relay and Jupiter, find memecoins across 200+ chains, launch tokens on Robinhood Chain and Solana, and buy crypto with card, bank or UPI. Write actions are designed to ask for your confirmation first. Connect with OAuth (sign in to OpenFinance and approve) or an API key. Works with Claude, ChatGPT, Cursor, VS Code, Codex and any MCP client. No install. Home: https://openfinance.tech/agents · Docs: https://docs.openfinance.tech · GitHub: https://github.com/openfinance-tech/mcp
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to search EVE Online items, validate ship fits against fitting limits, compute combat stats like DPS and EHP, and retrieve Jita market prices.4MIT
- AlicenseNot gradedqualityBmaintenanceEnables querying a live Satisfactory game through Ficsit Remote Monitoring to answer questions about production, power, logistics, and factory health.MIT
- AlicenseAqualityBmaintenanceExposes nine purpose-built tools for EVE: Frontier on Sui Move, covering Smart Assembly contract coding, Smart Gate route and toll planning, Network Node gigajoule optimization, Smart Turret targeting, killmail threat intel, SSU market making, zkLogin character verification, sovereignty fuel tracking, and PTB drain simulation.141MIT
- AlicenseBqualityCmaintenanceEnables MCP clients to answer Star Citizen crafting, mining and trading questions from public game data: product recipes with quality effects, mining locations, scan signatures and refinery yields, plus terminal prices and UEX player marketplace listings. It is read-only and requires no account.14MIT