Skip to main content

Overview

The MCP Server exposes five powerful tools that enable LLM agents to extract, analyze, and optimize SaaS pricing models. All tools accept pricing data either as a URL (for extraction) or as raw YAML content (for direct analysis).
All tool results are returned as JSON content blocks, eliminating the need for text parsing.

Common Parameters

These parameters are shared across multiple tools:
pricing_url
string
URL of the SaaS pricing page to extract and analyze. If provided, the MCP server will fetch and transform the pricing data via A-MINT.Example: https://buffer.com/pricing
pricing_yaml
string
Raw Pricing2Yaml YAML content to analyze directly, bypassing extraction. Useful when you already have structured pricing data.Note: Either pricing_url or pricing_yaml must be provided for all tools.
refresh
boolean
default:"false"
Force cache refresh. When true, bypasses cached pricing data and fetches fresh data from the source.
solver
string
default:"minizinc"
CSP solver to use for analysis. Options: minizinc, choco
  • minizinc: Open-source constraint modeling language
  • choco: Java constraint solver library

iPricing

Returns the canonical Pricing2Yaml (iPricing) document for a given pricing page or YAML content.
The tool name is iPricing (camelCase) in the MCP interface.

Parameters

pricing_url
string
URL of the SaaS pricing page to extract
pricing_yaml
string
Pre-existing Pricing2Yaml content to return
refresh
boolean
default:"false"
Bypass cache and fetch fresh pricing data

Response

request
object
Request parameters echoed back
url
string | null
The pricing URL provided (if any)
refresh
boolean
Cache refresh flag
pricing_yaml
string
Complete Pricing2Yaml document in YAML format
source
string
Source of the pricing data: amint (extracted) or upload (provided)

Example

await mcp_client.call_tool(
    "iPricing",
    pricing_url="https://github.com/pricing",
    refresh=False
)

Use Case

Use iPricing when you need to:
  • Extract structured pricing data from a URL
  • Retrieve the complete pricing model for manual inspection
  • Pass pricing data to other systems or tools

summary

Provides high-level statistics and metadata about a pricing model, including counts of plans, features, usage limits, and add-ons.

Parameters

pricing_url
string
URL of the SaaS pricing page
pricing_yaml
string
Pricing2Yaml content to summarize
refresh
boolean
default:"false"
Force fresh data extraction

Response

request
object
Request parameters
url
string | null
Pricing URL provided
refresh
boolean
Cache refresh flag
summary
object
Statistical summary of the pricing model
saasName
string
Name of the SaaS product
currency
string
Currency code (e.g., USD, EUR)
planCount
integer
Number of pricing plans
featureCount
integer
Total number of features
usageLimitCount
integer
Total number of usage limits
addOnCount
integer
Number of available add-ons
plans
array
List of plan names
features
array
List of feature names
usageLimits
array
List of usage limit names

Example

await mcp_client.call_tool(
    "summary",
    pricing_url="https://buffer.com/pricing"
)

Use Case

Use summary to:
  • Get a quick overview of a pricing model’s complexity
  • Validate that pricing data was extracted correctly
  • Understand the scope before running detailed analysis

subscriptions

Enumerates all valid subscription configurations within the pricing configuration space, optionally filtered by constraints.

Parameters

pricing_url
string
URL of the SaaS pricing page
pricing_yaml
string
Pricing2Yaml content to analyze
filters
object
Constraints to filter subscriptions. Structure:
{
  "features": [{"<feature_name>": <boolean_value>}],
  "usageLimits": [{"<limit_name>": <numeric_value>}],
  "addOns": ["<addon_name>", ...]
}
solver
string
default:"minizinc"
CSP solver: minizinc or choco
refresh
boolean
default:"false"
Force cache refresh

Response

