Financial-Modeling-Prep-MCP-Server
CLAUDE.md149 starsChanged 5 months agoApache-2.0View on GitHub
For user-facing docs, see README.md and the docs/ directory. MCP server providing 253+ financial data tools via the Financial Modeling Prep API. HTTP/SSE transport only. Built on toolception + Fastify. See AGENTS.md for non-obvious pitfalls, invariants, and anti-patterns. See docs/GUIDE.md for how-to guides, templates, and procedural content.
- 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 253+ financial data tools via the Financial Modeling Prep API. HTTP/SSE transport only. Built on toolception + Fastify.
Architecture
┌─────────────────────────────────────────────┐
│ MCP Protocol Layer (toolception) │
├─────────────────────────────────────────────┤
│ Tools Layer (28 modules, 253+ tools) │
├─────────────────────────────────────────────┤
│ API Layer (FMPClient + 28 domain clients) │
├─────────────────────────────────────────────┤
│ Financial Modeling Prep API │
└─────────────────────────────────────────────┘See AGENTS.md for non-obvious pitfalls, invariants, and anti-patterns.
See docs/GUIDE.md for how-to guides, templates, and procedural content.
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
├── endpoints/ # HTTP endpoints (health, ready)
├── prompts/ # MCP prompt definitions
└── index.ts # Server entry pointKey Invariants
- API Key as Query Parameter — FMP requires
?apikey=, never headers - Token Precedence — Instance > Environment; the session token is injected via the client constructor at construction time
- Fail-Fast Validation — Invalid tool sets cause
process.exit(1)at startup - Session Restrictions — Only
FMP_ACCESS_TOKENtakes effect at session level;FMP_TOOL_SETS/DYNAMIC_TOOL_DISCOVERYexist in the schema but are no-ops (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 |
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.

