Powerful Rust-based MCP framework enabling multi-AI support, tool integration, multi-server architecture, and customizable prompts
MCP ChatBot is a Rust-based, powerful framework designed to support multiple AI models and integrate various tools in a seamless manner. This server allows developers to deploy and manage AI applications with ease via the Model Context Protocol (MCP). The protocol enables coordinated communication between different AI models and external tools, providing a robust foundation for complex AI workflows.
MCP ChatBot supports Ollama (local) and OpenAI models. Users can seamlessly switch between these providers by setting up their API keys through the environment variables or configuration files. This flexibility ensures that developers can leverage either a local AI model for privacy and cost savings or an online AI service with superior processing capabilities.
The framework includes built-in support for memory operations, SQLite database interactions, and file handling. These integrations allow AI models to store and retrieve data efficiently, ensuring context awareness across sessions and servers. Developers can easily extend this functionality by registering new tools through the MCP protocol.
MCP ChatBot is designed with a modular architecture that supports running multiple specialized servers simultaneously. This feature facilitates the creation of complex systems where different components can operate independently but communicate effectively. Each server can be configured to handle specific tasks, such as natural language processing, knowledge retrieval, or data management.
The command-line interface (CLI) is user-friendly and includes features like autocomplete, history recall, and real-time feedback. This interface makes it easy for users to interact with the server, perform configurations, and manage running processes.
Server-specific system prompts can be defined through YAML configuration files. These prompts help guide the AI models in generating appropriate responses based on the context of each interaction. The ability to customize these prompts ensures that the AI’s behavior aligns with the intended use case.
MCP ChatBot employs an environment-based approach for managing API keys and other sensitive information. This strategy enhances security by keeping critical data out of the main codebase, reducing the risk of exposure due to accidental publicizing or unauthorized access.
The architecture is built around key components that interact through a standardized protocol. Here’s a breakdown:
Dynamic context switching between different AI models, context persistence across sessions, and server-specific configurations are managed through the MCP protocol. The protocol enables consistent interaction with AI providers by managing state and context fluidly.
A standardized tool interface ensures that various tools can be integrated seamlessly. This includes automatic discovery and registration of tools along with mechanisms for retrying operations when necessary. Each operation is designed to handle responses appropriately, ensuring that the data remains in its intended format.
The modular design of MCP ChatBot supports running multiple servers simultaneously. Servers register themselves and other components through the protocol, enabling them to communicate effectively. The protocol includes resource management strategies to ensure efficient use of system resources.
JSON-based message formats allow for clear communication between different components. Asynchronous operations support ensures that processes can occur in parallel without blocking user interactions. Extensive error handling and recovery mechanisms are implemented to maintain robust performance even under unexpected conditions.
Clone the Repository
git clone https://github.com/arksong/mcp-chatbot.git
cd mcp-chatbot
Build the Project
cargo build --release
Suppose you are working on a project where multiple AI models need to collaborate to achieve a specific task, such as summarizing large documents and creating an overview for stakeholders.
Initialization
Operation
Cleanup
For an application that needs to integrate with external tools, such as a chatbot system that requires storage and retrieval of user data:
Context Initialization
Data Management
Error Handling
MCP ChatBot supports compatibility with various clients such as Claude Desktop, Continue, Cursor, etc. The following table demonstrates the current client support:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
The compatibility and performance matrix outlines the supported AI models, tools, and systems that work seamlessly with MCP ChatBot.
MCP ChatBot offers advanced configuration options and security strategies:
Below is a sample of how to configure the MCP servers within your project:
{
"mcpServers": {
"ollamaServer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-ollama"],
"env": {
"API_KEY": "your_ollama_key"
}
},
"openaiServer": {
"command": "cargo run",
"args": [],
"env": {
"OPENAI_API_KEY": "your_openai_key"
}
}
}
}
Can I Switch Between AI Providers in Real-Time?
How Does MCP Handle Error Recovery During Data Operations?
Is It Possible to Use Custom Tools Outside the Protocol?
How Does MCP Ensure Data Privacy When Using Local AI Models?
What Are Some Best Practices for Configuring Prompts?
This comprehensive documentation positions MCP ChatBot as a robust solution for integrating various AI models and tools while providing developers with the necessary flexibility and security.
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions
AI Vision MCP Server offers AI-powered visual analysis, screenshots, and report generation for MCP-compatible AI assistants
Analyze search intent with MCP API for SEO insights and keyword categorization
Connects n8n workflows to MCP servers for AI tool integration and data access
Expose Chicago Public Schools data with a local MCP server accessing SQLite and LanceDB databases
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support