financial-fraud-detection-mcp
An MCP server that enables AI-powered fraud detection on financial transactions using rule-based and statistical analysis tools, with sample data and Gradio dashboard.
README
Financial Fraud Detection — MCP Demo
An AI-powered financial fraud detection system built with Model Context Protocol (MCP) and Claude Opus 4.8. Features a dark-themed Gradio dashboard where Claude autonomously calls fraud detection tools via MCP.
Screenshots
![]() |
![]() |
| Dashboard — MCP server connected, tools & prompts discovered | Full fraud risk report — HIGH risk, 7 accounts flagged |
![]() |
![]() |
| Executive summary with rule-based + statistical findings | Structuring / smurfing accounts (A1003, A1009) |
![]() |
![]() |
| Velocity abuse — Account A1007, 6 transactions in 3 minutes | Plain-English summary for non-technical executives |
![]() |
![]() |
| Account A1003 deep dive — structuring legal analysis | Auto-generated compliance escalation email |
![]() |
|
| Claude honestly explaining what its tools can and can't determine |
What It Does
- Analyzes 30 simulated transactions across 11 accounts
- Detects fraud using two complementary methods:
- Rule-based pattern matching — velocity abuse, duplicate charges, structuring (smurfing)
- Statistical anomaly detection — IQR method to surface unusual transaction amounts
- Generates plain-English risk reports suitable for compliance officers
- Exports the full chat session as a formatted PDF
MCP Architecture
Gradio UI (app.py)
│
└── MCP Client (stdio)
│
└── MCP Server (server.py)
├── Tools (4)
│ ├── analyze_transactions
│ ├── detect_fraud_patterns
│ ├── flag_anomalies
│ └── generate_risk_report
├── Resources (1)
│ └── transactions://sample
└── Prompts (2)
├── fraud_analysis
└── stakeholder_report
Claude receives a user question, autonomously decides which tools to call, executes them via MCP, and synthesizes the results into a final answer — no hardcoded logic in the UI layer.
Fraud Scenarios in Sample Data
| Pattern | Accounts | Description |
|---|---|---|
| Velocity Abuse | A1007 | 6 transactions in under 3 minutes ($480 total) |
| Duplicate Charges | A1004, A1006 | Identical amount + merchant within 60 seconds |
| Structuring / Smurfing | A1003, A1009 | Multiple transactions just under $10,000 (31 U.S.C. § 5324) |
| Statistical Anomalies | A1005, A1011 | Amounts exceeding IQR upper bound of ~$17,365 |
Tech Stack
- MCP Python SDK —
FastMCPserver +stdio_client - Anthropic Python SDK — Claude Opus 4.8 agentic loop
- Gradio — dark dashboard UI
- pandas — transaction analysis and IQR statistics
- fpdf2 — PDF export
Setup
# Clone the repo
git clone https://github.com/archana-gurimitkala/financial-fraud-detection-mcp.git
cd financial-fraud-detection-mcp
# Install dependencies
pip install -r requirements.txt
# Set your Anthropic API key (the app reads it from the environment)
export ANTHROPIC_API_KEY=your_key_here
# Run the Gradio dashboard
python app.py
Open http://localhost:7860 in your browser.
To use the terminal client instead:
python client.py
Sample Questions to Try
- "Give me a full fraud risk report"
- "Which accounts show structuring patterns?"
- "Are there any duplicate transactions?"
- "Which account has the highest velocity abuse?"
- "Summarize the findings for a non-technical executive"
Sample PDF Output
A full exported chat session is included as sample_output.pdf — 8 pages covering the complete fraud analysis, structuring deep dive, velocity abuse breakdown, executive summary, and compliance escalation email.
Course Context
Built to demonstrate concepts from Anthropic's Introduction to MCP course:
- MCP server with Tools, Resources, and Prompts primitives
- stdio transport
- Agentic tool-use loop (Claude decides when and what to call)
- Multi-turn conversation with tool results fed back into context
Built by Archana Gurimitkala · Powered by Claude Opus 4.8 + MCP
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.








