Skip to main content

Overview

The MCP Server exposes static resources that provide reference documentation and specifications to LLM agents. These resources follow the MCP Resources feature specification and are accessible via the resources/read operation.
Resources are read-only and do not require parameters beyond the resource URI.

Available Resources

Pricing2Yaml Specification

The primary resource exposed by the MCP server is the Pricing2Yaml specification excerpt.
URI
string
resource://pricing/specification
Content-Type
string
text/markdown

Description

Provides comprehensive documentation of the Pricing2Yaml syntax (version 2.1), including:
  • Syntax overview - Template structure and basic examples
  • Field reference - Complete documentation of all YAML fields
  • Feature types - AUTOMATION, DOMAIN, GUARANTEE, INFORMATION, INTEGRATION, MANAGEMENT, PAYMENT, SUPPORT
  • Usage limit types - NON_RENEWABLE, RENEWABLE, RESPONSE_DRIVEN, TIME_DRIVEN
  • Value types - BOOLEAN, NUMERIC, TEXT
  • Integration types - API, EXTENSION, IDENTITY_PROVIDER, WEB_SAAS, MARKETPLACE, EXTERNAL_DEVICE
  • Best practices - Defensive pricing techniques, tagging, naming conventions
  • Examples - Real-world pricing models

Implementation

The resource content is loaded from the embedded specification file at server startup:
# From mcp_server/src/pricing_mcp/mcp_server.py:30-36
_PRICING2YAML_SPEC_PATH = (
    Path(__file__).resolve().parent.joinpath("docs", "pricing2YamlSpecification.md")
)
try:
    _PRICING2YAML_SPEC = _PRICING2YAML_SPEC_PATH.read_text(encoding="utf-8")
except FileNotFoundError:
    _PRICING2YAML_SPEC = ""
The resource handler:
# From mcp_server/src/pricing_mcp/mcp_server.py:224-229
@mcp.resource("resource://pricing/specification")
async def pricing2yaml_specification() -> str:
    """Expose the Pricing2Yaml specification excerpt as a reusable resource."""
    logger.info(RESOURCE_REQUEST, resource=RESOURCE_ID)
    logger.info(RESOURCE_RESPONSE, resource=RESOURCE_ID, length=len(_PRICING2YAML_SPEC))
    return _PRICING2YAML_SPEC

Use Cases

LLM agents use this resource to:
  • Understand Pricing2Yaml syntax when interpreting extracted pricing data
  • Validate field names before constructing filters for analysis tools
  • Ground responses by referencing the canonical specification
  • Explain pricing concepts to users using official documentation

Reading Resources

Resources are accessed via the MCP resources/read operation:
import asyncio
from mcp import ClientSession

async def read_specification():
    async with ClientSession() as session:
        content = await session.read_resource(
            "resource://pricing/specification"
        )
        return content

result = asyncio.run(read_specification())
print(result)

Response Format

The response contains the full specification markdown:
{
  "contents": [
    {
      "uri": "resource://pricing/specification",
      "mimeType": "text/markdown",
      "text": "# The Pricing2Yaml Syntax\n\n**Pricing2Yaml** (previously known as Yaml4SaaS) emerges as a pragmatic application of the *Pricing4SaaS model*...\n\n[Full specification content]"
    }
  ]
}

Specification Content Structure

The specification resource is organized into the following sections:

1. Overview

  • Introduction to Pricing2Yaml
  • Relationship to Pricing4SaaS model
  • Template example

2. Version 2.1 Fields

  • syntaxVersion - Specification version (required)
  • saasName - Product name (required)
  • version - Pricing version (optional)
  • createdAt - Model creation date (required)
  • url - Pricing page URL (optional)
  • variables - Price expression variables (optional)
  • tags - Feature groupings (optional)
  • currency - Currency code (required)
  • billing - Billing period discounts (optional)
  • features.<name>.description - Feature description
  • features.<name>.tag - Feature group
  • features.<name>.type - Feature type (AUTOMATION, DOMAIN, etc.)
  • features.<name>.valueType - BOOLEAN, NUMERIC, or TEXT
  • features.<name>.defaultValue - Default feature value
  • features.<name>.automationType - For AUTOMATION features
  • features.<name>.docUrl - For GUARANTEE features
  • features.<name>.integrationType - For INTEGRATION features
  • features.<name>.pricingUrls - For WEB_SAAS integrations
  • features.<name>.render - Display behavior
  • usageLimits.<name>.description - Limit description
  • usageLimits.<name>.type - NON_RENEWABLE, RENEWABLE, RESPONSE_DRIVEN, TIME_DRIVEN
  • usageLimits.<name>.valueType - BOOLEAN, NUMERIC, or TEXT
  • usageLimits.<name>.defaultValue - Default limit value
  • usageLimits.<name>.unit - Unit of measurement
  • usageLimits.<name>.linkedFeatures - Associated features
  • usageLimits.<name>.render - Display behavior
  • plans.<name>.description - Plan overview
  • plans.<name>.private - Visibility flag
  • plans.<name>.price - Monthly price or expression
  • plans.<name>.unit - Pricing unit (e.g., “user/month”)
  • plans.<name>.features - Feature overrides
  • plans.<name>.usageLimits - Limit overrides
  • addOns.<name>.description - Add-on overview
  • addOns.<name>.availableFor - Compatible plans
  • addOns.<name>.private - Visibility flag
  • addOns.<name>.dependsOn - Required add-ons
  • addOns.<name>.excludes - Incompatible add-ons
  • addOns.<name>.price - Monthly price or expression
  • addOns.<name>.unit - Pricing unit
  • addOns.<name>.features - Feature overrides
  • addOns.<name>.usageLimits - Limit overrides
  • addOns.<name>.usageLimitsExtensions - Limit extensions

