MCP 9a4ffbdd

MCPAI代理

提供方 未标注

AI代理 未标注 未标注 社区 / 第三方

全面解析MCP Gemini ServerMCP Server的核心功能、安装配置和实用案例。作为顶级Model Context Protocol服务器,MCP Gemini Server能让AI助手访问实时数据、执行操作,为您提供更智能的工作体验和自动化解决方案。

一句话选型结论

按资料字段整理

MCP 9a4ffbdd 属于AI代理类 MCP 服务器,传输方式未标注,鉴权方式未标注,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类AI代理 传输方式未标注 鉴权未标注 部署方式未标注
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

AI代理
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

安装与配置

未标注 未标注
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 基础信息齐全,可以先按官方文档接入试跑。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
MCP 9a4ffbdd当前 未标注 未标注 未标注 无 2026-05-17
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

AI代理
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类AI代理本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式未标注远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

82.8 KB
来自项目仓库与上游目录的原文,未做删改

MCP Gemini Server

Table of Contents

  • Overview
  • File Uploads vs URL-Based Analysis
  • Features
  • Prerequisites
  • Installation & Setup
  • Configuration
  • Available Tools
  • Usage Examples
  • Supported Multimedia Analysis Use Cases
  • MCP Gemini Server and Gemini SDK's MCP Function Calling
  • Environment Variables
  • Security Considerations
  • Error Handling
  • Development and Testing
  • Contributing
  • Code Review Tools
  • Server Features
  • Known Issues

Overview

This project provides a dedicated MCP (Model Context Protocol) server that wraps the @google/genai SDK (v0.10.0). It exposes Google's Gemini model capabilities as standard MCP tools, allowing other LLMs (like Claude) or MCP-compatible systems to leverage Gemini's features as a backend workhorse.

This server aims to simplify integration with Gemini models by providing a consistent, tool-based interface managed via the MCP standard. It supports the latest Gemini models including gemini-1.5-pro-latest, gemini-1.5-flash, and gemini-2.5-pro models.

Important Note: This server does not support direct file uploads. Instead, it focuses on URL-based multimedia analysis for images and videos. For text-based content processing, use the standard content generation tools.

File Uploads vs URL-Based Analysis

❌ Not Supported: Direct File Uploads

This MCP Gemini Server does not support the following file upload operations:

  • Local file uploads: Cannot upload files from your local filesystem to Gemini
  • Base64 encoded files: Cannot process base64-encoded image or video data
  • Binary file data: Cannot handle raw file bytes or binary data
  • File references: Cannot process file IDs or references from uploaded content
  • Audio file uploads: Cannot upload and transcribe audio files directly

Why File Uploads Are Not Supported:
- Simplified architecture focused on URL-based processing
- Enhanced security by avoiding file handling complexities
- Reduced storage and bandwidth requirements
- Streamlined codebase maintenance

✅ Fully Supported: URL-Based Multimedia Analysis

This server fully supports analyzing multimedia content from publicly accessible URLs:

Image Analysis from URLs:
- Public image URLs: Analyze images hosted on any publicly accessible web server
- Supported formats: PNG, JPEG, WebP, HEIC, HEIF via direct URL access
- Multiple images: Process multiple image URLs in a single request
- Security validation: Automatic URL validation and security screening

YouTube Video Analysis:
- Public YouTube videos: Full analysis of any public YouTube video content
- Video understanding: Extract insights, summaries, and detailed analysis
- Educational content: Perfect for analyzing tutorials, lectures, and educational videos
- Multiple videos: Process multiple YouTube URLs (up to 10 per request with Gemini 2.5+)

Web Content Processing:
- HTML content: Analyze and extract information from web pages
- Mixed media: Combine text content with embedded images and videos
- Contextual analysis: Process URLs alongside text prompts for comprehensive analysis

Alternatives for Local Content

