- Home
- MCP servers
- Unichat
Unichat
- python
37
GitHub Stars
python
Language
6 months ago
First Indexed
2 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": {
"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 run a Python-based MCP server that exposes a single tool, unichat, to send requests to large language models and AI services via the MCP protocol. This server is designed to be started locally or wired up behind an MCP client, enabling you to interact with models such as OpenAI, MistralAI, and others through a consistent, scriptable interface.
How to use
You connect to the Unichat MCP server from your MCP client to send messages to the unichat tool. The server exposes a single tool named unichat that takes messages as input and returns a response. You can use this to compose prompts, chain messages, and receive model-generated outputs in a structured MCP workflow. When you configure your MCP client, point it at the MCP server entry and call the unichat tool with the required messages argument. Ensure you have a valid API key for the target vendors and select the appropriate model for your use case.
How to install
Prerequisites you need before installation:
-
Node.js and npm or uvx/uv, depending on how you plan to run the MCP server.
-
A vendor API key configured for the Unichat tool. Keep your key secure and do not share it in public files.
Additional configuration
{
"mcpServers": {
"unichat_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_prod": {
"command": "uvx",
"args": [
"unichat-mcp-server"
],
"env": {
"UNICHAT_MODEL": "SELECTED_UNICHAT_MODEL",
"UNICHAT_API_KEY": "YOUR_UNICHAT_API_KEY"
}
}
}
}
Notes on tooling and prompts
The server includes a set of prompts designed for code understanding and documentation tasks. These prompts enable you to review code for best practices, generate documentation with docstrings, explain how code works in detail, and rework code based on requested changes.
Troubleshooting
If you encounter issues starting the MCP server, check that your environment variables are set correctly and that the path to the local source directory exists. Use the MCP Inspector during debugging to inspect the stdio communication between the client and server and to view the live start URL.
Security and best practices
Keep your API keys secure by storing them in environment variables, not in code. Restrict access to the MCP server to trusted clients and consider rotating keys periodically. Monitor usage to detect unusual activity and set appropriate quotas if your MCP client supports them.
Examples and usage notes
You can configure and start development and production instances as shown in the configuration snippet above. The development setup uses a local directory for the server, while the production setup runs through the published MCP server binary. Always ensure you are using the correct model and key for your environment.
Available tools
unichat
Send a request to unichat with the required messages argument and receive a response.
code_review
Review code for best practices, potential issues, and improvements. Arguments: code (string, required).
document_code
Generate documentation for code including docstrings and comments. Arguments: code (string, required).
explain_code
Explain how a piece of code works in detail. Arguments: code (string, required).
code_rework
Apply requested changes to the provided code. Arguments: changes (string, optional), code (string, required).