Get the FREE Ultimate OpenClaw Setup Guide →

unichat-ts

MCP server from amidabuddha/unichat-ts-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio amidabuddha-unichat-ts-mcp-server node {{/path/to}}/unichat-ts-mcp-server/build/index.js \
  --env UNICHAT_MODEL="YOUR_PREFERRED_MODEL_NAME" \
  --env UNICHAT_API_KEY="YOUR_VENDOR_API_KEY"

How to use

Unichat MCP Server in TypeScript exposes a single tool called unichat. This tool forwards user messages to vendor AI APIs (such as OpenAI, MistralAI, Anthropic, xAI, Google AI, or DeepSeek) via the MCP protocol and returns the model's response. The server supports both STDIO and server-sent events (SSE) transports, configurable via command-line arguments. To run locally, start the MCP server and connect to it using an MCP client. The example configuration shows the expected environment keys you must provide to authorize calls to the vendor APIs, including UNICHAT_MODEL (the model you want to query) and UNICHAT_API_KEY (your vendor API key). The server also provides a set of predefined prompts for code-related tasks, such as code_review, document_code, explain_code, and code_rework, which you can invoke via the MCP client to receive structured outputs. You can run evals using the included mcp-eval setup, which allows you to load environment variables and execute the server through npx.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Access to a vendor API key for the models you intend to use

Install:

  1. Install dependencies
npm install
  1. Build the server (produces build/index.js)
npm run build
  1. (Optional for development) Enable auto-rebuild on file changes
npm run watch

Run with environment variables (example):

OPENAI_API_KEY=your-key npx -y unichat-ts-mcp-server --stdio

If you want to run a compiled local file directly:

node build/index.js

To run with SSE instead of STDIO:

npx -y unichat-ts-mcp-server --sse

For integration with Claude Desktop or other clients, configure the MCP server in your client’s config with the appropriate command and args as shown in the README.

Additional notes

Tips and notes:

  • The MCP server authenticates via vendor API keys; ensure UNICHAT_MODEL and UNICHAT_API_KEY are set in the environment when starting the server.
  • The server supports both STDIO and SSE transports; choose --stdio for STDIO or --sse for SSE usage.
  • If you experience timeouts in SSE mode, adjust the inspector’s timeout setting to a higher value (e.g., http://localhost:3001/sse?timeout=600000).
  • The repository provides predefined prompts (code_review, document_code, explain_code, code_rework) that can be invoked via the MCP client to generate targeted outputs.
  • When using in production, prefer setting the UNICHAT_MODEL to a supported model name from the models.ts list and ensure the corresponding API key has the required permissions.
  • If you’re debugging, use the MCP Inspector for easier tracing of requests and responses.

Related MCP Servers

Sponsor this space

Reach thousands of developers