michu-dunat/mcp-local-server-hackathon
If you are the rightful owner of mcp-local-server-hackathon and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Fraud Case Management MCP Server connects to the CDQ Bankaccount Data API to provide access to fraud case information, enabling search, filtering, and analysis of fraud cases.
Fraud Case Management MCP Server
A Model Context Protocol (MCP) server that connects to the CDQ Bankaccount Data API to provide access to fraud case information:
- 🔧 2 Tools/Actions: Search, filter, and analyze fraud cases by various criteria including date ranges
- 📚 1 Resource:
cdq://fraudcases/all- Live fraud cases data from CDQ API - 💬 4 Prompt Templates: Fraud analyst, investigator, pattern detector, and report generator
Features
Tools
1. search_fraud_cases
Search and filter fraud cases from the CDQ API with flexible parameters.
Parameters:
search(optional): Search phrase to filter fraud casespage(optional): Page index (0-based, default: 0)pageSize(optional): Number of records per page (max 200, default: 20)sort(optional): Sort field (prefix with - for descending, default: "-creationTimestamp")classification(optional): Classification filter (DEMO, TEST, CATENAX, STANDARD - default: STANDARD)
2. get_fraud_cases_by_date
Get fraud cases that occurred on a specific date or within a date range. Fetches all cases and filters by Unix timestamp in Python.
Parameters:
start_date(required): Start date in YYYY-MM-DD format (e.g., 2015-12-30)end_date(optional): End date in YYYY-MM-DD format (for date range filtering)classification(optional): Classification filter (DEMO, TEST, CATENAX, STANDARD - default: STANDARD)
Resource: cdq://fraudcases/all
Live fraud cases data fetched from the CDQ Bankaccount Data API with metadata including pagination info, sort order, and the complete list of fraud cases.
Prompt Templates
1. fraud_analyst
Creates a fraud analyst assistant prompt with real-time fraud case context (20 samples).
Parameters:
analysis_type(optional): Type of analysis -summary,trends, orrisk_assessment
Features:
- Displays 20 recent fraud cases
- Parses Unix timestamps (milliseconds) to human-readable dates
- Shows full fraud descriptions
- Includes business partner details, fraudster information, and bank account data
2. fraud_investigator
Deep-dive investigation of a specific fraud case with detailed context sections.
Parameters:
case_id(required): The CDL ID of the fraud case to investigate
Features:
- Structured investigation report with incident details
- Complete target and fraudster information
- Banking details and alternative payee info
- Recommendations for next steps and similar case patterns
3. fraud_pattern_detector
Analyzes patterns and similarities across fraud cases with different focus areas.
Parameters:
focus_area(optional): Area to focus on -geographical,temporal,modus_operandi, ortarget_profile
Features:
- Geographical distribution analysis
- Temporal pattern detection (trends over time)
- Fraud technique categorization
- Target profile analysis
4. fraud_report_generator
Generates comprehensive fraud reports with various report types and time periods.
Parameters:
report_type(optional): Type of report -executive_summary,detailed_analysis,incident_response, orprevention_recommendationstime_period(optional): Time period -last_week,last_month,last_quarter,last_year, orall_time
Features:
- Statistical breakdowns and metrics
- Geographic and type-based analysis
- Customized report formats for different audiences
- Strategic recommendations
Setup
- Install dependencies:
pip install -r requirements.txt
- Create your credentials file:
cp credentials.json.example credentials.json
Then edit credentials.json and add your CDQ username and password:
{
"username": "your-cdq-username",
"password": "your-cdq-password"
}
Note: The credentials.json file is gitignored for security.
Usage
MCP Inspector (Recommended! 🌟)
The easiest way to explore and test the server with a web UI:
./run_inspector.sh
Or manually:
npx @modelcontextprotocol/inspector /Users/michal/Repositories/mcp-local-server/.venv/bin/python server.py
This will:
- Start the MCP Inspector web interface
- Automatically launch your server
- Open a browser with an interactive UI
- Allow you to test all resources, tools, and prompts
Features in the Inspector:
- � Browse and read resources
- 🔧 Execute tools with custom parameters
- 💬 Test prompt templates
- � View real-time request/response logs
- 🐛 Debug server behavior
Alternative: Command-Line Demo Client
Run the Python demo client (currently has connection issues):
python client_demo.py
Interactive Jupyter Notebook Demo
Explore features step-by-step in a notebook:
- Open
demo.ipynbin VS Code or Jupyter - Run the cells to see each feature in action
Note: The notebook currently has connection issues and needs debugging.
Run the Server Standalone
To run just the server (for integration with MCP clients):
python server.py
The server communicates via stdio and follows the MCP protocol.
Authentication
This server uses OAuth2 password grant flow for authentication with the CDQ API:
- Token Endpoint:
https://id.cdq.com/auth/realms/cs/protocol/openid-connect/token - Client ID:
cloud-apps - Grant Type:
password - Headers:
X-Credential-Username: Your CDQ usernameAuthorization: Bearer token obtained from OAuth2
API Integration
This server integrates with the CDQ Bankaccount Data API:
- Endpoint:
https://bankaccount-data-api.reverse-proxy.prod.k8s.production.cdq-cloud-engine.com/public/fraudcases - Authentication: OAuth2 with Bearer token + X-Credential-Username header
- Documentation: https://developer.cdq.com/apis/bankaccount-data-api/api-v2/fraud-case-management
Fraud Case Data Structure
Each fraud case includes:
cdlId: Unique identifiertype: Fraud type (FAKE_DOCUMENT, FAKE_EMAIL, FALSIFIED_INVOICE, etc.)dateOfAttack: When the attack occurreddescription: Description of the fraud caseconfirmationState: CONFIRMED or SUSPECTEDbusinessPartnerName: Name of affected business partnerfraudsterEmail: Email address of the fraudsterbankAccount: Bank account details including IBAN, BIC, etc.- And many more fields...
Project Structure
mcp-local-server/
├── server.py # MCP server implementation
├── credentials.json.example # Example credentials file
├── credentials.json # Your credentials (gitignored)
├── run_inspector.sh # 🌟 Launch MCP Inspector (recommended)
├── requirements.txt # Python dependencies
└── README.md # This file
Next Steps
Once you have this running, you can:
- Search fraud cases with different filters and parameters
- Add more sophisticated analysis tools (statistics, pattern detection)
- Create more specialized prompt templates (risk scoring, reporting)
- Add more resources (fraud statistics, trend analysis)
- Integrate with AI/LLM applications like Claude Desktop for fraud analysis assistance
MCP Protocol
This server implements the Model Context Protocol, which allows AI applications to:
- Access resources (fraud case databases via APIs)
- Execute tools/actions (search and filter fraud cases)
- Use prompt templates (fraud analyst assistance)
Learn more: https://modelcontextprotocol.io/