payments-toolkit-mcp
A local MCP server providing payment validation tools and resources, including card number Luhn checks, card network detection, and IBAN validation, with no network calls required.
README
payments-toolkit-mcp
A minimal Model Context Protocol (MCP) server, built as a hands-on learning project (see PLAN.md for the full step-by-step walkthrough).
It exposes payments-related validation utilities as MCP tools and one static resource — all local logic, no network calls, no API keys required.
Tools
validate_card_number— Luhn checksum validation for a card number (digits only, 8-19 length).detect_card_type— identifies the card network (Visa, Mastercard, American Express, Discover, Diners Club, JCB) from the IIN/BIN prefix.validate_iban— format, country-specific length, and ISO 13616 mod-97 checksum validation for an IBAN.
Resources
card_networks(payments-toolkit://card-networks) — static JSON listing of supported card networks and their prefix ranges.
Prerequisites
- Node.js 18+ (project developed against v24)
- pnpm
Setup
pnpm install
pnpm run build
Usage
Run the server standalone (it waits on stdio, so this is mainly for sanity checking):
pnpm run start
Inspect and call the tools/resource directly via a local web UI, without wiring up a client:
pnpm run inspect
Connect to Claude Code
claude mcp add payments-toolkit-mcp -- node /path/to/payments-toolkit-mcp/dist/index.js
claude mcp list
Inside a Claude Code session, run /mcp to confirm the connection and see
the discovered tools/resources.
Project structure
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
Notes
- Never
console.login this server — stdout is reserved for the JSON-RPC protocol stream over stdio. Useconsole.errorfor any debug output.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.