Token导航 LogoToken导航TokenDH.com
MCP Options Strategy logo
金融服务stdio官方级别未说明来源级核验

MCP Options Strategy

MCP Server

MCP期权策略服务器提供高效的看涨和看跌期权交易操作管理工具,适用于金融交易场景。

工具数

2

提示词数

0

GitHub Stars

2

资源数

0
PythonClaude金融工具Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

DefiMan1729

提供方

DefiMan1729

最后核验

2026/5/17 20:21

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run mcp

详细介绍

MCP期权策略服务器

此存储库包含用于执行的MCP服务器代码 买入期权和卖出期权。 在…上 克劳德桌面。它提供了一种高效管理期权交易操作的简化方法。

入门指南

先决条件

  • 已安装Python 3.8+
  • uv 用于管理依赖关系

设置您的环境

首先,设置您的虚拟环境并安装uv。然后按以下步骤进行:

uv init mcp-server-demo
cd mcp-server-demo

然后将MCP添加到您的项目依赖关系中:

uv add "mcp[cli]"

要使用uv运行mcp命令:

uv run mcp

MCP服务器代码

# server.py
# This script initializes an MCP server for options calculations, 
# providing tools to compute breakeven points and payoffs for Call and Put options.

from mcp.server.fastmcp import FastMCP
from options_library import Put, Call

# Create an instance of the FastMCP server
# "Demo_Options" serves as the namespace for the tools
mcp = FastMCP("Demo_Options")

# Define a tool for Call Option analysis
@mcp.tool()
def call_option(strike: float, premium: float) -> dict:
    """
    Computes breakeven price and potential payoffs for a Call Option.
    
    Parameters:
        strike (float): Strike price of the Call option.
        premium (float): Premium paid to purchase the option.
    
    Returns:
        dict: A dictionary containing:
            - breakeven: Price at which the option breaks even.
            - max_profit: Theoretically infinite (since profits scale with the underlying asset price).
            - max_loss: Fixed loss, equal to the premium paid.
    """
    call = Call(strike, premium)
    return {
        "breakeven": call.breakeven(),
        "max_profit": "infinite",  # Unlimited profit potential
        "max_loss": call.premium   # Limited loss equal to the premium
    }

# Define a tool for Put Option analysis
@mcp.tool()
def put_option(strike: float, premium: float) -> dict:
    """
    Computes breakeven price and potential payoffs for a Put Option.
    
    Parameters:
        strike (float): Strike price of the Put option.
        premium (float): Premium paid to purchase the option.
    
    Returns:
        dict: A dictionary containing:
            - breakeven: Price at which the option breaks even.
            - max_profit: Maximum profit if asset price drops to zero.
            - max_loss: Fixed loss, equal to the premium paid.
    """
    put = Put(strike, premium)
    return {
        "breakeven": put.breakeven(),
        "max_profit": strike - premium,  # Profit is capped at the strike price minus the premium
        "max_loss": premium               # Limited loss equal to the premium
    }

运行MCP服务器

mcp install server.py

Claude Desktop配置文件和屏幕截图

{
  "mcpServers": {
    "server": {
      "command": "/Users/arkaroychowdhury/.local/bin/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "/Users/arkaroychowdhury/Desktop/2025-Portfolio/Code/MCP/mcp-server-demo/server.py"
      ]
    }
  }
}

目录标签

目录标签

PythonClaude金融工具期权交易本地部署交易分析投资管理

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP