A

AI助手-MCP

允许AI代理通过模型上下文协议咨询多个大型语言模型(如Grok、Gemini、Claude、GPT-4o)以获取帮助和信息的服务器。

agent-orchestrationsearch

314 查看 · 2026-07-07 更新

简介

允许AI代理通过模型上下文协议咨询多个大型语言模型(如Grok、Gemini、Claude、GPT-4o)以获取帮助和信息的服务器。

简介

允许AI代理通过模型上下文协议咨询多个大型语言模型(如Grok、Gemini、Claude、GPT-4o)以获取帮助和信息的服务器。

AI Help AI MCP Server

This is a server based on the Model Context Protocol (MCP), allowing AI agents to request assistance or consultation from other configured large language models (LLMs) via the MCP protocol.

Features

  • Multi-Model Support: Built-in configurations for accessing multiple popular LLMs (e.g., Grok, Gemini, Claude, GPT-4o).
  • Dynamic Tool Listing: The MCP server automatically lists all available AI assistants as individual tools (e.g., ask_grok3, ask_gemini2_5pro).
  • Unified Interface: Interacts with backend AI models through a standard OpenAI-compatible API format.
  • Conversation History: Maintains a simple in-memory conversation history (last 5 rounds) to provide context for each model.
  • Environment Configuration: Configures the backend API proxy's URL and Key via environment variables.

System Requirements

  • Node.js v18.0.0 or higher

You can verify your Node.js installation with the following command:

bash node --version # Should display v18.0.0 or higher

Installation Steps

  1. Clone or download this project's code.

  2. Navigate to the project root directory.

  3. Install dependencies:

    bash npm install

  4. Build the project:

    bash npm run build

    (Note: npm install usually triggers npm run build automatically)

Configuration Instructions (Client-Side)

This MCP server itself does not read .env files. You need to configure the following environment variables in the client application that launches this MCP server (e.g., your AI chat interface or MCP management tool):

  1. API_URL: The base URL of your OpenAI-compatible API proxy server (e.g., http://localhost:3000). The server code will automatically append the /v1/chat/completions path.
  2. API_KEY: The key used to access your API proxy (e.g., sk-xxxxxxxx).

Client Configuration Example (e.g., in VS Code MCP Plugin)

In your client MCP server configuration interface (similar to the one shown in your screenshot):

  • Name: Give this server a name, such as 求助AI.
  • Description: A brief description, such as 让 AI 去求助别的 AI.
  • Type: Select Standard Input/Output (stdio).
  • Command: Enter node.
  • Arguments: Enter the absolute path to the compiled index.js file in this project. For example: 实际地址AIHelpAI-MCPuildindex.js (please modify according to your actual path).
  • Environment Variables:
    • Add API_URL, with the value being your API proxy URL (e.g., http://localhost:3000).
    • Add API_KEY, with the value being your API key (e.g., sk-xxxxxxxx).

After saving the configuration, the client should be able to start and connect to this MCP server.

Usage

After configuring and starting the server, AI agents connected to this MCP server will see a list of available tools, formatted as ask_<model_key>, for example:

  • ask_grok3
  • ask_gemini2_5pro
  • ask_claude3_7sonnet
  • ask_gpt4o

The description for each tool will explain the characteristics and strengths of the AI assistant.

When invoking a tool, you only need to provide one parameter:

  • prompt (string, required): The question or instruction you want to ask the AI assistant.

The server will use the configured API URL and Key, along with the built-in model parameters and conversation history, to make a request to the corresponding model and return the response to the caller.

Developer Tools

You can use the MCP Inspector tool to test the server (if globally installed or using npx):

bash

Ensure API_URL and API_KEY environment variables are set

npx @modelcontextprotocol/inspector build/index.js

Or, if globally installed

mcp-inspector build/index.js

License

Please refer to the license file in the project repository.

来源