nativeMCP
by SihaoH
nativeMCP is a C++ implementation of the Model Context Protocol (MCP) system, including the core architecture for host, client, and server. The host functions as an AI Agent, providing a command-line interface for interacting with the system.
Last updated: N/A
What is nativeMCP?
nativeMCP is a C++-based implementation of the Model Context Protocol (MCP). It provides a framework for AI agents to interact with various tools and services through a standardized protocol. It includes a host application (AI Agent), MCP client, and MCP server components.
How to use nativeMCP?
- Compile the project using CMake and Visual Studio 2022, ensuring Qt6.8 and cpp-httplib are properly installed and configured.
- Configure the
config.jsonfile to specify the LLM API endpoint, model, and MCP servers to connect to. - Run the host application, which will load the configured MCP clients and connect to the specified servers.
- Interact with the AI Agent through the command line, using natural language to invoke tools provided by the MCP servers.
Key features of nativeMCP
C++ implementation for performance and control
MCP-compliant architecture for interoperability
Host application acting as an AI Agent
Support for local LLMs via cpp-httplib
Configurable server connections via config.json
Use cases of nativeMCP
Integrating local LLMs with external tools and services
Automating tasks through natural language commands
Building custom AI agents with specific toolsets
Extending the capabilities of LLMs with real-world data and actions
FAQ from nativeMCP
What is MCP?
What is MCP?
MCP stands for Model Context Protocol, a standardized protocol for AI agents to interact with tools and services.
What LLMs are supported?
What LLMs are supported?
The system supports any LLM accessible via an HTTP API, such as Ollama with models like DeepSeek or Qwen.
What are the dependencies?
What are the dependencies?
The project depends on Qt6.8, cpp-httplib, CMake, Visual Studio 2022, and optionally Ollama for local LLM deployment.
How do I add a new server?
How do I add a new server?
Create a new class that inherits from MCPServer and implements the required methods. Then, configure the host to connect to your new server in the config.json file.
Can I use this with Cursor?
Can I use this with Cursor?
Yes, the servers can be used with other MCP-compatible software like Cursor.