BonusPay MCP Installation and Usage Guide
Requirements
- Python 3.8+
- MCP SDK 0.1.0+
Download
# Download
git clone https://github.com/gavin-work-space/mcp-bonuspay.git
# Enter project root directory
cd mcp-bonuspay
Set up Environment
# Create virtual environment .venv
uv venv
# Activate environment
source .venv/bin/activate
Install Dependencies
uv sync
Supplemental (Install uv on Ubuntu)
# Download and install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Make uv command effective
source $HOME/.local/bin/env
# Check version
uv --version
Environment Variable Settings
export BONUSPAY_PRIVATE_KEY_PATH="your merchant private key file path"
export BONUSPAY_PUBLIC_KEY_PATH="your bonuspay public key file path"
export BONUSPAY_PARTNER_ID="your bonuspay partnet id (merchant id)"
Launch mcp server using uv
# (Execute in project root directory)
# ${mode}: MCP Server Protocol: stdio, sse, streamable-http
# ${network}: Network environment identifier, test for testnet; main for mainnet (if --network parameter is not provided, defaults to testnet)
# ${host}: Service IP (if --host is not provided, defaults to 0.0.0.0)
# ${port}: Service port (if --port is not provided, defaults to 9998)
# ${private-key-path}: Path to BonusPay merchant's RSA private key file (xx.pem) (defaults to value of environment variable BONUSPAY_PRIVATE_KEY_PATH)
# ${public-key-path}: Path to BonusPay platform's RSA public key file (xx.pem) (defaults to value of environment variable BONUSPAY_PUBLIC_KEY_PATH)
# ${partner-id}: BonusPay merchant's Partner ID (defaults to value of environment variable BONUSPAY_PARTNER_ID)
uv run -m bonuspay ${mode} --network ${network} --host ${host} --port ${port} --private-key-path ${private-key-path} --public-key-path ${public-key-path} --partner-id ${partner-id}
Package and launch mcp server using uvx
# Clear local cache
rm -rf dist/
uv cache clean
# Package
uvx hatch build
# View package info (optional)
unzip -l dist/mcp_bonuspay-${version}-py3-none-any.whl
# Upload to PyPi
# ${PyPi-url}: PyPi link, Testnet: https://test.pypi.org/legacy/; Mainnet: https://pypi.org/legacy/
# ${token}: PyPi API token
uv publish --publish-url ${PyPi-url} --token ${token}
# Launch Testnet (e.g., testnet package using mainnet dependencies)
uvx --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ mcp-bonuspay sse
# Launch Mainnet
uvx mcp-bonuspay sse
Debug remote mcp server (sse) using MCP Inspector on PC
# Server-side
#
# 1. Activate virtual environment
uv venv
source .venv/bin/activate
# 2. Set PYTHONPATH environment variable
export PYTHONPATH=$PWD
# 3. Set ALLOWED_ORIGINS environment variable
export ALLOWED_ORIGINS="http://localhost:8082,http://127.0.0.1:8082,http://localhost:6274,http://127.0.0.1:6274,http://localhost:8083,http://127.0.0.1:8083"
# 4. Set server's proxy whitelist
export no_proxy="localhost,127.0.0.1,${ServerIp},api.testbonuspay.network"
echo $HTTP_PROXY
echo $no_proxy
# 5. Run mcp inspector for debugging (execute in project root directory)
mcp dev run_server_for_mcp_dev.py --with-editable . # shell 1
npx @modelcontextprotocol/inspector # shell 2
# PC-side
#
# 1. Execute in local PC's bash (Open SSH tunnel, e.g., local 8082 binds server 6274, local 8083 binds server 6277, keep this bash open)
ssh -L 8082:127.0.0.1:6274 -L 8083:127.0.0.1:6277 your_username@your_ip
# 2. Open in local PC's browser
# ${token}: Token from the npx @modelcontextprotocol/inspector console in shell 2
http://localhost:8082/?MCP_PROXY_AUTH_TOKEN=${token}#tools
# 3. In Transport Type, enter sse; In URL, enter something like: http://${ServerIp}:${mcp server port}/sse; Click "Connect"
#
# 4. Start debugging
Integrate with Cursor using source code (stdio mode)
# Download code locally
git clone https://github.com/gavin-work-space/mcp-bonuspay.git
# Enter project root directory
cd mcp-bonuspay
# Create virtual environment .venv
uv venv
# Activate environment
source .venv/bin/activate
# Install project
uv pip install -e .
// Configure Cursor Settings
{
"mcpServers": {
"bonuspay": {
"name":"BonusPay API MCP Service",
"type": "stdio",
"isActive": true,
"command": "uv",
"args": [
"run",
"--directory",
"D:\\py-workspace\\bonuspay-mcp-server",
"-m",
"bonuspay"
],
"env": {
"BONUSPAY_PRIVATE_KEY_PATH": "Fill in your merchant private key file path",
"BONUSPAY_PUBLIC_KEY_PATH":"Fill in your bonuspay public key file path",
"BONUSPAY_PARTNER_ID":"Fill in your partner id (merchant id)"
}
}
}
}
Integrate with Cursor using package (stdio mode)
// Testnet
{
"mcpServers": {
"bonuspay": {
"name":"BonusPay MCP Service",
"type": "stdio",
"isActive": true,
"command": "uvx",
"args": [
"--index-url",
"https://test.pypi.org/simple/",
"--extra-index-url",
"https://pypi.org/simple/",
"bonuspay-mcp",
"stdio",
"--network",
"test"
],
"env": {
"BONUSPAY_PRIVATE_KEY_PATH": "Fill in your merchant private key file path",
"BONUSPAY_PUBLIC_KEY_PATH":"Fill in your bonuspay public key file path",
"BONUSPAY_PARTNER_ID":"Fill in your partner id (merchant id)"
}
}
}
}
// Mainnet
{
"mcpServers": {
"bonuspay": {
"name":"BonusPay MCP Service",
"type": "stdio",
"isActive": true,
"command": "uvx",
"args": [
"bonuspay-mcp",
"stdio",
"--network",
"main"
],
"env": {
"BONUSPAY_PRIVATE_KEY_PATH": "Fill in your merchant private key file path",
"BONUSPAY_PUBLIC_KEY_PATH":"Fill in your bonuspay public key file path",
"BONUSPAY_PARTNER_ID":"Fill in your partner id (merchant id)"
}
}
}
}
Integrate remote service with Cursor (sse mode)
{
"mcpServers": {
"bonuspay": {
"name":"BonusPay API MCP Service",
"type": "sse",
"isActive": true,
"url":"http://${ServiceIp}:${ServicePort}/sse"
}
}
}
Integrate remote service with Cursor (streamable-http mode)
{
"mcpServers": {
"bonuspay": {
"name":"BonusPay API MCP Service",
"type": "streamable-http",
"isActive": true,
"url":"http://${ServiceIp}:${ServicePort}/mcp"
}
}
}
Metadata
Release files for mcp-bonuspay 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_bonuspay-0.1.3.tar.gz | 13.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_bonuspay-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.1 kB
Release files / mcp_bonuspay-0.1.3.tar.gz
| Download URL | mcp_bonuspay-0.1.3.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc48f837695a67157f6798f4a137972b7d7d5d95e812a3822a7c28ed31fd3845
|
|
BLAKE2b-256 checksum How to use checksums |
e82d89f5a58a4dcb729147802a9e002a0a2a89bd3c39897ac12252caf4288093
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / mcp_bonuspay-0.1.3-py3-none-any.whl
| Download URL | mcp_bonuspay-0.1.3-py3-none-any.whl |
|---|---|
| Size | 19.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a7196f66e033fc6329bd1181133762e23328e58afcf47b90ad80c49d74818a8
|
|
BLAKE2b-256 checksum How to use checksums |
2d22074172f7df2516992e5a8e09ed6824a0969d1128a8b7894c0650563a82a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Security for mcp-bonuspay 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.