Video.Project.3.mp4
An MCP (Model Context Protocol) server that interfaces with a bank API, providing tools for account management, transactions, and authentication.
This project implements an MCP server that exposes banking functionality through standardized MCP tools. The server connects to a bank API and provides:
- Public tools: Health check, user registration
- Authentication tools: Login, logout (with JWT token management)
- Account tools: List accounts, create accounts
- Transaction tools: List transactions, create deposits/withdrawals, create transfers, get transaction details
The server uses the Hono framework for handling HTTP requests and Upstash Redis for session management.
This MCP server has been deployed on Vercel and is accessible as an HTTP streamable MCP at: https://http-streamable-mcp.vercel.app/mcp
You can connect to this endpoint using any MCP client that supports streamable HTTP transport.
To use this MCP server with MCP-compatible clients like Claude Desktop, Claude Code, or GitHub Copilot Chat, configure the client to connect to the streamable HTTP endpoint.
- Open Claude Desktop or Claude Code settings.
- Navigate to the MCP Servers configuration.
- Add a new MCP server with the following details:
- Name: Bank MCP (or any name)
- Type: Streamable HTTP
- URL:
https://http-streamable-mcp.vercel.app/mcp
- Save the configuration.
- Once connected, you can invoke the available tools (e.g.,
list_accounts,create_transaction) directly from Claude's chat interface.
GitHub Copilot Chat supports MCP servers via the MCP plugin (if available). To connect:
- Ensure you have the MCP plugin enabled in GitHub Copilot settings.
- Add a new MCP server:
- Name: Bank MCP
- URL:
https://http-streamable-mcp.vercel.app/mcp - Transport: Streamable HTTP
- After connecting, you can use the bank tools in Copilot Chat by invoking them as you would any MCP tool.
health_check: Check the health of the bank APIregister_user: Register a new user with the bank API
login: Log in to the bank API (stores JWT securely)logout: Log out and delete the stored access token
list_accounts: List your bank accounts (optionally filter by account type)create_account: Create a new bank account (checking, savings, or credit)
list_transactions: List your bank transactions with filtering optionscreate_transaction: Create a new deposit or withdrawal transactioncreate_transfer: Create a new transfer between accountsget_transaction: Get details of a specific transaction by ID
Each tool includes detailed parameter validation. Refer to the individual tool files for specific parameter requirements.
For testing transfers, you can use the following pre-existing accounts:
| Type | Account ID | Balance |
|---|---|---|
| Checking | 0ac15ed6-03bb-41ca-a935-5a662cd39a35 | 500.00 |
| Savings | 02edb41f-70af-485a-b8a8-84451766a148 | 300.00 |
The server interacts with the following bank API endpoints:
GET /health- Health checkPOST /user/register- User registrationPOST /user/login- User loginDELETE /user/logout- User logoutGET /accounts- List accountsPOST /accounts- Create accountGET /transactions- List transactionsPOST /transactions- Create transactionGET /transactions/{id}- Get transaction detailsPOST /transfers- Create transfer
- JWT tokens are encrypted before storage in Redis
- Tokens automatically expire after 1 hour
- Invalid tokens are automatically cleared when detected
- All API calls include proper authorization headers
- Input validation prevents injection attacks
@hono/mcp: MCP integration for Hono@hono/node-server: Node.js server adapter for Hono@modelcontextprotocol/sdk: Official MCP SDK@upstash/redis: Redis client (Upstash)dotenv: Environment variable loadinghono: Web frameworkzod: Input validation
MIT
- Bank API interface based on the fastify-api-xi service
- Uses Hono framework for efficient HTTP handling