蜜罐MCP服务器
](https://nodejs.org/) 
概述
蜜罐MCP服务器是基于模型上下文协议(MCP)构建的交易智能系统。它使充当易受攻击的老年人角色的人工智能代理能够向骗子提供卡详细信息,然后监控和分析由此产生的欺诈交易,以收集有关骗子操作和方法的情报。
特性
- 13 MCP工具:用于交易监控和卡管理的全套工具
- 交易情报:高级交易搜索和分析功能
- 卡片管理:通过Lithic API创建和管理蜜罐卡
- 实时监控:实时交易订阅源和警报订阅
- MCP协议:支持HTTP和Stdio传输的模型上下文协议
快速开始
先决条件
- Node.js 18.0.0+
- 辅助账户和数据库
- Lithic API访问
安装
git clone
cd honeypot-mcp-server
npm ci配置
创建一个 .env 包含以下变量的文件:
# Core Configuration
NODE_ENV=production
PORT=3000
# Database
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_KEY=your_service_key
# Financial API
LITHIC_API_KEY=your_lithic_api_key
LITHIC_ENV=production
# Optional Features
LITHIC_WEBHOOK_SECRET=your_webhook_secret
ENABLE_POLLING=true
POLLING_INTERVAL_MS=5000
MCP_TRANSPORT=http测试
# Run test suite
npm test
# Run security tests
npm run test:security
# Run performance tests
npm run test:performance跑步
# Start the server
npm start
# Check health
curl http://localhost:3000/healthMCP工具
服务器提供13个按类别组织的工具:
系统操作(1个工具)
health_check-系统健康监测
卡片管理(5个工具)
list_available_cards-列出可用的蜜罐卡get_card_details-获取详细的卡信息create_honeypot_card-创建新的蜜罐卡update_card_limits-更新卡消费限额toggle_card_state-激活/停用卡
交易智能(5个工具)
get_transaction-获取单笔交易详细信息search_transactions-使用筛选器搜索交易get_recent_transactions-获取卡的最近交易记录get_transactions_by_merchant-按商家获取交易get_transaction_details-获取全面的交易信息
实时智能(2个工具)
subscribe_to_alerts-设置交易警报get_live_transaction_feed-监控实时交易
交易情报
该系统提供全面的交易监控和分析,包括:
- 高级交易搜索和过滤
- 实时交易监控
- 商户特定交易分析
- 基于卡的交易跟踪
- 实时交易馈送功能
核心焦点:简化了监测和调查工作流程的交易情报。
技术栈
- 运行时:带ES模块的Node.js
- 数据库:Supabase(PostgreSQL)
- 金融API:Lithic虚拟卡平台
- 协议:模型上下文协议(MCP)
- 测试:Vitest框架
API集成
MCP客户端示例
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
const transport = new StdioClientTransport({
command: 'node',
args: ['src/mcp-server.js']
});
const client = new Client({
name: 'fraud-detection-agent',
version: '1.0.0'
}, {
capabilities: { tools: {} }
});
await client.connect(transport);
const tools = await client.listTools();健康检查
const health = await client.callTool({
name: 'health_check',
arguments: { includeDetails: true }
});发展
项目结构
src/
├── config/ # Configuration and client setup
├── handlers/ # MCP tool implementations
├── schemas/ # Tool input/output schemas
├── services/ # Business logic services
└── utils/ # Utilities and helpers
tests/
├── unit/ # Unit tests
├── integration/ # Integration tests
├── security/ # Security tests
└── performance/ # Performance tests测试
该项目包括全面的测试覆盖范围:
- 所有处理程序和服务的单元测试
- MCP协议合规性集成测试
- 身份验证和数据处理的安全测试
- 响应时间性能测试
部署
看 部署.md 了解详细的部署说明。
应用程序可以部署在:
- 铁路(推荐,含
railway.json) - Docker容器
- 传统服务器
许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
