Fraud Alert MCP Server
README.md
# INITIALIZATION
Go to Claude, and under settings, choose Connectors.
Add a new connector and paste the following link:
"https://fraud-alert-mcp-ha-hak-team-amrita-university-amritapuri-campus.app.nitrocloud.ai/mcp"
Give it the required action permissions and reference it by a name. You can now use this in Claude.
# Fraud Alert MCP Server
A Model Context Protocol (MCP) server for real-time fraud detection and transaction analysis. Integrates with Claude and other AI models to provide intelligent fraud risk assessment.
## What is MCP?
The Model Context Protocol (MCP) is a standard that allows AI models like Claude to safely invoke tools and access resources from external servers. This MCP server exposes fraud detection tools that Claude can call to analyze transactions, flag suspicious activity, and manage fraud rules.
## How to Use This Server
### 1. **Local Development**
```bash
# Install dependencies
npm install
# Start the MCP server
npm run dev
```
The server will start and be ready to accept MCP connections.
### 2. **Connect in Claude Desktop**
Add this server to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"fraud-alert": {
"command": "node",
"args": ["dist/index.js"]
}
}
}
```
Then restart Claude Desktop. The fraud detection tools will appear in the Tools panel.
### 3. **Programmatic Integration**
Use any MCP client library to connect:
```javascript
// Example: Node.js MCP client
const client = new MCPClient();
await client.connect('fraud-alert');
const result = await client.callTool('analyze_transaction', {
transactionId: 'TX-123',
userId: 'U-456',
amount: 5000,
// ... other fields
});
```
## Available Tools
### `analyze_transaction`
Analyzes a transaction for fraud risk. Returns a risk score (0-100), identified risk factors, and a recommended action.
**Input:**
- `transactionId` (string): Unique transaction ID
- `userId` (string): User ID
- `amount` (number): Transaction amount
- `currency` (string): Currency code (e.g., USD)
- `merchantCategory` (string): Merchant category (e.g., electronics)
- `location` (object): Transaction location with lat/long/country
- `deviceId` (string): Device identifier
- `timestamp` (string): ISO 8601 timestamp
**Output:**
- `isFraudulent` (boolean): Fraud flag
- `riskScore` (0-100): Risk score
- `riskFactors` (array): List of identified risk factors
- `recommendedAction` (enum): ALLOW, REVIEW, or BLOCK
### `flag_transaction_status`
Updates the status of a transaction and triggers an alert.
**Input:**
- `transactionId` (string): Transaction ID
- `actionTaken` (enum): BLOCKED, FLAGGED_FOR_REVIEW, or CLEARED
- `agentReasoning` (string): Reason for the action
**Output:**
- `success` (boolean): Operation status
- `alertId` (string): Unique alert ID
- `timestamp` (string): Alert timestamp
## Project Structure
```
fraud-alert-mcp/
├── src/
│ ├── modules/
│ │ ├── detection/ # Fraud detection logic
│ │ │ ├── detection.tools.ts
│ │ │ ├── detection.service.ts
│ │ │ └── detection.module.ts
│ │ ├── calculator/ # Calculator tools
│ │ ├── governance/ # Governance tools
│ │ └── ...
│ ├── widgets/ # UI widgets for tool results
│ ├── app.module.ts # Main app module
│ └── index.ts # Server entry point
├── package.json
├── tsconfig.json
└── README.md
```
## Environment Variables
Create a `.env` file:
```
ANTHROPIC_API_KEY=sk-ant-...
PORT=3000
```
## Testing
Run the included test script to verify the server works with Claude:
```bash
node test-fraud-mcp.js
```
This script connects to your local MCP server and runs sample fraud analysis scenarios.
## Build & Deploy
```bash
# Build TypeScript
npm run build
# Start production server
npm start
```
## License
MIT
TDQS
A3.5/5.0
Scored across 9 tools
Disambiguation5/5
All tools have clearly distinct purposes: four focus on fraud-specific actions (analyzing, flagging, risk profiling, rule updating) and five on user CRUD operations. No overlapping functionality.
Naming Consistency5/5
All tool names follow a consistent verb_noun snake_case pattern (e.g., flag_transaction_status, create_user), making it predictable for an agent.
Tool Count5/5
9 tools is well-scoped for the server's purpose, covering both user management and fraud operations without excess or deficiency.
Completeness4/5
User CRUD is complete, and fraud operations cover analysis, flagging, risk profiling, and rule updating. However, missing tools to retrieve transactions or list fraud rules create minor gaps.
Maintenance
ActivitySlowing
ResponsivenessNo issues