Polygon API MCP服务器

这是一个基于MCP协议的服务器,用于连接Polygon API,方便开发者通过标准接口管理Codeforces Polygon中的题目与资源。

  • by niyaznigmatullin
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 niyaznigmatullin/polygon-mcp-server

使用说明

Polygon MCP Server

MCP server for Polygon API (Codeforces Polygon).

Requirements

  • Python 3.10+
  • polygon_api==1.2.0

Install

From PyPI repository

pip install polygon-mcp-server

With uv:

uv pip install polygon-mcp-server

From the sources

Install the package (adds the polygon-mcp CLI):

pip install .

With uv:

uv pip install .

Or install the CLI tool into uv's tool environment:

uv tool install .

Run

Set credentials:

  • POLYGON_API_KEY
  • POLYGON_API_SECRET
  • Optional: POLYGON_API_URL
  • Optional: POLYGON_MCP_CONFIG to load stored credentials

Then start:

polygon-mcp

Logging

Logs are written to ~/.local/state/polygon-mcp/polygon-mcp.log (or $XDG_STATE_HOME/polygon-mcp/polygon-mcp.log if set). Override with POLYGON_MCP_LOG_FILE.

File output safety

Tools that write to disk only allow paths within:

  • the current project directory
  • /tmp
  • any extra roots in POLYGON_MCP_OUTPUT_ROOTS (colon-separated)