Skip to main content
Glama
Toolstem MCP Server
by toolstem

Toolstem MCP 服务器

为 AI Agent 准备的金融智能工具 —— 精心整理,而非原始数据。

Toolstem 是一个 MCP(模型上下文协议)服务器,它将原始金融市场数据转化为供 AI Agent 使用的精选合成情报。与仅仅暴露供应商 REST API 的透传包装器不同,每个 Toolstem 工具都会整合多个数据源、推导信号并预先计算 Agent 本来需要自己处理的数学指标。

一次调用。一个 Agent 友好的 JSON 响应。无需解析嵌套数组,无需跨端点拼接,无需处理空值检查的样板代码。


为什么选择 Toolstem?

大多数金融 MCP 服务器为每个 API 端点暴露一个工具 —— 这迫使你的 Agent 进行 4-5 次顺序调用、编写胶水代码并分析原始数据结构。Toolstem 的构建方式不同:

  • 并行数据获取 —— 每个工具都会同时向多个源发起请求。

  • 推导信号 —— 从原始数字计算出人类可读的建议,如 UNDERVALUED(低估)、STRONG(强劲)、ACCELERATING(加速)。

  • 预计算数学指标 —— CAGR(复合年均增长率)、同比(YoY)增长、利润率趋势、距离 52 周高/低点的距离、自由现金流(FCF)收益率等已包含在响应中。

  • 扁平、可预测的模式 —— 没有深度嵌套的供应商特性泄露到 Agent 的提示词中。

  • 优雅降级 —— 如果某个上游端点失败,响应的其余部分仍会返回,失败项以 null 填充。


Related MCP server: Financial Modeling Prep MCP Server

工具

get_stock_snapshot

全面的股票概览,将报价、概况、DCF 估值和评级整合为单一响应。

输入:

{
  "symbol": "AAPL"
}

示例输出(已截断):

{
  "symbol": "AAPL",
  "company_name": "Apple Inc.",
  "sector": "Technology",
  "industry": "Consumer Electronics",
  "exchange": "NASDAQ",
  "price": {
    "current": 178.52,
    "change": 2.34,
    "change_percent": 1.33,
    "day_high": 179.80,
    "day_low": 175.10,
    "year_high": 199.62,
    "year_low": 130.20,
    "distance_from_52w_high_percent": -10.57,
    "distance_from_52w_low_percent": 37.11
  },
  "valuation": {
    "market_cap": 2780000000000,
    "market_cap_readable": "$2.78T",
    "pe_ratio": 29.5,
    "dcf_value": 195.20,
    "dcf_upside_percent": 9.35,
    "dcf_signal": "FAIRLY VALUED"
  },
  "rating": {
    "score": 4,
    "recommendation": "Buy",
    "dcf_score": 5,
    "roe_score": 4,
    "roa_score": 4,
    "de_score": 5,
    "pe_score": 3
  },
  "fundamentals_summary": {
    "beta": 1.28,
    "avg_volume": 55000000,
    "employees": 164000,
    "ipo_date": "1980-12-12",
    "description": "Apple Inc. designs, manufactures..."
  },
  "meta": {
    "source": "Toolstem via Financial Modeling Prep",
    "timestamp": "2026-04-17T18:30:00Z",
    "data_delay": "End of day"
  }
}

推导字段(原始 API 中不存在):

  • dcf_signal —— 如果 DCF 上行空间 > 10% 则为 UNDERVALUED,如果 < -10% 则为 OVERVALUED,否则为 FAIRLY VALUED。

  • market_cap_readable —— 人类友好的格式,如 $2.78T、$450.2B、$12.5M。

  • distance_from_52w_high_percent / distance_from_52w_low_percent —— 预计算的区间位置。


get_company_metrics

深入的基本面分析 —— 盈利能力、财务健康状况、现金流、增长和每股指标 —— 由 5 个财务报表端点合成。

输入:

{
  "symbol": "AAPL",
  "period": "annual"
}

period 接受 annual(默认)或 quarter。

示例输出(已截断):

{
  "symbol": "AAPL",
  "period": "annual",
  "latest_period_date": "2025-09-30",
  "profitability": {
    "revenue": 394328000000,
    "revenue_readable": "$394.3B",
    "revenue_growth_yoy": 7.8,
    "net_income": 96995000000,
    "net_income_readable": "$97.0B",
    "gross_margin": 46.2,
    "operating_margin": 31.5,
    "net_margin": 24.6,
    "roe": 160.5,
    "roa": 28.3,
    "roic": 56.2,
    "margin_trend": "EXPANDING"
  },
  "financial_health": {
    "total_debt": 111000000000,
    "total_cash": 65000000000,
    "net_debt": 46000000000,
    "debt_to_equity": 1.87,
    "current_ratio": 1.07,
    "interest_coverage": 41.2,
    "health_signal": "STRONG"
  },
  "cash_flow": {
    "operating_cash_flow": 118000000000,
    "free_cash_flow": 104000000000,
    "free_cash_flow_readable": "$104.0B",
    "fcf_margin": 26.4,
    "capex": 14000000000,
    "dividends_paid": 15000000000,
    "buybacks": 89000000000,
    "fcf_yield": 3.7
  },
  "growth_3yr": {
    "revenue_cagr": 8.2,
    "net_income_cagr": 10.1,
    "fcf_cagr": 9.5,
    "growth_signal": "ACCELERATING"
  },
  "per_share": {
    "eps": 6.42,
    "book_value_per_share": 3.99,
    "fcf_per_share": 6.89,
    "dividend_per_share": 0.96,
    "payout_ratio": 14.9
  },
  "meta": {
    "source": "Toolstem via Financial Modeling Prep",
    "timestamp": "2026-04-17T18:30:00Z",
    "periods_analyzed": 3,
    "data_delay": "End of day"
  }
}

推导字段:

  • margin_trend —— 基于净利润率序列方向的 EXPANDING(扩张)、STABLE(稳定)或 CONTRACTING(收缩)。

  • health_signal —— 根据债务权益比、流动比率和利息保障倍数得出的 STRONG(强劲)、ADEQUATE(充足)或 WEAK(疲软)。

  • growth_signal —— 基于同比(YoY)增长轨迹的 ACCELERATING(加速)、STEADY(平稳)或 DECELERATING(减速)。

  • revenue_cagr、net_income_cagr、fcf_cagr —— 分析窗口内的复合年均增长率。

  • fcf_margin、fcf_yield —— 由现金流 + 收入 + 市值预计算得出。


安装

npm

npm install -g toolstem-mcp-server

作为 stdio 服务器运行:

FMP_API_KEY=your_key_here toolstem-mcp-server

作为 HTTP(流式 HTTP 传输)服务器运行:

FMP_API_KEY=your_key_here PORT=3000 toolstem-mcp-server --http

Claude Desktop

添加到你的 claude_desktop_config.json 中:

{
  "mcpServers": {
    "toolstem": {
      "command": "npx",
      "args": ["-y", "toolstem-mcp-server"],
      "env": {
        "FMP_API_KEY": "your_fmp_api_key"
      }
    }
  }
}

Smithery

Toolstem 发布在 Smithery 上,可一键安装到支持的 MCP 客户端中。

Apify

作为 toolstem-financial-data Actor 在 Apify Store 上提供。通过输入从你的 Apify 工作流中调用它:

{
  "tool": "get_stock_snapshot",
  "symbol": "AAPL"
}

或

{
  "tool": "get_company_metrics",
  "symbol": "AAPL",
  "period": "annual"
}

结果会被推送到默认数据集。该 Actor 通过 Apify 的按事件付费模型对每次工具调用进行收费。

自托管(Cloudflare Workers / 任何 Node 运行时)

构建并运行 HTTP 传输:

npm install
npm run build
FMP_API_KEY=your_key npm run start:http

你的 MCP 客户端随后可以连接到 POST http://your-host:3000/mcp。


环境变量

变量

必需

描述

FMP_API_KEY

是

Financial Modeling Prep API 密钥。请在 financialmodelingprep.com 获取。

PORT

否

HTTP 传输端口。默认为 3000。


开发

npm install
npm run dev           # stdio, hot reload via tsx
npm run build         # TypeScript -> dist/
npm start             # run built stdio server
npm run start:http    # run built HTTP server

架构

