Skip to main content
Glama
walkingshamrock

Black-Scholes MCP Server

Black-Scholes MCP Server

This project provides a Model Context Protocol (MCP) server for calculating the price and Greeks of European options using the Black-Scholes model.

Features

  • Calculate the Black-Scholes price for European call and put options

  • Compute option Greeks and higher-order Greeks:

    • Delta

    • Vega

    • Theta

    • Gamma

    • Rho

    • Lambda

    • Epsilon

    • Vanna

    • Charm

    • Vomma

    • Veta

    • Speed

    • Zomma

    • Color

    • Ultima

    • Vera

Related MCP server: MCP Yahoo Finance

Usage

Installation and Usage

  1. Install dependencies (if using uv):

    uv pip install -r requirements.txt

    Or use your preferred Python package manager.

  2. Install this MCP server to Claude:

    uv run mcp install main.py

    This command will add the configuration to claude_desktop_config.json so that Claude can use this MCP server.

  3. (Optional) Run the MCP server directly:

    python main.py
  4. Use the MCP tools to calculate option prices and Greeks by providing the following arguments:

    • S: Spot price

    • K: Strike price

    • T: Time to maturity (in years)

    • r: Risk-free rate (annual, decimal)

    • q: Dividend yield (annual, decimal)

    • vol: Volatility (annual, decimal)

    • type: "call" or "put"

Running Tests

To run the tests for this project:

  1. Install the package in development mode:

    pip install -e .
  2. Run tests using unittest:

    python -m unittest discover -s tests

    Or with pytest (after installing pytest from requirements.txt):

    python -m pytest
  3. To run specific test modules:

    python -m unittest tests.calculators.test_black_scholes_price

    Or with pytest:

    python -m pytest tests/calculators/test_black_scholes_price.py

Acknowledgements

This project uses the modelcontextprotocol/python-sdk for MCP server implementation.

License

This project is licensed under the MIT License. See LICENSE for details.

Related MCP Connectors

  • Deterministic company valuation and corporate finance tools for AI agents — IRR, NPV, MOIC, DCF, WACC, enterprise value, EV multiples, CAPM, beta and sensitivity analysis via Model Context Protocol. Useful for financial analysis, equity analysis, quantitative analysis, financial projections, financial formulas and financial modeling.

  • Options analytics: 17 pricing models, 17 Greeks, GEX, IV, 23 screeners, unusual, dark pool, max pain

  • Deterministic time-value-of-money and fund-performance tools for AI agents — future value, present value, CAGR, annuities, perpetuities, loan payments, payback, discounted payback, DPI, RVPI and TVPI via Model Context Protocol. Useful for corporate finance, financial projections, financial analysis, quantitative analysis, financial formulas and financial modeling.

  • Deterministic profitability and market-value analysis tools for AI agents — margins, ROA, ROE, ROCE, ROIC, EPS, P/E, P/B, dividend yield and payout ratio via Model Context Protocol. Useful for corporate finance, equity analysis, financial analysis, quantitative analysis, financial formulas and financial modeling.

Related MCP Servers

  • A
    license
    B
    quality
    B
    maintenance
    A Model Context Protocol server that enables LLMs to analyze options chains, calculate Greeks, and evaluate basic options strategies through Yahoo Finance data.
    1
    39
    MIT
  • F
    license
    B
    quality
    D
    maintenance
    Provides tools to get financial data (stock prices, company information) and generate financial visualizations through the Model Context Protocol.
    10
    11
    -
  • F
    license
    A
    quality
    D
    maintenance
    Enables programmatic access to Bitpanda cryptocurrency exchange features including trades, wallets, and transactions via the Model Context Protocol.
    8
    1
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides real-time options analytics, pricing with Greeks, Monte Carlo simulations, volatility analysis, strategy backtesting, and risk metrics using actual market data from Yahoo Finance and Polygon.io.
    1
    -