Ctp MCP
The CTP trading interface MCP server developed based on vnpy_ctp requires the installation of the corresponding operating system compiler in advance.
2 points
9.7K

What is the CTP MCP Server?

The CTP MCP server is a bridge tool that allows you to access and use the CTP futures trading interface through the standard Model Context Protocol (MCP). CTP is the mainstream trading system in the Chinese futures market. This server encapsulates the complex CTP interface into a standardized service that is easier to be called by AI assistants or applications.

How to use the CTP MCP Server?

You need to ensure that the necessary compiler (such as Visual Studio for Windows) is installed on your computer first, and then you can start the server through a simple command line. After starting, the AI assistant (such as Claude Desktop) or your application can communicate with the server through the MCP protocol to query market data or execute trading instructions.

Applicable Scenarios

It is suitable for scenarios where you need to conduct futures market data analysis, query real - time quotes, monitor account status, or assist in trading decisions through an AI assistant (such as Claude). It provides a more user - friendly interaction entry for users who are not familiar with the complexity of the CTP API.

Main Functions

CTP Interface Connection
Seamlessly connect to the official CTP trading and market data interfaces, supporting the trading gateways of major domestic futures companies.
MCP Standard Protocol
Follow the Model Context Protocol standard and can be easily integrated with any MCP - supported client (such as Claude Desktop).
Market Data Access
Provide query functions for real - time quotes, historical data, contract information, market status and other data.
Trading Function Access
Support querying account funds, positions, order status, as well as basic trading operations such as placing and canceling orders (trading permissions need to be configured).
Advantages
Standardized interface: Provide a unified and standard access method through MCP, reducing the complexity of directly using the CTP API.
AI - friendly: Designed specifically for collaborative work with AI assistants, making it possible to conduct market queries and trading assistance through natural language.
Based on a mature project: Built on vnpy_ctp, which has been widely verified in the domestic quantitative trading field and has high stability.
Cross - platform support: Can run on Windows, Linux, and Mac systems through different compiler supports.
Limitations
Strong environmental dependence: The compiler of the specified platform (such as Visual Studio) must be installed before running, which poses a certain threshold for beginners.
Requires a CTP account: You must have a real - time or simulation CTP account provided by a futures company to connect and use all functions.
Function is limited by the underlying library: Its function scope and performance depend on the implementation of the vnpy_ctp library.
Need to understand MCP: Users or integrators need to have a basic understanding of the MCP protocol to use it effectively.

How to Use

Environment Preparation
Install the corresponding compiler according to your operating system: - Windows: Install Visual Studio and ensure that the C++ development components are available. - Linux: Install the GCC compiler suite. - Mac: Install the XCode command - line tools.
Installation and Configuration
Install the project dependencies and configure the server connection parameters according to your CTP account information (usually, you need to set the broker code, trading server address, account number, password, etc. in `server.py` or related configuration files).
Start the Server
Use the provided command to start the MCP server. After the server starts, it will listen for connections from MCP clients on the specified port.
Connect the Client
In your MCP client (such as configuring Claude Desktop), add this server as a tool resource. After that, you can call the functions provided by the server through natural language in the client.

Usage Examples

Query the Market Quotes of the Main Contract
The user wants to know the latest price and price change of the current main contract of rebar.
Check the Account Overview
After trading, the user wants to quickly check the total assets, available funds, and floating profit and loss of the account.
View Tradable Contracts
New users want to know which active metal futures contracts are available on the Shanghai Futures Exchange.

Frequently Asked Questions

Can I use this server without a futures account?
Why do I need to install Visual Studio/GCC/XCode before starting?
Is this server secure? Will it directly operate my account for trading?
Can I use other programs to connect to this server besides Claude?

Related Resources

Model Context Protocol (MCP) Official Documentation
Understand the standards, specifications, and working principles of the MCP protocol.
vn.py Project Homepage
Learn more about the vnpy_ctp gateway on which this project is based and its ecosystem.
CTP API Documentation
Detailed interface instructions for the CTP native API, which can be referred to by advanced users.
Claude Desktop Configuration MCP Tutorial
Learn how to configure and use the MCP server in Claude Desktop.

Installation

Copy the following command to your Client for configuration
Note: Your key is sensitive information, do not share it with anyone.

Alternatives

V
Vestige
Vestige is an AI memory engine based on cognitive science. By implementing 29 neuroscience modules such as prediction error gating, FSRS - 6 spaced repetition, and memory dreaming, it provides long - term memory capabilities for AI. It includes a 3D visualization dashboard and 21 MCP tools, runs completely locally, and does not require the cloud.
Rust
9.6K
4.5 points
M
Moltbrain
MoltBrain is a long-term memory layer plugin designed for OpenClaw, MoltBook, and Claude Code, capable of automatically learning and recalling project context, providing intelligent search, observation recording, analysis statistics, and persistent storage functions.
TypeScript
10.2K
4.5 points
B
Bm.md
A feature-rich Markdown typesetting tool that supports multiple style themes and platform adaptation, providing real-time editing preview, image export, and API integration capabilities
TypeScript
14.9K
5 points
S
Security Detections MCP
Security Detections MCP is a server based on the Model Context Protocol that allows LLMs to query a unified security detection rule database covering Sigma, Splunk ESCU, Elastic, and KQL formats. The latest version 3.0 is upgraded to an autonomous detection engineering platform that can automatically extract TTPs from threat intelligence, analyze coverage gaps, generate SIEM-native format detection rules, run tests, and verify. The project includes over 71 tools, 11 pre-built workflow prompts, and a knowledge graph system, supporting multiple SIEM platforms.
TypeScript
6.7K
4 points
P
Paperbanana
Python
10.0K
5 points
F
Finlab Ai
FinLab AI is a quantitative financial analysis platform that helps users discover excess returns (alpha) in investment strategies through AI technology. It provides a rich dataset, backtesting framework, and strategy examples, supporting automated installation and integration into mainstream AI programming assistants.
8.9K
4 points
B
Better Icons
An MCP server and CLI tool that provides search and retrieval of over 200,000 icons, supports more than 150 icon libraries, and helps AI assistants and developers quickly obtain and use icons.
TypeScript
8.7K
4.5 points
A
Assistant Ui
assistant - ui is an open - source TypeScript/React library for quickly building production - grade AI chat interfaces, providing composable UI components, streaming responses, accessibility, etc., and supporting multiple AI backends and models.
TypeScript
10.0K
5 points
G
Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
28.5K
4.3 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
81.7K
4.3 points
M
Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
38.2K
5 points
N
Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
23.9K
4.5 points
F
Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
69.7K
4.5 points
U
Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
37.5K
5 points
G
Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
24.0K
4.5 points
M
Minimax MCP Server
The MiniMax Model Context Protocol (MCP) is an official server that supports interaction with powerful text-to-speech, video/image generation APIs, and is suitable for various client tools such as Claude Desktop and Cursor.
Python
56.5K
4.8 points
AIBase
Zhiqi Future, Your AI Solution Think Tank
© 2026AIBase