Skip to main content

CNHK MCP Server

A comprehensive Model Context Protocol (MCP) server for quantitative trading platform integration. This package provides a complete set of tools for interacting with quantitative trading APIs, managing simulations, and accessing financial data.

Features

  • API Integration: Complete API client for quantitative trading platforms
  • Simulation Management: Create, monitor, and manage trading simulations
  • Data Access: Retrieve datasets, data fields, and financial information
  • Alpha Management: Comprehensive alpha factor management and analysis
  • Forum Integration: Access to support forums and documentation
  • Performance Analysis: Advanced performance metrics and correlation analysis
  • Competition Support: Tools for trading competitions and leaderboards

Installation

pip install cnhkmcp

Quick Start

from cnhkmcp import BrainApiClient

# Initialize client
client = BrainApiClient()

# Authenticate
await client.authenticate("your_email@example.com", "your_password")

# Create a simulation
simulation_data = {
    "type": "REGULAR",
    "settings": {
        "instrumentType": "EQUITY",
        "region": "USA",
        "universe": "TOP3000"
    },
    "regular": "your_alpha_formula"
}

result = await client.create_simulation(simulation_data)
print(f"Simulation created: {result}")

Main Components

API Client (pythonmcp.py)

  • Authentication and session management
  • Simulation creation and monitoring
  • Alpha factor management
  • Data retrieval and analysis
  • Performance metrics

Forum Client (forum_functions.py)

  • Glossary term extraction
  • Forum post search and reading
  • Support documentation access

Usage Examples

Authentication

from cnhkmcp import authenticate

result = await authenticate("email@example.com", "password")
print(f"Authentication status: {result}")

Create Simulation

from cnhkmcp import create_simulation

result = await create_simulation(
    type="REGULAR",
    instrument_type="EQUITY",
    region="USA",
    universe="TOP3000",
    regular="your_alpha_formula_here"
)

Get Alpha Details

from cnhkmcp import get_alpha_details

alpha_info = await get_alpha_details("alpha_id_here")
print(f"Alpha details: {alpha_info}")

Search Forum Posts

from cnhkmcp import search_forum_posts

results = await search_forum_posts(
    email="email@example.com",
    password="password",
    search_query="alpha formula"
)

Configuration

The package supports configuration through JSON files:

  • user_config.json: User-specific settings
  • brain_config.json: Platform configuration

Requirements

  • Python 3.8+
  • Chrome browser (for forum functionality)
  • Valid platform credentials

Dependencies

  • requests
  • pandas
  • selenium
  • beautifulsoup4
  • mcp
  • pydantic

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For support and questions, please refer to the documentation or create an issue in the repository.

Metadata

Release files for cnhkmcp 4.3.16

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

Source distribution (sdist)

Source distribution for cnhkmcp 4.3.16
File Size Uploaded Provenance Actions
cnhkmcp-4.3.16.tar.gz 78.0 MB Without provenance Details for cnhkmcp-4.3.16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cnhkmcp 4.3.16
File Interpreter ABI Platform Actions
cnhkmcp-4.3.16-py3-none-any.whl Python 3 none any Details for cnhkmcp-4.3.16-py3-none-any.whl

Total release size: 157.4 MB

Release files / cnhkmcp-4.3.16.tar.gz

Download URL cnhkmcp-4.3.16.tar.gz
Size 78.0 MB
Tags Source
SHA-256 checksum
How to use checksums
3bea75d80974872cb2e3627110f23f15a4f75c224359d9ff85d3f78600d5b26e
BLAKE2b-256 checksum
How to use checksums
673a718fb58abdcdef0e82fadbbb5334779b88a220314abdd6a57c86c31d4a1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release files / cnhkmcp-4.3.16-py3-none-any.whl

Download URL cnhkmcp-4.3.16-py3-none-any.whl
Size 79.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
57ab9e66410bdcd5ed8a416f519869236a8cfeec284c776515c439a89980ad18
BLAKE2b-256 checksum
How to use checksums
ce5802622151382a04897f5648557ec3328ff9681711865cc1129bbdaaae0991
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Security for cnhkmcp 4.3.16

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.

Release history Release notifications | RSS feed

This release

4.3.16 This release

2 release files No provenance

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