finance-agent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@finance-agentWhat's the monthly payment on a $200k loan at 5% for 15 years?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ค Finance Agent + MCP
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.
Related MCP server: FinChat
๐งฐ Tools
Tool | What it computes |
| future value of a lump sum |
| compound annual growth rate (%) |
| monthly payment for an amortizing loan |
| future value of monthly contributions |
| 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)"] --> MCPMore 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_serverThen 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
Tool registry + 5 finance tools (unit-tested)
Tool-use agent loop (Claude / OpenAI)
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
This server cannot be deployed
Maintenance
Related MCP Connectors
Tested financial & practical calculators as free, no-auth MCP tools for AI agents.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Loan & mortgage calculator, compound interest, ROI, crypto prices, FX conversion for AI agents.
SmartMoney77 MCP v0.6.0 โ 14 public tools that turn financial questions into exact numbers and citable links. New: historical_investment_return and compare_investments, which compute "what if I had invested" results from real yearly price data. Also compound interest, FIRE number, credit-card payoff, emergency fund, inflation, latte factor, investment fees, cost of waiting, plus discovery/deep-link/share-pack tools for a catalog of calculators in 6 languages (he/en/ar/es/pt/in). Public, no login. Endpoint: https://smartmoney77.com/mcp
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to access financial data and perform analysis by exposing AlphaVantage API endpoints as MCP tools, including company overview, income statement, balance sheet, cash flow, and earnings reports.1-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to manage personal finances through MCP tools for transaction management, spending analytics, and goal tracking.1-
- AlicenseAqualityAmaintenanceProvides live financial data for any LLM agent, including stock quotes, crypto prices, SEC filings, XBRL financials, FX rates, and macro indicators, through ten MCP tools.1182 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read and write a self-hosted portfolio tracker through 25 MCP tools, covering net worth, flows, forecasts, decisions, and audit.9 npmApache 2.0