JM

jasonwu001t/marketlens-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 0 forks 质量 81 趋势 20MIT

只读市场数据MCP服务器:一个厂商中立的模式(内置Alpaca),本地DuckDB结果存储用于大数据,核心分析和插件API。麻省理工学院。

概览

一款只读的模型上下文协议服务器,用于市场数据和分析。它以一个供应商中立的模式回答数据提供商(Alpaca内置;其他供应商插入),将大型结果排除在模型上下文窗口之外,存储在本地DuckDB结果库中,模型用只读SQL查询该数据,计算存储结果的常见分析(回报、波动率、相关性、回撤、贝塔值等),并允许你选择其可能使用的功能。通过可选的数据额外功能,它还回答官方来源的时间点:FRED、BLS和BEA系列(CPI、失业率、工资、GDP)、SEC EDGAR文件、XBRL事实、基本面、财报发布、内幕交易、13F和基金持仓、FOMC、纽约联储参考利率、美国财政部收益率曲线、拍卖、债务和现金,以及市场日历。它可以支持任何MCP客户端和你自己的提供商密钥。 Alpha(0.2.0,未发布)。工具名称、规范模式(1.1.0)和插件API(1.

概述(AI 翻译)

一款只读的模型上下文协议服务器,用于市场数据和分析。它以一个供应商中立的模式回答数据提供商(Alpaca内置;其他供应商插入),将大型结果排除在模型上下文窗口之外,存储在本地DuckDB结果库中,模型用只读SQL查询该数据库,计算存储结果的通用分析(回报、波动率、相关性、回撤、贝塔值等),并允许你选择其可使用的功能。通过可选的data附加功能,它还回答官方来源的时间点:FRED、BLS和BEA系列(CPI、失业率、工资、GDP)、SEC EDGAR文件、XBRL事实、基本面、财报发布、内幕交易、13F和基金持仓、FOMC、纽约联储参考利率、国债收益率曲线、拍卖、债务和现金,以及市场日历。内置且无密钥,它还能读取来自联邦储备委员会、SEC、BLS、BEA、CFTC 和欧洲央行的官方头条新闻(新闻稿、演讲、证词、执法和数据发布通知)。它适用于任何 MCP 客户端和您自己的服务提供商密钥。

状态

Alpha(0.2.0,未发布)。工具名称、规范模式(1.1。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

marketlens-mcp

A read-only Model Context Protocol server for market data and analytics. It answers in one vendor-neutral schema whatever the data provider (Alpaca is built in; other providers plug in), keeps large results out of the model’s context window in a local DuckDB result store that the model queries with read-only SQL, computes common analytics (returns, volatility, correlation, drawdown, beta, …) on those stored results, and lets you choose which capabilities it may use. With the optional data extra it also answers from official sources, point in time: FRED, BLS and BEA series (CPI, the unemployment rate, payrolls, GDP), SEC EDGAR filings, XBRL facts, fundamentals, earnings releases, insider trades, 13F and fund holdings, the FOMC, NY Fed reference rates and the Treasury’s yield curve, auctions, debt and cash, material filing events (8-K items and 6-Ks), plus market calendars. Built in, it also searches EDGAR’s full text (filings_search) and reads official headlines (press releases, speeches, testimony, enforcement and data-release notices) from the Federal Reserve Board, SEC, BLS, BEA, CFTC and ECB feeds; the SEC and BLS parts ask for a contact email in the User-Agent, the rest is keyless. It works with any MCP client and your own provider keys.

Where it sits: this package is the public core. It owns the schema, the result store, the analytics and the Alpaca and official-feeds providers, and it knows nothing about any one application. Official data reaches it two ways: the data extra installs marketlens-data (import name omni), the point-in-time collector, beside it; or an application that already runs that collector behind its own API exposes that API as a plugin (the plugin API below), in which case the extra is not installed and the two never overlap.

Status

Alpha (0.2.0, unreleased). The tool names, the canonical schema (1.1.0) and the plugin API (1.0) are versioned; see CHANGELOG.md.

How it works

flowchart TB
  client["MCP clientClaude Desktop, Claude Code, any MCP client"]
  subgraph server["marketlens-mcp process"]
    direction TB
    transport["transport.pystdio, or streamable HTTP on 127.0.0.1 with a bearer token"]
    policy["config.py + policy.pyconfig.yaml, capabilities on/off"]
    registry["registry.py + manifest.pyevery tool: name, capability, route, models"]
    pipeline["pipeline.pyvalidate args, run the handler, canonical rows"]
    offload["offload.pyinline, or stored with a result_id"]
    trust["trust.py_marketlens envelope, provenance, notes"]
    subgraph providers["providers (one plugin API)"]
      alpaca["alpaca/market, reference, news,portfolio, provider.docs"]
      data["data/ (optional extra)macro, filings, fed_treasury,holidays, calendars"]
      official["official/news_official, filings_search"]
在 GitHub 查看完整 README

安装

uvx --from git+https://github.com/jasonwu001t/marketlens-mcp marketlens-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "marketlens": { "command": "uvx", "args": ["--from", "git+https://github.com/jasonwu001t/marketlens-mcp", "marketlens-mcp"], "env": { "ALPACA_API_KEY": "your key id", "ALPACA_SECRET_KEY": "your secret key", "SEC_CONTACT_EMAIL": "[email protected]" } } } }