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
Option 1: uvx (Recommended - Zero Install)
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chnyangjie_snbpy_mcp-0.1.2.tar.gz | 5.7 kB | Without provenance | Details for chnyangjie_snbpy_mcp-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chnyangjie_snbpy_mcp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for chnyangjie_snbpy_mcp-0.1.2-py3-none-any.whl |
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
|
Security for chnyangjie-snbpy-mcp 0.1.2
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.