Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables AI agents to call deterministic finance tools (compound interest, loan payment, currency conversion, etc.) through MCP, with a shared tool registry used by both the agent loop and MCP clients.

README.md

🤖 Finance Agent + MCP

!Python !License: MIT !MCP !Tool use

An LLM agent that answers finance questions by calling tools (it never does the math itself), and exposes those same tools as an MCP server so any MCP client — like Claude Desktop — can use them too.

The idea worth stealing: the tools live in one registry and are exposed twice — to the agent loop and to MCP. Define once, no drifting schemas. That's the kind of structure that scales on a team.

✨ Features

  • Tool-use agent loop with multi-step tool calls and a printed tool trace.
  • MCP server (FastMCP) exposing the same tools to any MCP host.
  • Provider-swappable — Anthropic Claude (default) or OpenAI, one env var.
  • Deterministic finance tools, unit-tested with no API key.

🧰 Tools

| Tool | What it computes | |---|---| | compound_interest | future value of a lump sum | | cagr | compound annual growth rate (%) | | loan_payment | monthly payment for an amortizing loan | | future_value_of_savings | future value of monthly contributions | | convert_currency | FX conversion (static sample rates) |

🏗️ Architecture

flowchart LR
    R["Shared tool registry<br/>(finagent.tools)"] --- Agent["Agent loop<br/>Claude / OpenAI"]
    R --- MCP["MCP server<br/>(FastMCP)"]
    U[User] --> Agent --> Ans[Answer + tool trace]
    Host["MCP client<br/>(Claude Desktop)"] --> MCP

More in docs/architecture.md.

🚀 Quickstart

# Install (Python 3.10+)
pip install -e .
pip install -r requirements.txt

# Configure
cp .env.example .env       # add ANTHROPIC_API_KEY (or set LLM_PROVIDER=openai)

# Ask the agent (it will call tools and show its work)
python scripts/chat.py "If I save $300/month at 8% for 25 years, how much will I have?"
python scripts/chat.py "Monthly payment on a $250k mortgage at 6.5% over 30 years?"
python scripts/chat.py "Convert 5000 BRL to USD, then grow it at 10% for 5 years."

Example output:

=== Tool calls ===
  • future_value_of_savings({'monthly_contribution': 300, 'annual_rate_pct': 8, 'years': 25}) -> {'future_value': 285809.08, ...}
=== Answer ===
Saving $300/month at 8% for 25 years grows to about $285,809.

🔌 Use it from Claude Desktop (MCP)

Run the server:

python -m finagent.mcp_server

Then add it to your Claude Desktop config (claude_desktop_config.json). Use the Python from the env where you installed the package:

{
  "mcpServers": {
    "finance-agent": {
      "command": "python",
      "args": ["-m", "finagent.mcp_server"]
    }
  }
}

Claude can now call compound_interest, loan_payment, etc. directly.

🗂️ Project structure

finance-agent-mcp/
├── src/finagent/
│   ├── tools.py        # the shared tool registry (pure functions + schemas)
│   ├── agent.py        # provider-swappable tool-use loop
│   ├── mcp_server.py   # exposes the registry over MCP (FastMCP)
│   └── config.py
├── scripts/chat.py     # CLI agent
├── tests/test_tools.py # pure unit tests (no key)
└── docs/architecture.md

✅ Tests

pytest -q     # tests the finance math directly — no API key required

🧭 Roadmap

  • [x] Tool registry + 5 finance tools (unit-tested)
  • [x] Tool-use agent loop (Claude / OpenAI)
  • [x] MCP server exposing the same tools
  • [ ] Add a live FX-rate tool + a market-data tool
  • [ ] Streaming responses + a small web UI
  • [ ] Trace/observability hooks (tie in with project #3)

📄 License

MIT — see LICENSE.

---

Built by Arturio Amorim Sobrinho — AI/LLM Engineer. GitHub · LinkedIn

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Finance & Payments servers.