src/
├── index.ts          # MCP server entry (stdio + Streamable HTTP)
├── actor.ts          # Apify Actor entry
├── services/
│   └── fmp.ts        # Financial Modeling Prep API client
├── tools/
│   ├── get-stock-snapshot.ts
│   └── get-company-metrics.ts
└── utils/
    └── formatting.ts # Market cap formatting, CAGR, trend signals

所有 FMP 端点都被封装在一个 FmpClient 类中。工具实现通过 Promise.all 并行扇出到多个客户端方法,然后合成合并后的结果。


许可证

MIT —— 参见 LICENSE。


Toolstem —— 为 Agent 原生经济提供的精选金融智能。

Available Tools

3 tools
compare_companiesCompany ComparisonA
Read-onlyIdempotent

Side-by-side comparison of 2-5 companies across price, valuation (P/E, P/B, P/S, EV/EBITDA, DCF), profitability (margins, ROE, ROA, ROIC), financial health (D/E, current ratio, interest coverage), growth (revenue and earnings YoY), dividends, and analyst ratings. Returns derived rankings showing which company leads each dimension — lowest_pe, highest_margin, strongest_balance_sheet, best_growth, most_undervalued, highest_rated. Use this for investment comparisons, competitive analysis, or evaluating alternatives in the same sector.

Inputs: symbols (required). Returns: symbols_compared, comparison_date, companies, rankings, +1 more

get_company_metricsCompany MetricsA
Read-onlyIdempotent

Deep financial analysis including profitability, financial health, cash flow, growth (3-year CAGR), and per-share metrics. Synthesizes key metrics, financial ratios, income statement, balance sheet, and cash flow statement into one agent-ready response with derived signals: margin_trend (EXPANDING/STABLE/CONTRACTING), health_signal (STRONG/ADEQUATE/WEAK), and growth_signal (ACCELERATING/STEADY/DECELERATING). Use this for fundamental analysis, financial health checks, or when you need to understand a company's trajectory.

Inputs: symbol (required), period. Returns: symbol, period, latest_period_date, profitability, +5 more

get_stock_snapshotStock SnapshotA
Read-onlyIdempotent

Get a comprehensive stock snapshot including real-time price, valuation metrics, DCF analysis, and analyst ratings for any publicly traded company. Returns curated, agent-ready data synthesized from multiple sources in a single call — includes derived signals like dcf_signal (UNDERVALUED/FAIRLY VALUED/OVERVALUED), human-readable market cap, and 52-week range distance. Use this when you need a quick overview of a stock before digging into financials.

Inputs: symbol (required). Returns: symbol, company_name, sector, industry, +6 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 3 tools

    Disambiguation4/5

    The three tools are largely distinct: snapshot gives a quick overview, company_metrics provides deep financials, and compare_companies does side-by-side analysis. However, get_stock_snapshot and get_company_metrics both include valuation and financial data, so an agent could occasionally hesitate on which to call first.

    Naming Consistency5/5

    All tool names follow a clear verb_noun pattern: get_stock_snapshot, get_company_metrics, compare_companies. The verb changes appropriately for the action, and there is no mixing of styles or vague naming.

    Tool Count4/5

    Three tools is on the lean side but fits a focused stock-analysis server: overview, deep dive, and comparison. Each tool earns its place and the count feels sufficient rather than bloated.

    Completeness4/5

    The surface covers the core workflow: quick overview, fundamental analysis, and comparative screening. Minor gaps exist (e.g., no historical price data or explicit ticker search), but agents can accomplish most typical investment-analysis tasks without dead ends.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to access and analyze financial data, stock information, company fundamentals, and market insights through 250+ tools covering stocks, ETFs, crypto, forex, commodities, and economics.
      624 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to access and analyze financial data such as stocks, ETFs, crypto, forex, commodities, company fundamentals, financial statements, and market insights through 250+ configurable tools.
      624 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to access and analyze financial data through 250+ tools covering stocks, ETFs, crypto, forex, commodities, economics, company fundamentals, statements, metrics, technical indicators, quotes, news, SEC filings, and more. Supports dynamic, static, or full tool loading for flexible integration.
      624 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to access and analyze financial data, stock information, company fundamentals, and market insights through 250+ tools covering stocks, ETFs, crypto, forex, commodities, and economics.
      624 npm
      Apache 2.0