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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cnhkmcp-4.1.3.tar.gz (72.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cnhkmcp-4.1.3-py3-none-any.whl (73.5 MB view details)

Uploaded Python 3

File details

Details for the file cnhkmcp-4.1.3.tar.gz.

File metadata

  • Download URL: cnhkmcp-4.1.3.tar.gz
  • Upload date:
  • Size: 72.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for cnhkmcp-4.1.3.tar.gz
Algorithm Hash digest
SHA256 3b0ff7a0bd170143ea7d956fc4163312c76e71fb82917d8f6199b07feeca5a3b
MD5 32b9cc0279529aa8ca8c0d91e070f001
BLAKE2b-256 0f300d5ab20668a1e1889dac3de5816f1575a835a9679d39e5d5ea702c6d58e1

See more details on using hashes here.

File details

Details for the file cnhkmcp-4.1.3-py3-none-any.whl.

File metadata

  • Download URL: cnhkmcp-4.1.3-py3-none-any.whl
  • Upload date:
  • Size: 73.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for cnhkmcp-4.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 db8573641f3cbfa6c3c80626acaa2beb7e6ff33fe0ce339395df8ae97d624a3e
MD5 cbef09b6cb65d701e8b5bf2b136dfa15
BLAKE2b-256 b22bb5b5c75344b3941043bf05a4b98c9e0deb81cf360ecfdcb43084ff99f587

See more details on using hashes here.

Release history Release notifications | RSS feed

4.3.6

2 files

4.3.5

2 files

4.3.4

2 files

4.3.3

2 files

4.3.2

2 files

4.3.1

2 files

4.3.0

2 files

4.2.9

2 files

4.2.8

2 files

4.2.7

2 files

4.2.6

2 files

4.2.5

2 files

4.2.4

2 files

4.2.3

2 files

4.2.2

2 files

4.2.1

2 files

4.2.0

2 files

4.1.9

2 files

4.1.8

2 files

4.1.7

2 files

4.1.6

2 files

4.1.5

2 files

4.1.4

2 files

This release

4.1.3 This release

2 files

4.0.1

2 files

3.1.15

2 files

3.1.14

2 files

3.1.13

2 files

3.1.12

2 files

3.1.11

2 files

3.1.10

2 files

3.1.9

2 files

3.1.7

1 file

3.1.6

2 files

3.1.5

2 files

3.1.4

2 files

3.1.3

2 files

3.1.2

2 files

3.1.1

2 files

3.1.0

2 files

3.0.0

2 files

2.3.20

2 files

2.3.19

2 files

2.3.18

2 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