MCP.so
登录

MCP Gemini Server

@MCP-Mirror

基本信息

分类

AI 与智能体

传输方式

stdio

作者

MCP-Mirror

关于 MCP Gemini Server

Mirror of

MCP Gemini Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "bsmi021_mcp-gemini-server": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli",
        "install",
        "@bsmi021/mcp-gemini-server",
        "--client",
        "claude"
      ]
    }
  }
}

MCP Gemini Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。

概览

What is MCP Gemini Server?

This server wraps the @google/genai SDK, exposing Google Gemini model capabilities as standard MCP tools. It allows other LLMs (like Cline) or MCP-compatible systems to leverage Gemini’s text generation, function calling, chat, file handling, and caching features.

How to use MCP Gemini Server?

Install via Smithery (npx -y @smithery/cli install @bsmi021/mcp-gemini-server) or manually (clone, npm install, npm run build). Configure your MCP client’s settings with the server’s path and required environment variables (GOOGLE_GEMINI_API_KEY, optionally GOOGLE_GEMINI_MODEL). Restart the client after configuration.

Key features of MCP Gemini Server

  • Standard and streaming text generation (gemini_generateContent, gemini_generateContentStream)
  • Function calling that lets Gemini request client-defined functions
  • Stateful chat sessions with history management
  • File upload, list, retrieve, and delete operations
  • Cache content creation, listing, retrieval, update, and deletion

Use cases of MCP Gemini Server

  • Integrate Gemini text generation into MCP-compatible assistants (e.g., Cline)
  • Enable function calling workflows where Gemini invokes external tools
  • Build conversational agents that maintain context across multiple turns
  • Upload and manage files (images, documents) for multimodal prompts
  • Optimize repeated prompt patterns with server-side content caching

常见问题

1

What runtime is required?

Node.js version 18 or later.

2

Where do I get an API key?

An API key from Google AI Studio ([https://aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey)).

3

Can I use Vertex AI authentication?

No. The server only supports Google AI Studio API keys; file handling and caching features are not compatible with Vertex AI credentials.

4

How do I set a default Gemini model?

Set the `GOOGLE_GEMINI_MODEL` environment variable (e.g., `gemini-1.5-flash`). If not set, the `modelName` parameter becomes required on applicable tool calls.

5

What error types does the server return?

Errors are returned as `McpError` objects with an error code (`InvalidParams`, `InternalError`, etc.), a message, and optional details for troubleshooting (e.g., safety block reasons).

评论

AI 与智能体 分类下的更多 MCP 服务器