home / mcp / unichat mcp server
Routes MCP requests to OpenAI, MistralAI, Anthropic, xAI, Google AI, or DeepSeek via a configurable Vulkan-like MCP interface.
Configuration
View docs{
"mcpServers": {
"amidabuddha-unichat-ts-mcp-server": {
"command": "node",
"args": [
"{{/path/to}}/unichat-ts-mcp-server/build/index.js"
],
"env": {
"UNICHAT_MODEL": "YOUR_PREFERRED_MODEL_NAME",
"UNICHAT_API_KEY": "YOUR_VENDOR_API_KEY"
}
}
}
}You can run the Unichat MCP Server in TypeScript to send requests to multiple AI vendors through the MCP protocol. This server exposes a local, configurable endpoint you can connect to from an MCP client, enabling you to route prompts and manage model usage with vendor keys. It supports both STDIO and SSE transports for flexible integration.
You connect an MCP client to the Unichat MCP Server and send prompts through the MCP interface. The server exposes one tool called unichat that sends a request to Unichat with the required messages. In addition, you can leverage built-in prompts like code_review, document_code, explain_code, and code_rework to process code-related tasks. To run in your environment, start the server locally and point your MCP client at the matching STDIO or SSE transport.
You can run the server in STDIO by default. To enable SSE, pass the --sse flag when starting. When using the development flow, you will typically start the server via a local node command or via a package runner, depending on which configuration you choose.
Prerequisites: make sure you have Node.js and npm installed on your machine.
Install dependencies for the server project.
Build the server before running in production or when you want a ready-to-run bundle.
For development with automatic rebuilds, use the watch mode to rebuild on file changes.
Run evaluations with an MCP client by prefixing environment variables to the npx command to load keys for testing. This lets you exercise the evaluation flow without rebuilding between tests.
npm install
npm run build
# For development with auto-rebuild
npm run watch
# Running an eval flow (example)
OPENAI_API_KEY=your-key npx mcp-eval src/evals/evals.ts src/server.tsConfiguration and usage notes: you can run the server in STDIO mode by default or enable SSE with --sse. To run with a vendor model, provide the model name and API key through environment variables. Example values can be placed in your environment or in the MCP client’s config.
Prompts and tools available with the server include the following.
- unichat: Send a request to unichat with required messages argument. Returns a response.
- code_review prompt: Review code for best practices, potential issues, and improvements. Arguments: code (string, required).
- document_code prompt: Generate documentation for code including docstrings and comments. Arguments: code (string, required).
- explain_code prompt: Explain how a piece of code works in detail. Arguments: code (string, required).
- code_rework prompt: Apply requested changes to the provided code. Arguments: changes (string, optional), code (string, required).
Debugging: MCP servers communicate over STDIO, which can be challenging to debug directly. You can use the MCP Inspector tooling to access debugging utilities in a browser, with a URL provided by the tool. If you experience timeouts in SSE mode, adjust the inspector to point to http://localhost:3001/sse?timeout=600000.
To use with Claude Desktop, configure the MCP server by adding entries for the server in your client settings. You can run locally, or install the server globally and reference it via its built-in commands.
{
"mcpServers": {
"unichat_ts_mcp_server": {
"command": "node",
"args": [
"{{/path/to}}/unichat-ts-mcp-server/build/index.js"
],
"env": {
"UNICHAT_MODEL": "YOUR_PREFERRED_MODEL_NAME",
"UNICHAT_API_KEY": "YOUR_VENDOR_API_KEY"
}
}
}
}Example for a local run using a built package: you start the server by invoking Node with the built entry point and provide the required environment variables for the model and API key.
{
"mcpServers": {
"unichat_ts_mcp_server": {
"command": "npx",
"args": [
"-y",
"unichat-ts-mcp-server"
],
"env": {
"UNICHAT_MODEL": "YOUR_PREFERRED_MODEL_NAME",
"UNICHAT_API_KEY": "YOUR_VENDOR_API_KEY"
}
}
}
}Send a request to unichat with specified messages and receive a response.
Review code for best practices, potential issues, and improvements.
Generate documentation for code, including docstrings and comments.
Explain how a piece of code works in detail.
Apply requested changes to the provided code.