About MCP Chat Bot (Golang Version)
MCP Chat Bot (Golang Version) is a web chat bot built with Go and Gin. It communicates with AI models through MCP and tracks conversation history.
Key features
- 01Web chat interface
- 02Communicate with AI models via MCP
- 03Track conversation history
- 04Server implemented with Go and Gin
Use cases
- 01Chat with AI models in a browser
- 02Keep a record of chat history
MCP support
The bot communicates with AI models through MCP. The README does not specify capabilities exposed to MCP clients.
Details
From the project READMEMCP Chat Bot (Golang Version)
This is a chat bot project implemented using Golang and the Gin framework, integrating various AI models through the Model Context Protocol (MCP).
Features
- Simple web chat interface
- Communication with various AI models using the MCP protocol
- Conversation history tracking
- Efficient server implementation using Golang and Gin framework
Installation Steps
-
Clone this repository
git clone https://github.com/yourusername/mcp-chat-bot.git cd mcp-chat-bot -
Install dependencies
go mod download -
Create a
.envfile and set your MCP API keyMCP_API_KEY=your_api_key_here PORT=8080 -
Compile and start the server
go build -o mcp-chat-bot ./mcp-chat-bot -
Open
http://localhost:8080in your browser to start chatting
Project Structure
main.go- Gin server and MCP integrationpublic/index.html- Chat interfacego.mod- Go module dependencies
Customization
You can modify the Model parameter in the main.go file to use different AI models:
mcpReq := MCPRequest{
Model: "gpt-4", // Change to your preferred model
Messages: context,
MaxTokens: 1000,
}
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.