If you have local files to analyze:

  1. Host on a web server: Upload your files to a public web server and use the URL
  2. Use cloud storage: Upload to services like Google Drive, Dropbox, or AWS S3 with public access
  3. Use GitHub: Host images in a GitHub repository and use the raw file URLs
  4. Use image hosting services: Upload to services like Imgur, ImageBB, or similar platforms

For audio content:
- Use external transcription services (Whisper API, Google Speech-to-Text, etc.)
- Upload audio to YouTube and analyze the resulting video URL
- Use other MCP servers that specialize in audio processing

Features

  • Core Generation: Standard (gemini_generateContent) and streaming (gemini_generateContentStream) text generation with support for system instructions and cached content.
  • Function Calling: Enables Gemini models to request the execution of client-defined functions (gemini_functionCall).
  • Stateful Chat: Manages conversational context across multiple turns (gemini_startChat, gemini_sendMessage, gemini_sendFunctionResult) with support for system instructions, tools, and cached content.
  • URL-Based Multimedia Analysis: Analyze images from public URLs and YouTube videos without file uploads. Direct file uploads are not supported.
  • Caching: Create, list, retrieve, update, and delete cached content to optimize prompts with support for tools and tool configurations.
  • Image Generation: Generate images from text prompts using Gemini 2.0 Flash Experimental (gemini_generateImage) with control over resolution, number of images, and negative prompts. Also supports the latest Imagen 3.1 model for high-quality dedicated image generation with advanced style controls. Note that Gemini 2.5 models (Flash and Pro) do not currently support image generation.
  • URL Context Processing: Fetch and analyze web content directly from URLs with advanced security, caching, and content processing capabilities.
  • gemini_generateContent: Enhanced with URL context support for including web content in prompts
  • gemini_generateContentStream: Streaming generation with URL context integration
  • gemini_url_analysis: Specialized tool for advanced URL content analysis with multiple analysis types
  • MCP Client: Connect to and interact with external MCP servers.
  • mcpConnectToServer: Establishes a connection to an external MCP server.
  • mcpListServerTools: Lists available tools on a connected MCP server.
  • mcpCallServerTool: Calls a function on a connected MCP server, with an option for file output.
  • mcpDisconnectFromServer: Disconnects from an external MCP server.
  • writeToFile: Writes content directly to files within allowed directories.

Prerequisites

  • Node.js (v18 or later)
  • An API Key from Google AI Studio ().
  • Important: The Caching API is only compatible with Google AI Studio API keys and is not supported when using Vertex AI credentials. This server does not currently support Vertex AI authentication.

Installation & Setup

