agentleFS
imbenrabiimbenrabi/Financial-Modeling-Prep-MCP-Server/CLAUDE.md

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

The file

Files
CLAUDE.md

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 point

Key Invariants

  1. API Key as Query Parameter — FMP requires ?apikey=, never headers
  2. Token Precedence — Instance > Environment; the session token is injected via the client constructor at construction time
  3. Fail-Fast Validation — Invalid tool sets cause process.exit(1) at startup
  4. Session Restrictions — Only FMP_ACCESS_TOKEN takes effect at session level; FMP_TOOL_SETS / DYNAMIC_TOOL_DISCOVERY exist in the schema but are no-ops (mode is fixed at startup)
  5. Read-Only Tools — All tools are read-only data fetchers
  6. Error Handling — Tools never throw; return { isError: true }

Development Commands

CommandPurpose
npm run setupInstall dependencies
npm run buildCompile TypeScript to dist/
npm run devRun server in watch mode via tsx
npm run startRun compiled server (node dist/index.js)
npm run testRun tests interactively with Vitest
npm run test:runRun tests once (CI mode)
npm run typecheckType-check without emitting (tsc --noEmit)
npm run lintLint with Oxlint (--deny-warnings)
npm run lint:fixAuto-fix Oxlint issues
npm run knipFind unused exports/dependencies
npm run version:validateValidate package.json / server.json version sync

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.