Skip to main content

chnyangjie-snbpy-mcp

MCP server for Snowball Securities (雪盈证券) trading API. Lets AI agents place orders, check balances, and manage positions.

Features

  • Place, cancel, and query trade orders
  • Check account balance and positions
  • Query transaction history
  • Support for US/HK/CN stocks, options, futures, and more

Quick Start

No installation needed. Just configure Claude Desktop:

{
  "mcpServers": {
    "chnyangjie-snbpy": {
      "command": "uvx",
      "args": ["chnyangjie-snbpy-mcp"],
      "env": {
        "SNB_ACCOUNT": "YOUR_ACCOUNT",
        "SNB_KEY": "YOUR_KEY"
      }
    }
  }
}

Option 2: pip install

pip install chnyangjie-snbpy-mcp

# Auto-configure Claude Desktop
export SNB_ACCOUNT=your_account
export SNB_KEY=your_key
snbpy-install

# Restart Claude Desktop

Environment Variables

Variable Required Default Description
SNB_ACCOUNT Yes - Account ID
SNB_KEY Yes - API secret key
SNB_SERVER No sandbox.snbsecurities.com API server
SNB_PORT No 443 Port
SNB_SCHEMA No https HTTP schema
SNB_TIMEOUT No 10000 Timeout (ms)

Tools

Tool Description
login Verify API credentials
place_order Place a trade order
cancel_order Cancel an order
get_order_by_id Query single order
get_order_list Query orders (paginated)
get_transaction_list Query fills (paginated)
get_balance Query account balance
get_position_list Query positions

Development

# Clone the repo
git clone https://github.com/chnyangjie/snbpy-mcp.git
cd snbpy-mcp

# Install in editable mode
pip install -e .

# Run with MCP Inspector
SNB_ACCOUNT=xxx SNB_KEY=yyy mcp dev src/snbpy_mcp/server.py

# Run directly
SNB_ACCOUNT=xxx SNB_KEY=yyy snbpy-mcp

Publishing

# Build
python -m build

# Upload to PyPI
twine upload dist/*

License

MIT

Metadata

Release files for chnyangjie-snbpy-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chnyangjie-snbpy-mcp 0.1.2
File Size Uploaded
chnyangjie_snbpy_mcp-0.1.2.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chnyangjie-snbpy-mcp 0.1.2
File Interpreter ABI Platform
chnyangjie_snbpy_mcp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / chnyangjie_snbpy_mcp-0.1.2.tar.gz

Download URL chnyangjie_snbpy_mcp-0.1.2.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dc862293ef19c5d7b2c65cf2a4c6c716d95b8e6f790f513f1444640dd7574793
BLAKE2b-256 checksum
How to use checksums
3abe80721d39e704027e4ad2269dbeb848ade2cbba60b97a0fd674c6db918e35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / chnyangjie_snbpy_mcp-0.1.2-py3-none-any.whl

Download URL chnyangjie_snbpy_mcp-0.1.2-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83c3ecb7291cc60cdcdb724cbc7442ec2354192fcc43f793ac0b55665b48a3ec
BLAKE2b-256 checksum
How to use checksums
97e673ae7257fff171dd9cef799e4a8aaf0032f7c46c79662cbec6da0189e051
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page