payments-toolkit-mcp
payments-toolkit-mcp
一个极简的 Model Context Protocol (MCP) 服务器,作为动手实践学习项目而构建(完整的分步讲解见 PLAN.md)。
它将支付相关的校验工具暴露为 MCP 工具和一个静态资源——全部为本地逻辑, 无需网络调用,无需 API 密钥。
工具
validate_card_number—— 对卡号进行 Luhn 校验和验证(仅限数字,长度 8-19 位)。detect_card_type—— 根据 IIN/BIN 前缀识别卡组织(Visa、Mastercard、American Express、Discover、Diners Club、JCB)。validate_iban—— 对 IBAN 进行格式、国家特定长度以及 ISO 13616 mod-97 校验和验证。
Related MCP server: stripe-mcp-server
资源
card_networks(payments-toolkit://card-networks) —— 静态 JSON 列表,列出支持的卡组织及其前缀范围。
前提条件
Node.js 18+(项目基于 v24 开发)
设置
pnpm install
pnpm run build用法
独立运行服务器(它会在 stdio 上等待,因此这主要用于健全性检查):
pnpm run start通过本地 Web UI 直接检查和调用工具/资源,无需接入客户端:
pnpm run inspect连接到 Claude Code
claude mcp add payments-toolkit-mcp -- node /path/to/payments-toolkit-mcp/dist/index.js
claude mcp list在 Claude Code 会话中,运行 /mcp 以确认连接并查看发现的工具/资源。
项目结构
src/
index.ts # composition root: creates the server, wires up transport
lib/ # pure validation/lookup logic (no MCP dependency)
luhn.ts
card-networks.ts
iban.ts
schemas.ts
tools/ # one file per registered MCP tool
validate-card-number.ts
detect-card-type.ts
validate-iban.ts
resources/ # one file per registered MCP resource
card-networks.ts备注
切勿在此服务器中使用
console.log——stdout 保留给通过 stdio 传输的 JSON-RPC 协议流。任何调试输出请使用console.error。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceAn MCP server for validating JSON against schemas, checking email deliverability, verifying URLs, assessing data quality, and validating API responses using RFC-compliant checks and heuristic analysis.11MIT
- AlicenseAqualityBmaintenanceA local MCP server for Stripe payment operations with 52 tools across 8 domains, featuring built-in PII redaction and strict input validation for safe AI-assisted development workflows.52401MIT
- AlicenseAqualityCmaintenanceAn MCP server that provides AI agents with tools to validate SWIFT MT and ISO 20022 MX payment messages, check BIC/IBAN correctness, and convert between MT and MX formats.711MIT
- AlicenseAqualityAmaintenanceA fully local, closed-world MCP server that manages, validates, and serves bank-specific ISO 20022 clearing profiles and rule packs, enabling AI agents to discover profiles, fetch them, lint payloads against them, and validate rule-pack definitions.41Apache 2.0
Related MCP Connectors
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Conformance checker for MCP servers. Free, no key, verdicts recomputable and re-measured daily.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ramigs/payments-toolkit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server