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

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

The file

Files
CLAUDE.md

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:

AreaNode
Startup, Fastify wiringdocs/src/AGENTS.md
FMP clientsdocs/src/api/AGENTS.md
Tool registrationsdocs/src/tools/AGENTS.md
Toolception adaptersdocs/src/toolception-adapters/AGENTS.md
Mode enforcerdocs/src/server-mode-enforcer/AGENTS.md
Tool set catalogdocs/src/constants/AGENTS.md
Promptsdocs/src/prompts/AGENTS.md
HTTP endpointsdocs/src/endpoints/AGENTS.md
Utilitiesdocs/src/utils/AGENTS.md
Release and verification scriptsdocs/scripts/AGENTS.md
Smoke testsdocs/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 point

Key Invariants

  1. API Key as Query Parameter — every FMP call sends ?apikey=; never move it to headers
  2. Token Precedence — Instance > Environment; the session token is injected via the client constructor at construction time
  3. 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)
  4. Session Restrictions — Only FMP_ACCESS_TOKEN takes effect at session level; FMP_TOOL_SETS / DYNAMIC_TOOL_DISCOVERY in a session config are ignored (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
npm run verify:toolception -- --source <spec>Check the server against a candidate toolception build before a dependency bump

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.