Installing Manually

  1. Clone/Place Project: Ensure the mcp-gemini-server project directory is accessible on your system.
  2. Install Dependencies: Navigate to the project directory in your terminal and run:bash npm install

  3. Build Project: Compile the TypeScript source code:bash npm run build

    This command uses the TypeScript compiler (tsc) and outputs the JavaScript files to the ./dist directory (as specified by outDir in tsconfig.json). The main server entry point will be dist/server.js.
    4. Generate Connection Token: Create a strong, unique connection token for secure communication between your MCP client and the server. This is a shared secret that you generate and configure on both the server and client sides.

    Generate a secure token using one of these methods:

    Option A: Using Node.js crypto (Recommended)bash node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

    Option B: Using OpenSSLbash openssl rand -hex 32

    Option C: Using PowerShell (Windows)```powershell

    ```

    Option D: Online Generator (Use with caution)
    Use a reputable password generator like 1Password or Bitwarden to generate a 64-character random string.

    Important Security Notes:
    - The token should be at least 32 characters long and contain random characters
    - Never share this token or commit it to version control
    - Use a different token for each server instance
    - Store the token securely (environment variables, secrets manager, etc.)
    - Save this token - you'll need to use the exact same value in both server and client configurations

  4. Configure MCP Client: Add the server configuration to your MCP client's settings file (e.g., cline_mcp_settings.json for Cline/VSCode, or claude_desktop_config.json for Claude Desktop App). Replace /path/to/mcp-gemini-server with the actual absolute path on your system, YOUR_API_KEY with your Google AI Studio key, and YOUR_GENERATED_CONNECTION_TOKEN with the token you generated in step 4.json { "mcpServers": { "gemini-server": { // Or your preferred name "command": "node", "args": ["/path/to/mcp-gemini-server/dist/server.js"], // Absolute path to the compiled server entry point "env": { "GOOGLE_GEMINI_API_KEY": "YOUR_API_KEY", "MCP_SERVER_HOST": "localhost", // Required: Server host "MCP_SERVER_PORT": "8080", // Required: Server port "MCP_CONNECTION_TOKEN": "YOUR_GENERATED_CONNECTION_TOKEN", // Required: Use the token from step 4 "GOOGLE_GEMINI_MODEL": "gemini-1.5-flash", // Optional: Set a default model // Optional security configurations removed - file operations no longer supported "ALLOWED_OUTPUT_PATHS": "/var/opt/mcp-gemini-server/outputs,/tmp/mcp-gemini-outputs" // Optional: Comma-separated list of allowed output directories for mcpCallServerTool and writeToFileTool }, "disabled": false, "autoApprove": [] } // ... other servers } }

    Important Notes:
    - The path in args must be the absolute path to the compiled dist/server.js file
    - MCP_SERVER_HOST, MCP_SERVER_PORT, and MCP_CONNECTION_TOKEN are required unless NODE_ENV is set to test
    - MCP_CONNECTION_TOKEN must be the exact same value you generated in step 4
    - Ensure the path exists and the server has been built using npm run build
    6. Restart MCP Client: Restart your MCP client application (e.g., VS Code with Cline extension, Claude Desktop App) to load the new server configuration. The MCP client will manage starting and stopping the server process.

Configuration

The server uses environment variables for configuration, passed via the env object in the MCP settings:

  • GOOGLE_GEMINI_API_KEY (Required): Your API key obtained from Google AI Studio.
  • GOOGLE_GEMINI_MODEL (Optional): Specifies a default Gemini model name (e.g., gemini-1.5-flash, gemini-1.0-pro). If set, tools that require a model name (like gemini_generateContent, gemini_startChat, etc.) will use this default when the modelName parameter is omitted in the tool call. This simplifies client calls when primarily using one model. If this environment variable is not set, the modelName parameter becomes required for those tools. See the Google AI documentation for available model names.
  • ALLOWED_OUTPUT_PATHS (Optional): A comma-separated list of absolute paths to directories where the mcpCallServerTool (with outputToFile parameter) and writeToFileTool are allowed to write files. If not set, file output will be disabled for these tools. This is a security measure to prevent arbitrary file writes.

Available Tools

This server provides the following MCP tools. Parameter schemas are defined using Zod for validation and description.

Validation and Error Handling: All parameters are validated using Zod schemas at both the MCP tool level and service layer, providing consistent validation, detailed error messages, and type safety. The server implements comprehensive error mapping to provide clear, actionable error messages.

Retry Logic: API requests automatically use exponential backoff retry for transient errors (network issues, rate limits, timeouts), improving reliability for unstable connections. The retry mechanism includes configurable parameters for maximum attempts, delay times, and jitter to prevent thundering herd effects.

