Financial-Modeling-Prep-MCP-Server
CLAUDE.md149 starsChanged 25 days agoApache-2.0View on GitHub
For user-facing docs, see README.md and the docs/ directory. MCP server providing 267+ financial data tools via the Financial Modeling Prep API. HTTP/SSE transport only. Built on toolception + Fastify. See AGENTS.md for the intent layer root (pitfalls, invariants, anti-patterns, navigation). See docs/GUIDE.md for how-to guides, templates, and procedural content. Area nodes live in docs/ and mirror the repo layout (docs/src/<area>/AGENTS.md). Read the node for the area you touch:
- Reads credentials
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- code-reviewSkill
The file
Files
Financial Modeling Prep MCP Server
For user-facing docs, see README.md and the docs/ directory.
MCP server providing 267+ financial data tools via the Financial Modeling Prep API. HTTP/SSE transport only. Built on toolception + Fastify.
Architecture
┌─────────────────────────────────────────────┐
│ MCP Protocol Layer (toolception) │
├─────────────────────────────────────────────┤
│ Tools Layer (29 modules, 267+ tools) │
├─────────────────────────────────────────────┤
│ API Layer (FMPClient + 29 domain clients) │
├─────────────────────────────────────────────┤
│ Financial Modeling Prep API │
└─────────────────────────────────────────────┘See AGENTS.md for the intent layer root (pitfalls, invariants, anti-patterns, navigation).
See docs/GUIDE.md for how-to guides, templates, and procedural content.
Area nodes live in docs/ and mirror the repo layout (docs/src/<area>/AGENTS.md). Read the node for the area you touch:
| Area | Node |
| Startup, Fastify wiring | docs/src/AGENTS.md |
| FMP clients | docs/src/api/AGENTS.md |
| Tool registrations | docs/src/tools/AGENTS.md |
| Toolception adapters | docs/src/toolception-adapters/AGENTS.md |
| Mode enforcer | docs/src/server-mode-enforcer/AGENTS.md |
| Tool set catalog | docs/src/constants/AGENTS.md |
| Prompts | docs/src/prompts/AGENTS.md |
| HTTP endpoints | docs/src/endpoints/AGENTS.md |
| Utilities | docs/src/utils/AGENTS.md |
| Release and verification scripts | docs/scripts/AGENTS.md |
| Smoke tests | docs/tests/smoke/AGENTS.md |
Directory Structure
src/
├── api/ # HTTP clients for FMP API
├── tools/ # MCP tool registrations
├── toolception-adapters/ # Toolception framework integration
├── server-mode-enforcer/ # Mode configuration singleton
├── constants/ # Tool sets and defaults
├── utils/ # Version, validation, and help helpers
├── schemas/ types/ # Session config schema, shared types
├── endpoints/ # HTTP endpoints (ping, healthcheck, server-card)
├── prompts/ # MCP prompt definitions
└── index.ts # Server entry pointKey Invariants
- API Key as Query Parameter — every FMP call sends
?apikey=; never move it to headers - Token Precedence — Instance > Environment; the session token is injected via the client constructor at construction time
- Fail-Fast Validation — An invalid tool set list that is actually selected causes
process.exit(1)at startup (see the enforcer FLOW for when it is skipped) - Session Restrictions — Only
FMP_ACCESS_TOKENtakes effect at session level;FMP_TOOL_SETS/DYNAMIC_TOOL_DISCOVERYin a session config are ignored (mode is fixed at startup) - Read-Only Tools — All tools are read-only data fetchers
- Error Handling — Tools never throw; return
{ isError: true }
Development Commands
| Command | Purpose |
npm run setup | Install dependencies |
npm run build | Compile TypeScript to dist/ |
npm run dev | Run server in watch mode via tsx |
npm run start | Run compiled server (node dist/index.js) |
npm run test | Run tests interactively with Vitest |
npm run test:run | Run tests once (CI mode) |
npm run typecheck | Type-check without emitting (tsc --noEmit) |
npm run lint | Lint with Oxlint (--deny-warnings) |
npm run lint:fix | Auto-fix Oxlint issues |
npm run knip | Find unused exports/dependencies |
npm run version:validate | Validate package.json / server.json version sync |
npm run verify:toolception -- --source <spec> | Check the server against a candidate toolception build before a dependency bump |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

