- Home
- MCP servers
- Unichat
Unichat
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mcp-mirror-amidabuddha_unichat-mcp-server": {
"command": "uv",
"args": [
"--directory",
"{{your source code local directory}}/unichat-mcp-server",
"run",
"unichat-mcp-server"
],
"env": {
"UNICHAT_MODEL": "SELECTED_UNICHAT_MODEL",
"UNICHAT_API_KEY": "YOUR_UNICHAT_API_KEY"
}
}
}
}You can run the Unichat MCP Server to connect to OpenAI and other AI vendors through the MCP protocol. It exposes a single tool to send conversations and supports predefined prompts to review, document, explain, or rework code. This server is available in Python and can be run locally or deployed to respond to MCP client requests with a consistent interface.
How to use
Start the server in stdio mode and connect an MCP client to send messages to the unichat tool. Use the predefined prompts to perform actions like code reviews, documentation generation, explanations, and code reworks. The server expects a model and API key for the chosen vendor, supplied via environment variables. When running, you will receive structured responses that you can surface in your application or tooling.
How to install
Prerequisites: you need a runtime that supports MCP servers (the runtime in this case is provided by the tooling used for MCP servers). You should have a directory containing the server source code and the runtime available in your environment.
Additional configuration and notes
The server configuration supports two MCP endpoints in stdio mode for development and production publishing. Each endpoint runs as a separate stdio process and uses environment variables to supply the selected model and your vendor API key.
{
"mcpServers": {
"unichat_mcp_dev": {
"command": "uv",
"args": [
"--directory",
"{{your source code local directory}}/unichat-mcp-server",
"run",
"unichat-mcp-server"
],
"env": {
"UNICHAT_MODEL": "SELECTED_UNICHAT_MODEL",
"UNICHAT_API_KEY": "YOUR_UNICHAT_API_KEY"
}
},
"unichat_mcp_pub": {
"command": "uvx",
"args": [
"unichat-mcp-server"
],
"env": {
"UNICHAT_MODEL": "SELECTED_UNICHAT_MODEL",
"UNICHAT_API_KEY": "YOUR_UNICHAT_API_KEY"
}
}
}
}
Notes on tools and prompts
The MCP server exposes a single tool named unichat that sends a request to Unichat. It supports the following prompts to operate on code and text:
Prompts and tools
code_reviewReview code for best practices, potential issues, and improvements. Arguments:code(string, required). The prompt analyzes the code and returns actionable recommendations.
document_codeGenerate documentation for code including docstrings and comments. Arguments:code(string, required). The prompt returns structured documentation.
Available tools
unichat
Send a request to Unichat via the MCP tool and receive a response
code_review
Review code for best practices, potential issues, and improvements
document_code
Generate documentation for code including docstrings and comments
explain_code
Explain how a piece of code works in detail
code_rework
Apply requested changes to the provided code