Local Fintech MCP Server
Provides tools for querying a local PostgreSQL financial database, exposing a transactions table (id, user_id, amount, merchant, timestamp) via MCP tools such as get_user_transactions to retrieve a user's recent mock transactions and flag_anomalies to surface transactions exceeding a given threshold.
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., "@Local Fintech MCP Server get user456's recent transactions and flag anything over $50"
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.
Project 1: The Local Fintech MCP Server
The Scenario You need to build a local backend service that exposes a mock financial database to an AI agent. The agent must be able to securely query this server to retrieve a user's transaction history and flag potential anomalies (e.g., unusually high spending).
The Requirements
Core Stack: TypeScript with Node.js (or NestJS/Go if you prefer to prompt for that) and PostgreSQL.
Infrastructure: The database must be spun up locally using Docker.
The Interface: The service must implement the Model Context Protocol (MCP).
The Tools: Expose exactly two MCP tools to the agent:
get_user_transactions(userId): Returns a JSON array of recent mock transactions.flag_anomalies(userId, threshold): Returns transactions for a user that exceed the provided threshold amount.
Your Agentic Practice Step
Your task is to craft the overarching instructions for your local AI agent to scaffold this entire setup. You want the agent to generate the docker-compose.yml, the database schema, the mock data seed script, and the MCP server code.
Starter Prompt (Feed this to your local AI tool):
Act as a senior backend engineer. I need to build a local Model Context Protocol (MCP) server in TypeScript/Node.js that interacts with a PostgreSQL database.
Please perform the following steps sequentially:
1. Create a docker-compose.yml for a PostgreSQL database.
2. Write a script to initialize a 'transactions' table (id, user_id, amount, merchant, timestamp) and seed it with 20 mock financial records.
3. Scaffold an MCP server using the official SDK that connects to this database.
4. Implement two MCP tools: 'get_user_transactions' and 'flag_anomalies'.
Ask me to review the Docker setup before proceeding to the Node.js implementation.Related MCP server: ExpenseTracker MCP Server
π How to Run and Test
1. Prerequisites
Docker: Must be installed and running (e.g., Docker Desktop).
Node.js: Ensure Node is installed (v18+ recommended).
2. Setup & Build
Install dependencies and build the TypeScript code:
npm install
npm run build3. Start the Database
Spin up the local PostgreSQL database using Docker. This will automatically run the seed script to populate mock transactions.
docker-compose up -d4. Test via MCP Inspector (Recommended)
You can use the official MCP Inspector to test the server directly from your browser:
npx @modelcontextprotocol/inspector node dist/index.jsOpen the provided URL (typically http://localhost:5173) in your browser to interactively test the get_user_transactions and flag_anomalies tools.
5. Install as a Plugin in Claude Desktop
To use this server as a true AI plugin, you can connect it to an MCP-compatible client like the Claude Desktop app.
Step 1: Open Claude's configuration file Open your terminal and run this command (for Mac):
nano ~/Library/Application\ Support/Claude/claude_desktop_config.jsonStep 2: Add your server
Paste the following JSON, ensuring it points to the absolute path of your dist/index.js file:
{
"mcpServers": {
"local-fintech-db": {
"command": "node",
"args": [
"/Users/wutchararachadach/Documents/HAM/ai-agent-local/problem-practices/The Local Fintech MCP Server/dist/index.js"
]
}
}
}Step 3: Restart and Chat!
Completely quit Claude Desktop (
Cmd + Q) and reopen it.Look for the plug/hammer icon π in the Claude interface, indicating the plugin loaded successfully.
Try asking it natural questions like:
"Can you get the transaction history for user456 from my fintech database?"
"Are there any anomalies for user123 over a threshold of $50?"
Available Tools
2 toolsflag_anomaliesB
Returns transactions for a user that exceed the provided threshold amount.
Inputs: userId (required), threshold (required).
get_user_transactionsB
Returns a JSON array of recent mock transactions for a given user.
Inputs: userId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 2 tools
Both tools return transactions for a user, so they overlap substantially in output shape; only the threshold filter distinguishes flag_anomalies. Descriptions clarify the difference somewhat, but an agent could reasonably confuse the two.
Both names use a consistent snake_case verb_noun style (get_user_transactions, flag_anomalies). The only minor deviation is that flag_anomalies omits an explicit resource noun, but the pattern is still readable and predictable.
Two tools is thin for a fintech domain that implies accounts, transactions, and anomaly workflows. The surface feels like a stub rather than a scoped toolset.
There is read-only coverage of transactions plus a single filtered view, with no create/update/delete, no account or user management, and no way to act on flagged anomalies. Major lifecycle gaps would block most realistic fintech workflows.
Maintenance
Related MCP Connectors
Deterministic safety, correctness & cost gate that vets Postgres SQL before your AI agent runs it.
Personal finance, bank account, and shared memory connector for Claude, ChatGPT, Gemini Spark & more
Query PostgreSQL databases in plain English β LLM-generated, safety-validated SQL.
Connect AI agents to bank accounts, transactions, balances, and investments.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to analyze personal financial data from Open Banking sources stored in PostgreSQL database. Provides educational financial analysis tools with intelligent formatting for learning about spending patterns, account balances, and transaction history.2ISC
- FlicenseCqualityDmaintenanceEnables AI assistants to manage personal finances by storing, analyzing, and exporting expense data using a persistent PostgreSQL database. Supports adding/editing expenses, generating spending summaries, detecting top categories, and creating monthly reports.12-
- FlicenseNot gradedqualityCmaintenanceExposes PostgreSQL database operations as tools for AI assistants, allowing SQL queries and schema inspection.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with PostgreSQL databases through natural language queries, schema inspection, and safe SQL execution.1ISC