FI-MCP

FI-MCP

Provides AI assistants with access to 30+ validated financial independence calculation functions, eliminating hallucinations by ensuring accurate calculations for retirement planning, CoastFI, investment returns, and other FI metrics.

Category
Visit Server

README

FI-MCP

Model Context Protocol (MCP) server for the Financial Independence community.

Overview

FI-MCP automatically generates MCP tools from the FI function library using introspection. This allows AI assistants to access the financial independence calculation functions we use as native tools. This gets rid of hallucinations by ensuring that the AI uses the right calculations for the job, rather than guessing or taking a random calculation from the web. It also boosts confidence for the user because it allows us to know where the calculation is coming from. Math can be checked in the FI library and the associated blog article or forum link (where applicable).

Features

  • Auto-discovery: Automatically finds all functions in the FI library
  • Type-safe: Converts Python type annotations to MCP tool schemas
  • Parameter validation: Validates and converts arguments before function calls
  • Comprehensive coverage: All 30+ FI functions available as MCP tools

Installation

For development:

# Clone the repository
cd /path/to/FI-MCP

# Install package with dev dependencies in editable mode
pip install -e .[dev]

For production use:

pip install .

Configuration for AI Editors

Add these setttings to your Windsurf MCP config file, Claude ~/.claude/config.json, or other analogous file:

{
  "mcpServers": {
    "fi-mcp": {
      "command": "python",
      "args": ["-m", "fi_mcp.server"],
      "env": {
        "PYTHONUNBUFFERED": "1"
      }
    }
  }
}

After adding the configuration, restart your editor. The AI assistant will now have access to all FI calculation tools.

Usage

Once configured, you can ask your AI assistant questions like:

  • "Calculate my CoastFI number with $50k invested, 4% return, retiring at 65, currently 30"
  • "How much does it cost to buy a day of freedom with $40k annual spending?"
  • "How do I calculate cap rate?" - Get full documentation including what it calculates, parameters, and credits
  • "I don't remember how to calculate turnover costs" - Get full documentation including what it calculates, parameters, and credits
  • "What inputs does future_value take?" - See all parameters with descriptions
  • "Show me all available FI calculations" - Browse all available functions

The AI will automatically use the appropriate FI tool to perform a FI related calculation. It can access complete markdown-formatted docstrings for any function, including detailed explanations, parameter descriptions, return values, and attribution credits.

Available Tools

See the FI library for the full list of available tools.

Architecture

FI-MCP uses introspection patterns to:

  1. Discover all functions in the FI module
  2. Extract parameter types and descriptions from function signatures and markdown docstrings
  3. Generate MCP tool schemas automatically
  4. Expose function documentation via MCP Resources
  5. Handle type conversion and validation
  6. Execute functions with converted arguments

MCP Features

  • Tools: Each FI function is exposed as an MCP tool with full type information and parameter descriptions
  • Resources: Function documentation is available via fi://help/{function_name} URIs, returning markdown-formatted docstrings

Development

Setup

Install the package in editable mode with development dependencies:

pip install -e .[dev]

Running Tests

Run all tests:

pytest -v

Run specific test file:

pytest tests/test_docstring_validation.py -v
pytest tests/test_basic.py -v

Test Coverage

  • tests/test_docstring_validation.py - Validates that all FI functions have proper markdown docstrings
  • tests/test_basic.py - Integration tests for function discovery, schema generation, and execution

License

MIT License - Same as FI library

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured