Skip to main content
Glama
prashil1996

bank-postgres-mcp

by prashil1996

bank-postgres-mcp

PostgreSQL 데이터베이스(bankdb)에 읽기 및 쓰기를 수행하는 HTTP MCP 서버입니다. 배포 및 접근 가능: https://armored-backspace-angles.ngrok-free.dev/mcp

엔드포인트

경로

메서드

목적

/mcp

POST

MCP Streamable HTTP 엔드포인트

/health

GET

활성 상태 확인

Related MCP server: db-mcp

도구

읽기 도구 (bankdb 직접 쿼리)

도구

설명

list_customers

데이터베이스의 모든 고객 나열

get_customer_by_id

고객 ID로 고객 프로필 + 모든 계좌 조회

get_customer_by_account

계좌번호(예: DB5194542004)로 고객 및 계좌 조회

get_transactions

계좌 ID 또는 계좌번호로 최근 거래 조회

쓰기 도구 (MCP 덤프 테이블에 upsert)

도구

액션

dump_customer_data

가져온 고객 레코드를 customers 테이블에 upsert

dump_created_customer

새로 생성된 고객을 customers 테이블에 삽입

dump_bank_branch

은행 지점 레코드를 bank_branches 테이블에 upsert

테이블은 첫 사용 시 자동 생성됩니다.


설정

1. 사전 요구 사항

  • Node.js ≥ 18

  • 로컬에서 실행 중인 PostgreSQL

2. 설치 및 빌드

cd bank-postgres-mcp
npm install
npm run build

3. 환경 구성

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=bankpassword

4. 서버 시작

# 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 서버 도구 통합을 추가합니다:

필드

값

전송

Streamable HTTP

URL

http://localhost:3100/mcp

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

컬럼

타입

비고

customer_id

TEXT PK

full_name

TEXT

date_of_birth

TEXT

phone

TEXT

email

TEXT

pan

TEXT

개인 식별 정보 (PII)

aadhaar

TEXT

PII

account_number

TEXT

PII

ifsc

TEXT

address_*

TEXT

line1, line2, city, state, postal_code, country

account_type

TEXT

kyc_status

TEXT

available_balance

NUMERIC

credit_score

INT

nominee

TEXT

source

TEXT

fetch 또는 create

inserted_at

TIMESTAMPTZ

자동

updated_at

TIMESTAMPTZ

자동

bank_branches

컬럼

타입

비고

ifsc

TEXT PK

branch_name

TEXT

bank_name

TEXT

city

TEXT

state

TEXT

services

TEXT[]

inserted_at

TIMESTAMPTZ

자동

updated_at

TIMESTAMPTZ

자동

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A minimal banking system MCP server that allows account management, deposits, withdrawals, balance inquiries, and transaction history via REST endpoints.
    -
  • A
    license
    A
    quality
    D
    maintenance
    A lightweight MCP server for relational databases, enabling dynamic connections to PostgreSQL and MySQL, SQL execution, and transaction control.
    7
    52 npm
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Full-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.
    36
    8 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for PostgreSQL that enables Cursor and other MCP clients to execute SQL queries, list tables, and explore database schemas via HTTP.
    1,293 npm
    MIT