request
object
Request parameters
result
object
Analysis results from the CSP solver
cardinality
integer
Total number of valid configurations found
subscriptions
array
List of valid subscription configurations
plan
string
Plan name
addOns
array
List of add-on names included
features
object
Feature values in this configuration
usageLimits
object
Usage limit values in this configuration
monthlyPrice
number
Total monthly cost
annualPrice
number
Total annual cost (if available)

Example

await mcp_client.call_tool(
    "subscriptions",
    pricing_url="https://buffer.com/pricing",
    solver="minizinc"
)

Use Case

Use subscriptions to:
  • Enumerate all possible pricing combinations
  • Find configurations matching specific requirements
  • Understand the configuration space size
  • Compare multiple valid options

optimal

Computes the optimal subscription (cheapest or most expensive) that satisfies given constraints.

Parameters

pricing_url
string
URL of the SaaS pricing page
pricing_yaml
string
Pricing2Yaml content to analyze
filters
object
Required constraints for the subscription. Same structure as subscriptions.
objective
string
default:"minimize"
Optimization objective: minimize (cheapest) or maximize (most expensive)
solver
string
default:"minizinc"
CSP solver: minizinc or choco
refresh
boolean
default:"false"
Force cache refresh

Response

request
object
Request parameters including filters and objective
result
object
Optimal subscription configuration
plan
string
Optimal plan name
addOns
array
Required add-ons (if any)
features
object
Feature values in optimal configuration
usageLimits
object
Usage limit values in optimal configuration
monthlyPrice
number
Monthly cost of optimal configuration
annualPrice
number
Annual cost (if available)

Example

await mcp_client.call_tool(
    "optimal",
    pricing_url="https://buffer.com/pricing",
    filters={
        "usageLimits": [{"channels": 10}],
        "features": [{"analytics": True}]
    },
    objective="minimize",
    solver="minizinc"
)

Use Case

Use optimal to:
  • Find the cheapest plan meeting user requirements
  • Identify the most feature-rich configuration within budget
  • Answer “what’s the best plan for X users with Y features?”
  • Provide pricing recommendations

validate

Validates the pricing configuration against the selected CSP solver to ensure mathematical consistency.

Parameters

pricing_url
string
URL of the SaaS pricing page
pricing_yaml
string
Pricing2Yaml content to validate
solver
string
default:"minizinc"
CSP solver: minizinc or choco
refresh
boolean
default:"false"
Force cache refresh

Response

request
object
Request parameters
result
object
Validation results
valid
boolean
Whether the pricing model is valid
errors
array
List of validation errors (if invalid)
message
string
Error description
location
string
Location in YAML where error occurred
warnings
array
Non-critical warnings about the model

Example

await mcp_client.call_tool(
    "validate",
    pricing_url="https://buffer.com/pricing",
    solver="minizinc"
)

Use Case

Use validate to:
  • Check pricing model consistency before deployment
  • Identify configuration errors in YAML
  • Ensure add-on dependencies are satisfied
  • Verify feature/limit relationships

Error Handling

All tools follow consistent error patterns:

Missing Input

{
  "error": {
    "code": -32602,
    "message": "Either pricing_url or pricing_yaml must be provided for <tool_name>."
  }
}

Invalid Solver

{
  "error": {
    "code": -32602,
    "message": "solver must be either 'minizinc' or 'choco'."
  }
}

Invalid Objective

{
  "error": {
    "code": -32602,
    "message": "objective must be 'minimize' or 'maximize'."
  }
}

Service Failure

{
  "error": {
    "code": -32603,
    "message": "Analysis job failed: <specific error>"
  }
}

Implementation Reference

The tool implementations are located in:
  • Tool definitions: /mcp_server/src/pricing_mcp/mcp_server.py:39-223
  • Workflow orchestration: /mcp_server/src/pricing_mcp/workflows/pricing.py
  • A-MINT client: /mcp_server/src/pricing_mcp/clients/amint.py
  • Analysis client: /mcp_server/src/pricing_mcp/clients/analysis.py

Build docs developers (and LLMs) love