Black-Scholes MCP Server

Black-Scholes MCP Server

Enables calculation of European option prices and Greeks (like Delta, Vega, Theta) using the Black-Scholes model through a Model Context Protocol implementation.

Category
Visit Server

README

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

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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured