financial-fraud-detection-mcp

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.

Category
访问服务器

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 Risk Report
Dashboard — MCP server connected, tools & prompts discovered Full fraud risk report — HIGH risk, 7 accounts flagged
Executive Summary Structuring
Executive summary with rule-based + statistical findings Structuring / smurfing accounts (A1003, A1009)
Velocity Non-Technical
Velocity abuse — Account A1007, 6 transactions in 3 minutes Plain-English summary for non-technical executives
Deep Dive Email
Account A1003 deep dive — structuring legal analysis Auto-generated compliance escalation email
Clean
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

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选