Note on Optional Parameters: Many tools accept complex optional parameters (e.g., generationConfig, safetySettings, toolConfig, history, functionDeclarations, contents). These parameters are typically objects or arrays whose structure mirrors the types defined in the underlying @google/genai SDK (v0.10.0). For the exact structure and available fields within these complex parameters, please refer to:
1. The corresponding src/tools/*Params.ts file in this project.
2. The official Google AI JS SDK Documentation.

Core Generation

  • gemini_generateContent
  • Description: Generates non-streaming text content from a prompt with optional URL context support.
  • Required Params: prompt (string)
  • Optional Params:
    • modelName (string) - Name of the model to use
    • generationConfig (object) - Controls generation parameters like temperature, topP, etc.
    • thinkingConfig (object) - Controls model reasoning process
      • thinkingBudget (number) - Maximum tokens for reasoning (0-24576)
      • reasoningEffort (string) - Simplified control: "none" (0 tokens), "low" (1K), "medium" (8K), "high" (24K)
    • safetySettings (array) - Controls content filtering by harm category
    • systemInstruction (string or object) - System instruction to guide model behavior
    • cachedContentName (string) - Identifier for cached content to use with this request
    • urlContext (object) - Fetch and include web content from URLs
    • urls (array) - URLs to fetch and include as context (max 20)
    • fetchOptions (object) - Configuration for URL fetching
      • maxContentKb (number) - Maximum content size per URL in KB (default: 100)
      • timeoutMs (number) - Fetch timeout per URL in milliseconds (default: 10000)
      • includeMetadata (boolean) - Include URL metadata in context (default: true)
      • convertToMarkdown (boolean) - Convert HTML to markdown (default: true)
      • allowedDomains (array) - Specific domains to allow for this request
      • userAgent (string) - Custom User-Agent header for URL requests
    • modelPreferences (object) - Model selection preferences
  • Note: Can handle multimodal inputs, cached content, and URL context for comprehensive content generation
  • Thinking Budget: Controls the token budget for model reasoning. Lower values provide faster responses, higher values improve complex reasoning.
  • gemini_generateContentStream
  • Description: Generates text content via streaming using Server-Sent Events (SSE) for real-time content delivery with URL context support.
  • Required Params: prompt (string)
  • Optional Params:
    • modelName (string) - Name of the model to use
    • generationConfig (object) - Controls generation parameters like temperature, topP, etc.
    • thinkingConfig (object) - Controls model reasoning process
      • thinkingBudget (number) - Maximum tokens for reasoning (0-24576)
      • reasoningEffort (string) - Simplified control: "none" (0 tokens), "low" (1K), "medium" (8K), "high" (24K)
    • safetySettings (array) - Controls content filtering by harm category
    • systemInstruction (string or object) - System instruction to guide model behavior
    • cachedContentName (string) - Identifier for cached content to use with this request
    • urlContext (object) - Same URL context options as gemini_generateContent
    • modelPreferences (object) - Model selection preferences

Function Calling

  • gemini_functionCall
  • Description: Sends a prompt and function declarations to the model, returning either a text response or a requested function call object (as a JSON string).
  • Required Params: prompt (string), functionDeclarations (array)
  • Optional Params:
    • modelName (string) - Name of the model to use
    • generationConfig (object) - Controls generation parameters
    • safetySettings (array) - Controls content filtering
    • toolConfig (object) - Configures tool behavior like temperature and confidence thresholds

Stateful Chat

  • gemini_startChat
  • Description: Initiates a new stateful chat session and returns a unique sessionId.
  • Optional Params:
    • modelName (string) - Name of the model to use
    • history (array) - Initial conversation history
    • tools (array) - Tool definitions including function declarations
    • generationConfig (object) - Controls generation parameters
    • thinkingConfig (object) - Controls model reasoning process
      • thinkingBudget (number) - Maximum tokens for reasoning (0-24576)
      • reasoningEffort (string) - Simplified control: "none" (0 tokens), "low" (1K), "medium" (8K), "high" (24K)
    • safetySettings (array) - Controls content filtering
    • systemInstruction (string or object) - System instruction to guide model behavior
    • cachedContentName (string) - Identifier for cached content to use with this session
  • gemini_sendMessage
  • Description: Sends a message within an existing chat session.
  • Required Params: sessionId (string), message (string)
  • Optional Params:
    • generationConfig (object) - Controls generation parameters
    • thinkingConfig (object) - Controls model reasoning process
      • thinkingBudget (number) - Maximum tokens for reasoning (0-24576)
      • reasoningEffort (string) - Simplified control: "none" (0 tokens), "low" (1K), "medium" (8K), "high" (24K)
    • safetySettings (array) - Controls content filtering
    • tools (array) - Tool definitions including function declarations
    • toolConfig (object) - Configures tool behavior
    • cachedContentName (string) - Identifier for cached content to use with this message
  • gemini_sendFunctionResult
  • Description: Sends the result of a function execution back to a chat session.
  • Required Params: sessionId (string), functionResponse (string) - The result of the function execution
  • Optional Params: functionCall (object) - Reference to the original function call
  • gemini_routeMessage
  • Description: Routes a message to the most appropriate model from a provided list based on message content. Returns both the model's response and which model was selected.
  • Required Params:
    • message (string) - The text message to be routed to the most appropriate model
    • models (array) - Array of model names to consider for routing (e.g., ['gemini-1.5-flash', 'gemini-1.5-pro']). The first model in the list will be used for routing decisions.
  • Optional Params:
    • routingPrompt (string) - Custom prompt to use for routing decisions. If not provided, a default routing prompt will be used.
    • defaultModel (string) - Model to fall back to if routing fails. If not provided and routing fails, an error will be thrown.
    • generationConfig (object) - Generation configuration settings to apply to the selected model's response.
    • thinkingConfig (object) - Controls model reasoning process
      • thinkingBudget (number) - Maximum tokens for reasoning (0-24576)
      • reasoningEffort (string) - Simplified control: "none" (0 tokens), "low" (1K), "medium" (8K), "high" (24K)
    • safetySettings (array) - Safety settings to apply to both routing and final response.
    • systemInstruction (string or object) - A system instruction to guide the model's behavior after routing.

Remote File Operations (Removed)

Note: Direct file upload operations are no longer supported by this server. The server now focuses exclusively on URL-based multimedia analysis for images and videos, and text-based content generation.

Alternative Approaches:
- For Image Analysis: Use publicly accessible image URLs with gemini_generateContent or gemini_url_analysis tools
- For Video Analysis: Use publicly accessible YouTube video URLs for content analysis
- For Audio Content: Audio transcription via file uploads is not supported - consider using URL-based services that provide audio transcripts
- For Document Analysis: Use URL-based document analysis or convert documents to publicly accessible formats

Caching (Google AI Studio Key Required)

  • gemini_createCache
  • Description: Creates cached content for compatible models (e.g., gemini-1.5-flash).
  • Required Params: contents (array), model (string)
  • Optional Params:
    • displayName (string) - Human-readable name for the cached content
    • systemInstruction (string or object) - System instruction to apply to the cached content
    • ttl (string - e.g., '3600s') - Time-to-live for the cached content
    • tools (array) - Tool definitions for use with the cached content
    • toolConfig (object) - Configuration for the tools
  • gemini_listCaches
  • Description: Lists existing cached content.
  • Required Params: None
  • Optional Params: pageSize (number), pageToken (string - Note: pageToken may not be reliably returned currently).
  • gemini_getCache
  • Description: Retrieves metadata for specific cached content.
  • Required Params: cacheName (string - e.g., cachedContents/abc123xyz)
  • gemini_updateCache
  • Description: Updates metadata and contents for cached content.
  • Required Params: cacheName (string), contents (array)
  • Optional Params:
    • displayName (string) - Updated display name
    • systemInstruction (string or object) - Updated system instruction
    • ttl (string) - Updated time-to-live
    • tools (array) - Updated tool definitions
    • toolConfig (object) - Updated tool configuration
  • gemini_deleteCache
  • Description: Deletes cached content.
  • Required Params: cacheName (string - e.g., cachedContents/abc123xyz)

Image Generation

  • gemini_generateImage
  • Description: Generates images from text prompts using available image generation models.
  • Required Params: prompt (string - descriptive text prompt for image generation)
  • Optional Params:
    • modelName (string - defaults to "imagen-3.1-generate-003" for high-quality dedicated image generation or use "gemini-2.0-flash-exp-image-generation" for Gemini models)
    • resolution (string enum: "512x512", "1024x1024", "1536x1536")
    • numberOfImages (number - 1-8, default: 1)
    • safetySettings (array) - Controls content filtering for generated images
    • negativePrompt (string - features to avoid in the generated image)
    • stylePreset (string enum: "photographic", "digital-art", "cinematic", "anime", "3d-render", "oil-painting", "watercolor", "pixel-art", "sketch", "comic-book", "neon", "fantasy")
    • seed (number - integer value for reproducible generation)
    • styleStrength (number - strength of style preset, 0.0-1.0)
  • Response: Returns an array of base64-encoded images with metadata including dimensions and MIME type.
  • Notes: Image generation uses significant resources, especially at higher resolutions. Consider using smaller resolutions for faster responses and less resource usage.

Audio Transcription (Removed)

Note: Audio transcription via direct file uploads is no longer supported by this server. The server focuses on URL-based multimedia analysis for images and videos.

Alternative Approaches for Audio Content:
- YouTube Videos: Use the YouTube video analysis capabilities to analyze video content that includes audio
- External Services: Use dedicated audio transcription services and analyze their output as text content
- URL-Based Audio: If audio content is available via public URLs in supported formats, consider using external transcription services first, then analyze the resulting text

URL Content Analysis

  • gemini_url_analysis
  • Description: Advanced URL analysis tool that fetches content from web pages and performs specialized analysis tasks with comprehensive security and performance optimizations.
  • Required Params:
    • urls (array) - URLs to analyze (1-20 URLs supported)
    • analysisType (string enum) - Type of analysis to perform:
    • summary - Comprehensive content summarization
    • comparison - Multi-URL content comparison
    • extraction - Structured information extraction
    • qa - Question-based content analysis
    • sentiment - Emotional tone analysis
    • fact-check - Credibility assessment
    • content-classification - Topic and type categorization
    • readability - Accessibility and complexity analysis
    • seo-analysis - Search optimization evaluation
  • Optional Params:
    • query (string) - Specific query or instruction for the analysis
    • extractionSchema (object) - JSON schema for structured data extraction
    • questions (array) - List of specific questions to answer (for Q&A analysis)
    • compareBy (array) - Specific aspects to compare when using comparison analysis
    • outputFormat (string enum: "text", "json", "markdown", "structured") - Desired output format
    • includeMetadata (boolean) - Include URL metadata in the analysis (default: true)
    • fetchOptions (object) - Advanced URL fetching options (same as urlContext fetchOptions)
    • modelName (string) - Specific Gemini model to use (auto-selected if not specified)
  • Security Features: Multi-layer URL validation, domain restrictions, private network protection, and rate limiting
  • Performance Features: Intelligent caching, concurrent processing, and optimal model selection based on content complexity

MCP Client Tools

  • mcpConnectToServer
  • Description: Establishes a connection to an external MCP server and returns a connection ID.
  • Required Params:
    • serverId (string): A unique identifier for this server connection.
    • connectionType (string enum: "sse" | "stdio"): The transport protocol to use.
    • sseUrl (string, optional if connectionType is "stdio"): The URL for SSE connection.
    • stdioCommand (string, optional if connectionType is "sse"): The command to run for stdio connection.
    • stdioArgs (array of strings, optional): Arguments for the stdio command.
    • stdioEnv (object, optional): Environment variables for the stdio command.
  • Important: This tool returns a connectionId that must be used in subsequent calls to mcpListServerTools, mcpCallServerTool, and mcpDisconnectFromServer. This connectionId is generated internally and is different from the serverId parameter.
  • mcpListServerTools
  • Description: Lists available tools on a connected MCP server.
  • Required Params:
    • connectionId (string): The connection identifier returned by mcpConnectToServer.
  • mcpCallServerTool
  • Description: Calls a function on a connected MCP server.
  • Required Params:
    • connectionId (string): The connection identifier returned by mcpConnectToServer.
    • toolName (string): The name of the tool to call on the remote server.
    • toolArgs (object): The arguments to pass to the remote tool.
  • Optional Params:
    • outputToFile (string): If provided, the tool's output will be written to this file path. The path must be within one of the directories specified in the ALLOWED_OUTPUT_PATHS environment variable.
  • mcpDisconnectFromServer
  • Description: Disconnects from an external MCP server.
  • Required Params:
    • connectionId (string): The connection identifier returned by mcpConnectToServer.
  • writeToFile
  • Description: Writes content directly to a file.
  • Required Params:
    • filePath (string): The absolute path of the file to write to. Must be within one of the directories specified in the ALLOWED_OUTPUT_PATHS environment variable.
    • content (string): The content to write to the file.
  • Optional Params:
    • overwrite (boolean, default: false): If true, overwrite the file if it already exists. Otherwise, an error will be thrown if the file exists.

Usage Examples

Here are examples of how an MCP client (like Claude) might call these tools using the use_mcp_tool format:

Example 1: Simple Content Generation (Using Default Model)```xml
<use_mcp_tool>
<server_name>gemini-server</server_name>
<tool_name>gemini_generateContent</tool_name>
<arguments>
{
"prompt": "Write a short poem about a rubber duck."
}
</arguments>
</use_mcp_tool>


**Example 2: Content Generation (Specifying Model &amp; Config)**```xml
&lt;use_mcp_tool&gt;
  &lt;server_name&gt;gemini-server&lt;/server_name&gt;
  &lt;tool_name&gt;gemini_generateContent&lt;/tool_name&gt;
  &lt;arguments&gt;
    {
      &quot;modelName&quot;: &quot;gemini-1.0-pro&quot;,
      &quot;prompt&quot;: &quot;Explain the concept of recursion in programming.&quot;,
      &quot;generationConfig&quot;: {
        &quot;temperature&quot;: 0.7,
        &quot;maxOutputTokens&quot;: 500
      }
    }
  &lt;/arguments&gt;
&lt;/use_mcp_tool&gt;

Example 2b: Content Generation with Thinking Budget Control```xml
<use_mcp_tool>
<server_name>gemini-server</server_name>
<tool_name>gemini_generateContent</tool_name>
<arguments>
{
"modelName": "gemini-1.5-pro",
"prompt": "Solve this complex math problem: Find all values of x where 2sin(x) = x^2-x+1 in the range [0, 2π].",
"generationConfig": {
"temperature": 0.2,
"maxOutputTokens": 1000,
"thinkingConfig": {
"thinkingBudget": 8192
}
}
}
</arguments>
</use_mcp_tool>


**Example 2c: Content Generation with Simplified Reasoning Effort**```xml
&lt;use_mcp_tool&gt;
  &lt;server_name&gt;gemini-server&lt;/server_name&gt;
  &lt;tool_name&gt;gemini_generateContent&lt;/tool_name&gt;
  &lt;arguments&gt;
    {
      &quot;modelName&quot;: &quot;gemini-1.5-pro&quot;,
      &quot;prompt&quot;: &quot;Solve this complex math problem: Find all values of x where 2sin(x) = x^2-x+1 in the range [0, 2π].&quot;,

…(正文过长,页面只展示前面部分,完整内容见仓库)

常见问题

5 问
答案由本站依据条目字段整理,不引用上游原文
MCP 9a4ffbdd 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

MCP 9a4ffbdd 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

MCP 9a4ffbdd 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP 9a4ffbdd 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

MCP 9a4ffbdd 能提供哪些能力?

资料显示能力标签包括 AI服务、文件管理、AI代理。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。