S&P 500 MCP Server
MCP server for querying S\&P 500 company data from Supabase, providing tools for company info, financials, price data, news, officers, and SEC filings.
README
S&P 500 MCP Server
An MCP (Model Context Protocol) server and Next.js web app for querying S&P 500 company data from Supabase. It exposes MCP tools for company fundamentals, annual financial metrics, historical price data, news sentiment, officers, and SEC filings, plus a web UI and embedded MCP App resources for browsing and testing those tools.
Tools
| Tool | Description |
|---|---|
get_company_info |
Company basics, financials, leadership, address, and business summary |
get_company_financials |
Annual financial metrics with chart-ready trends and matrix output |
get_company_price_data |
Historical daily OHLCV price rows with date filters |
get_company_news |
Recent company news with sentiment filtering |
get_company_officers |
Executive officers and compensation |
get_company_filings |
SEC filings history, with filing type and date filters |
search_companies is an internal symbol resolver, not an exposed MCP tool. User queries are resolved through getCompanySymbol.
Tech Stack
- Workspace: pnpm 10.33.3 + Turborepo
- Runtime: Node 22 (
.nvmrc) - Web app: Next.js 16 App Router, React 19, TypeScript strict mode (
apps/web) - MCP Apps: Vite single-file React pages built from
apps/web-appand served as tool UI resources - MCP:
mcp-handleratapps/web/app/[transport]/route.ts;/sseis the public SSE endpoint - Database: Supabase client at
apps/web/app/[transport]/utils/supabase.ts - UI: shared shadcn/Tailwind primitives in
packages/ui
Getting Started
Prerequisites
- Node.js 22
- pnpm 10
- Supabase project with the S&P 500 data tables used by the tools
Local Development
- Install dependencies:
pnpm install
- Create a local env file with Supabase credentials:
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
MCP_MAX_DURATION=60
REDIS_URL=your_redis_url
LOGO_DEV_TOKEN=your_logo_dev_publishable_key
SUPABASE_URL and SUPABASE_ANON_KEY are required. REDIS_URL is only needed for production SSE. LOGO_DEV_TOKEN is required for the /api/logo/* proxy.
- Build the embedded MCP App HTML resources:
pnpm --filter @apps/web-app build
- Start the apps:
pnpm dev
The Next.js web app runs on http://localhost:3000; the MCP endpoint is http://localhost:3000/sse. The apps/web-app dev server proxies /sse to port 3000 when run separately.
Commands
pnpm dev # Start apps/* dev tasks via Turbo
pnpm build # Build apps/web and apps/web-app via Turbo
pnpm start # Start production server for apps/web
pnpm type-check # Type-check apps/web and apps/web-app
pnpm lint # ESLint + Prettier rule checks
Focused commands:
pnpm --filter @apps/web dev
pnpm --filter @apps/web-app dev
pnpm --filter @apps/web-app build
pnpm exec tsc -p apps/web/tsconfig.json --noEmit
pnpm exec tsc -p apps/web-app/tsconfig.json --noEmit
pnpm exec tsc -p packages/ui/tsconfig.json --noEmit
Testing
Tests are integration tests that connect a real MCP client to http://localhost:3000/sse, so start the dev server first:
pnpm --filter @apps/web-app build
pnpm dev
pnpm test
Run a single tool test:
pnpm vitest run apps/web/tests/tools/get-company-info-tool.test.ts
Generate coverage:
pnpm coverage
Project Layout
apps/web/
app/[transport]/route.ts MCP GET/POST/DELETE handler
app/[transport]/tools/ MCP tool registrations
app/[transport]/utils/ Supabase, symbol resolution, summaries
app/api/tools/call/route.ts HTTP proxy for the web tool tester
app/tools/ Tool catalog page
components/ App-specific UI
tests/tools/ MCP integration tests
apps/web-app/
src/pages/ Embedded MCP App pages, one per tool
src/components/ MCP App UI components
scripts/build-pages.js Builds each page into dist/*.html
dist/ Generated single-file HTML resources
packages/ui/
src/components/ Shared shadcn UI primitives
src/styles/globals.css Shared Tailwind CSS
apps/web/app/[transport]/tools/app-resource.ts reads generated HTML from apps/web-app/dist, so rebuild apps/web-app after changing embedded MCP App pages.
Vercel Deployment
- Requires Fluid compute
MCP_MAX_DURATIONdefaults to60; set a higher duration for long-running production calls when your Vercel plan supports it- SSE is enabled (
disableSse: false); production SSE requires Redis viaREDIS_URL
Docs
Full guides and examples: https://sp500-mcp.vercel.app/
Contributing
Feel free to dive in! Open an issue or submit PRs.
Standard Readme follows the Contributor Covenant Code of Conduct.
Contributors
This project exists thanks to all the people who contribute.
<a href="https://github.com/zhensherlock/sp500-mcp-server/graphs/contributors"> <img src="https://contrib.rocks/image?repo=zhensherlock/sp500-mcp-server" /> </a>
License
GNU Affero General Public License v3.0 © MichaelSun
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。