3. Modeling Best Practices

  • Defensive pricing techniques - Aligning feature/limit states
  • Feature tagging - Using chunking for better UX
  • Naming conventions - Consistent limit naming
  • Descriptions - When to provide context
  • Avoiding TEXT valueType - Preferring BOOLEAN features

Specification Excerpt Example

Here’s a condensed excerpt showing key sections:
syntaxVersion: "2.1"
saasName: GitHub
createdAt: 2023-11-15
currency: USD
billing:
  monthly: 1
  annual: 0.90

tags:
  - Code Management
  - Collaboration
  - Security

features:
  githubPackages:
    description: Host and manage packages alongside your code
    valueType: BOOLEAN
    defaultValue: false
    type: DOMAIN
    tag: Code Management
  
  standardSupport:
    description: Email support with 24-hour response time
    valueType: BOOLEAN
    defaultValue: false
    type: SUPPORT
    tag: Support
  
  sso:
    description: Single sign-on via SAML
    valueType: BOOLEAN
    defaultValue: false
    type: INTEGRATION
    integrationType: IDENTITY_PROVIDER
    tag: Security

usageLimits:
  githubPackagesLimit:
    description: Storage for GitHub Packages
    valueType: NUMERIC
    unit: GB
    defaultValue: 0
    type: RENEWABLE
    linkedFeatures:
      - githubPackages
  
  collaborators:
    description: Number of team members
    valueType: NUMERIC
    unit: user
    defaultValue: 1
    type: NON_RENEWABLE

plans:
  FREE:
    description: For individuals and small teams
    price: 0
    unit: user/month
    features: null
    usageLimits: null
  
  TEAM:
    description: Advanced collaboration for teams
    price: 4
    unit: user/month
    features:
      githubPackages:
        value: true
      standardSupport:
        value: true
    usageLimits:
      githubPackagesLimit:
        value: 2
      collaborators:
        value: 10
  
  ENTERPRISE:
    description: Enterprise-grade features and support
    price: 21
    unit: user/month
    private: false
    features:
      githubPackages:
        value: true
      standardSupport:
        value: true
      sso:
        value: true
    usageLimits:
      githubPackagesLimit:
        value: 50
      collaborators:
        value: -1  # Unlimited

addOns:
  extraPackagesStorage:
    description: Additional GitHub Packages storage
    availableFor:
      - TEAM
      - ENTERPRISE
    price: 0.5
    unit: GB/month
    usageLimitsExtensions:
      githubPackagesLimit:
        value: 1

Resource Observability

The MCP server logs resource access for observability:
{
  "event": "mcp.resource.request",
  "resource": "resource://pricing/specification"
}
{
  "event": "mcp.resource.response",
  "resource": "resource://pricing/specification",
  "length": 85432
}

Future Resource Additions

Potential resources that may be added in future versions:

Pricing Examples

resource://pricing/examples/* - Real-world Pricing2Yaml examples

Feature Taxonomy

resource://pricing/feature-types - Detailed feature type taxonomy

Solver Documentation

resource://pricing/solvers - CSP solver comparison and usage

Migration Guides

resource://pricing/migrations/* - Version migration documentation

Resource Subscriptions

Resource subscriptions are not currently implemented. The specification resource is static and does not support change notifications.
According to the MCP specification, resource subscriptions are optional. They may be added in future versions if dynamic specification updates are needed.

MCP Tools

Explore tools that use the specification resource

Pricing2Yaml Guide

Learn about the Pricing2Yaml modeling language

Harvey Agent

See how Harvey leverages MCP resources

MCP Protocol

Understand the Model Context Protocol

Build docs developers (and LLMs) love