mcp-server-payment

eliezerraj/mcp-server-payment

3.2

If you are the rightful owner of mcp-server-payment and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Model Context Protocol (MCP) server is a versatile tool designed to facilitate communication between clients and servers using a standardized protocol. It is particularly useful for applications that require dynamic tool invocation and session management.

Tools
2
Resources
0
Prompts
0

version

pip show langgraph pip show langgraph-checkpoint-redis

redis

KEY * FLUSHALL

create venv

python3 -m venv .venv

activate

source .venv/bin/activate

#install dependecies uv add mcp uv add 'mcp[cli]' pip install -r requirements

run inspector

uv run mcp dev /servers/_server.py npx @modelcontextprotocol/inspector python /servers/_server.py

run

python3 mcp_server.py

test (agent auto)

:use the mcp calculator_streamable_http add 1 to 1 and show the result

pgvector (inside pgvector database)

CREATE EXTENSION vector;

curl

1 Initialize Session curl -X POST http://localhost:8000/mcp
-H "Content-Type: application/json"
-H "MCP-Protocol-Version: 2025-06-18"
-H "Accept: application/json, text/event-stream"
-d '{ "jsonrpc":"2.0", "id":1, "method":"initialize", "params":{"protocolVersion":"2025-06-18", "capabilities":{"tools":{}}, "clientInfo":{"name":"test-client", "version":"1.0.0"}}}'

or

1.2 Initialize Session and get session-id

curl -X POST http://localhost:8000/mcp
-H "Content-Type: application/json"
-H "MCP-Protocol-Version: 2025-06-18"
-H "Accept: application/json, text/event-stream"
-d '{ "jsonrpc":"2.0", "id":1, "method":"sessions/open", "params":{"protocolVersion":"2025-06-18", "capabilities":{"tools":{}}, "clientInfo":{"name":"test-client", "version":"1.0.0"}}}'
-v 2>&1 | grep -i "mcp-session-id" | cut -d' ' -f3

  1. Send Initialized Notification curl -X POST http://localhost:8000/mcp
    -H "Content-Type: application/json"
    -H "MCP-Protocol-Version: 2025-06-18"
    -H "Accept: application/json, text/event-stream"
    -H "Mcp-Session-Id: 9cc57e117e64445fbccd6cbaff0558fc"
    -d '{"jsonrpc":"2.0","method":"notifications/initialized"}'

  2. List Tools curl -X POST http://localhost:8000/mcp
    -H "Content-Type: application/json"
    -H "MCP-Protocol-Version: 2025-06-18"
    -H "Accept: application/json, text/event-stream"
    -H "Mcp-Session-Id: 9cc57e117e64445fbccd6cbaff0558fc"
    -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

  3. Call Add Tool curl -X POST http://localhost:8000/mcp
    -H "Content-Type: application/json"
    -H "MCP-Protocol-Version: 2025-06-18"
    -H "Accept: application/json, text/event-stream"
    -H "Mcp-Session-Id: 9cc57e117e64445fbccd6cbaff0558fc"
    -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"add","arguments":{"a":1,"b":1}}}'

curl -X POST http://localhost:8000/mcp
-H "Content-Type: application/json"
-H "MCP-Protocol-Version: 2025-06-18"
-H "Accept: application/json, text/event-stream"
-H "Mcp-Session-Id: 3b658eac350844d4b93b29edac68bb97"
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_weather","arguments":{"location":"Sao Paulo"}}}'

curl -X POST http://localhost:8000/mcp
-H "Content-Type: application/json"
-H "MCP-Protocol-Version: 2025-06-18"
-H "Accept: application/json, text/event-stream"
-H "Mcp-Session-Id: 3953ccba97f14d7f9f027372390b689b"
-d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"get_account","arguments":{"account":"ACC-501"}}}'