MCP-Gemini-Server provides a robust interface to Google's Gemini AI models through a collection of specialized tools. Built with TypeScript and the Model Context Protocol SDK, it enables AI assistants to leverage Gemini's capabilities including content generation, chat functionality, function calling, and file/cache management. The server implements both streaming and non-streaming content generation, supports stateful chat sessions with function execution, and offers comprehensive file and cache operations for optimizing performance. This implementation stands out by providing fine-grained control over generation parameters, safety settings, and tool configurations while handling error cases gracefully. It's particularly valuable for developers building AI applications that need direct access to Gemini's advanced features through a standardized protocol.
No reviews yet. Be the first to review!
Sign in to join the conversation
Generates non-streaming text content from a prompt with optional URL context support. Required Params: prompt (string).
Generates text content via streaming using Server-Sent Events (SSE) for real-time content delivery with URL context support. Required Params: prompt (string).
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).
Initiates a new stateful chat session and returns a unique sessionId. Optional Params: modelName (string), history (array), tools (array), generationConfig (object).
Sends a message within an existing chat session. Required Params: sessionId (string), message (string).
Sends the result of a function execution back to a chat session. Required Params: sessionId (string), functionResponse (string).
Routes a message to the most appropriate model from a provided list based on message content. Required Params: message (string), models (array).
Creates cached content for compatible models. Required Params: contents (array), model (string).
Lists existing cached content. Required Params: None.
Retrieves metadata for specific cached content. Required Params: cacheName (string).
Updates metadata and contents for cached content. Required Params: cacheName (string), contents (array).
Deletes cached content. Required Params: cacheName (string).
Generates images from text prompts using available image generation models. Required Params: prompt (string).
Advanced URL analysis tool that fetches content from web pages and performs specialized analysis tasks. Required Params: urls (array).
Establishes a connection to an external MCP server and returns a connection ID. Required Params: serverId (string), connectionType (string enum).
Lists available tools on a connected MCP server. Required Params: connectionId (string).
Calls a function on a connected MCP server. Required Params: connectionId (string), toolName (string), toolArgs (object).
Disconnects from an external MCP server. Required Params: connectionId (string).
Writes content directly to a file. Required Params: filePath (string), content (string).