AU

amidabuddha/unichat-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

40 stars 10 forks 质量 64 趋势 14MIT

amidabuddha/unichat-mcp-server 是从 https://github.com/amidabuddha/unichat-mcp-server. 导入的 MCP 服务器候选

概览

amidabuddha/unichat-mcp-server 是从 https://github.com/amidabuddha/unichat-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

TypeScript 版本也可用

通过工具或预定义提示,使用 MCP 协议向 OpenAI、Anthropic 和兼容 OpenAI 的提供者发送请求。对于兼容 OpenAI、如 MistralAI、xAI、Google AI、DeepSeek、阿里巴巴或 Inception,将 UNICHAT_BASE_URL 设置为该提供者的兼容 API 端点。 需要供应商API密钥

工具

服务器实现了一个工具:

  • unichat:向 unichat 发送请求
  • 将“消息”作为必要的字符串参数
  • 返回响应

提示

  • code_review
  • 审查代码的最佳实践、潜在问题和改进
  • 论点:
  • code(字符串,必需):用于审查的代码”
  • document_code
  • 生成包含文档字符串和注释的代码文档
  • 论点:
  • code(字符串,必需):注释代码”
  • explain_code
  • 详细解释一段代码的工作原理
  • 论点:
  • code(字符串,必需):用于解释的代码”
  • code_rework
  • 对所提供的代码应用请求的更改
  • 论点:
  • changes(字符串,可选):应用的更改”
  • code(字符串,必需):重做代码”

快速开始

安装

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Unichat MCP Server in Python

Also available in TypeScript

Send requests to OpenAI, Anthropic, and OpenAI-compatible providers using MCP protocol via tool or predefined prompts. For OpenAI-compatible providers such as MistralAI, xAI, Google AI, DeepSeek, Alibaba, or Inception, set UNICHAT_BASE_URL to the provider’s compatible API endpoint. Vendor API key required

Tools

The server implements one tool:

  • unichat: Send a request to unichat
    • Takes “messages” as required string arguments
    • Returns a response

Prompts

  • code_review
    • Review code for best practices, potential issues, and improvements
    • Arguments:
      • code (string, required): The code to review"
  • document_code
    • Generate documentation for code including docstrings and comments
    • Arguments:
      • code (string, required): The code to comment"
  • explain_code
    • Explain how a piece of code works in detail
    • Arguments:
      • code (string, required): The code to explain"
  • code_rework
    • Apply requested changes to the provided code
    • Arguments:
      • changes (string, optional): The changes to apply"
      • code (string, required): The code to rework"

Quickstart

Install

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

Supported Models:

A list of currently supported models to be used as "SELECTED_UNICHAT_MODEL" may be found here. Please make sure to add the relevant vendor API key as "YOUR_UNICHAT_API_KEY"

Example:

"env": {
  "UNICHAT_MODEL": "gpt-5.4-mini",
  "UNICHAT_API_KEY": "YOUR_OPENAI_API_KEY"
}

For OpenAI-compatible providers with custom endpoints:

"env": {
  "UNICHAT_MODEL": "PROVIDER_MODEL",
在 GitHub 查看完整 README

安装

uvx unichat-mcp-server
新手?先看 mcpskill.org 教程 →

配置

"mcpServers": { "unichat-mcp-server": { "command": "uv", "args": [ "--directory", "{{your source code local directory}}/unichat-mcp-server", "run", "--locked", "unichat-mcp-server" ], "env": { "UNICHAT_MODEL": "SELECTED_UNICHAT_MODEL", "UNICHAT_API_KEY": "YOUR_UNICHAT_API_KEY" } } }