bank-postgres-mcp
bank-postgres-mcp
HTTP MCP 服务器,用于读写 PostgreSQL 数据库(bankdb)。
已部署并可访问:https://armored-backspace-angles.ngrok-free.dev/mcp
端点
路径 | 方法 | 用途 |
| POST | MCP 可流式 HTTP 端点 |
| GET | 存活检查 |
Related MCP server: db-mcp
工具
读取工具(直接查询 bankdb)
工具 | 描述 |
| 列出数据库中的所有客户 |
| 根据 customer_id 获取客户资料 + 所有账户 |
| 根据账号(例如 |
| 根据 account_id 或 account_number 获取近期交易记录 |
写入工具(更新插入到 MCP 转储表)
工具 | 操作 |
| 将获取的客户记录更新插入到 |
| 将新创建的客户插入到 |
| 将银行分行记录更新插入到 |
表在首次使用时自动创建。
设置
1. 前提条件
Node.js ≥ 18
本地运行 PostgreSQL
2. 安装与构建
cd bank-postgres-mcp
npm install
npm run build3. 配置环境
cp env.example .env
# .env is gitignored — edit credentials there提供的凭据:
DATABASE_URL=postgresql://bankuser:bankpassword@localhost:5432/bankdb
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=bankdb
POSTGRES_USER=bankuser
POSTGRES_PASSWORD=bankpassword4. 启动服务器
# Export env vars, then start
export DATABASE_URL=postgresql://bankuser:bankpassword@localhost:5432/bankdb
node build/index.js
# Or with all vars:
export POSTGRES_HOST=localhost POSTGRES_PORT=5432 POSTGRES_DB=bankdb \
POSTGRES_USER=bankuser POSTGRES_PASSWORD=bankpassword
node build/index.js服务器默认在 http://localhost:3100 上启动。可通过 PORT=XXXX 覆盖。
5. 验证
curl http://localhost:3100/health
# → {"status":"ok","server":"bank-postgres-mcp","version":"1.0.0"}在 watsonx Orchestrate 中注册
在 Orchestrate 中,添加一个新的 MCP 服务器 工具集成:
字段 | 值 |
传输方式 | 可流式 HTTP |
URL |
|
如果 Orchestrate 运行在远程(非你的笔记本电脑),请使用隧道暴露服务器:
npx localtunnel --port 3100 # Use the returned https URL instead of localhost
在 Bob 中注册(.bob/mcp.json)
{
"mcpServers": {
"bank-postgres-mcp": {
"url": "http://localhost:3100/mcp"
}
}
}数据库模式
customers
列名 | 类型 | 说明 |
| TEXT PK | |
| TEXT | |
| TEXT | |
| TEXT | |
| TEXT | |
| TEXT | 个人身份信息 |
| TEXT | 个人身份信息 |
| TEXT | 个人身份信息 |
| TEXT | |
| TEXT | line1, line2, city, state, postal_code, country |
| TEXT | |
| TEXT | |
| NUMERIC | |
| INT | |
| TEXT | |
| TEXT |
|
| TIMESTAMPTZ | 自动 |
| TIMESTAMPTZ | 自动 |
bank_branches
列名 | 类型 | 说明 |
| TEXT PK | |
| TEXT | |
| TEXT | |
| TEXT | |
| TEXT | |
| TEXT[] | |
| TIMESTAMPTZ | 自动 |
| TIMESTAMPTZ | 自动 |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Demo banking MCP server: accounts, transactions and payments. OAuth 2.1 with DPoP.
MCP server for Modern Treasury — payment orders, transactions, counterparties and ledgers.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
MCP server for the vaulink iPhone finance app: read accounts, queue changes you confirm on the phone
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA minimal banking system MCP server that allows account management, deposits, withdrawals, balance inquiries, and transaction history via REST endpoints.-
- AlicenseAqualityCmaintenanceA lightweight MCP server for relational databases, enabling dynamic connections to PostgreSQL and MySQL, SQL execution, and transaction control.71MIT
- AlicenseAqualityCmaintenanceFull-featured MCP server that exposes 36 tools for interacting with PostgreSQL databases, covering schema introspection, query execution, data exploration, performance monitoring, security auditing, and maintenance.365 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for PostgreSQL that enables Cursor and other MCP clients to execute SQL queries, list tables, and explore database schemas via HTTP.MIT