Local MCP Gemini Automation Engine
Provides tools for invoking Google's Gemini AI models to read, reformat, and manipulate local data files autonomously via tool chains, using the Google GenAI SDK.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Local MCP Gemini Automation Engine/format report.pdf"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Local MCP Gemini Automation Engine
A highly responsive, production-grade local AI agent workspace built on Anthropics' Model Context Protocol (MCP) and powered by the modern Google GenAI SDK.
This system intercepts custom markdown slash commands (/format) and relative resource targeting context syntax (@) directly from an asynchronous terminal user interface thread to read, reformat, and manipulate local simulated data files autonomously via background tool chains.
š ļø System Architecture
The application is engineered using a decoupled, four-phase micro-process architecture to maximize scalability and isolate runtime concerns:
[Your Terminal UI Input] āā> Catch / or @ Shortcuts (cli.py)
ā
ā¼
[Orchestration Engine] āā> Intercepts Prompt Template History (cli_chat.py)
ā
ā¼
[Gemini Cloud Engine] āā> Reads context and returns autonomous Tool Action requests (gemini.py)
ā
ā¼
[Tool Schema Router] āā> Maps parameters and selects correct target pipeline (tools.py)
ā
ā¼
[MCP Process Gateway] āā> Streams arguments through background OS text pipes (mcp_client.py)
ā
ā¼
[Local Secure Server] āā> Edits or Reads your local memory data blocks securely (mcp_server.py)
Phase 1: Core Infrastructure (core/gemini.py, mcp_server.py) ā Houses the authenticated cloud AI client wrapper and a standalone local micro-server running over system standard input/output (stdio) channels.
⢠Phase 2: Gateway Clients (mcp_client.py, core/tools.py) ā Establishes the background subprocess connection pipelines and translates local tool schema models into JSON configurations the AI natively understands.
⢠Phase 3: Orchestration Brain (core/chat.py, core/cli_chat.py) ā Handles conversational persistence, monitors tool calling queues, pre-seeds custom structural histories, and parses page-relative targets.
⢠Phase 4: Interface Shell (core/cli.py, main.py) ā Drives the asynchronous user interface buffer loops, keybindings, and reactive dropdown autocompletion filters.
š Getting Started
Prerequisites
⢠Python 3.10+
⢠uv (Fast Python package installer and resolver)
⢠A Google AI Studio API Key
Installation & Configuration
1. Clone this repository to your local machine:
git clone [https://github.com/YOUR_USERNAME/local-mcp-gemini-cli.git](https://github.com/YOUR_USERNAME/local-mcp-gemini-cli.git)
cd cli_project
2. Create a local environment configuration file named .env in the root directory:
GEMINI_API_KEY=your_actual_google_ai_studio_key_here
GEMINI_MODEL=gemini-2.5-flash
USE_UV=1
(Note: The .env file is explicitly protected via .gitignore and will never be tracked or exposed via public source control.)
3. Launch the application environment thread using uv:
uv run --active main.py
š» Usage & Interactivity
Once the active application loop boots up, you can interact with the system via standard messaging or structural shortcuts:
⢠Standard Context Mentioning (@): Type an @ symbol anywhere in your prompt line to dynamically open an autocompletion menu containing all exposed server documents. Selecting a file injects its text content straight into the background query layout context.
⢠Slash Automation Command (/format): Type /format (e.g., /format report.pdf) to fetch pre-baked prompt instructions from the server. The client intercepts the turn, spins up a dedicated history thread, reads the file via background tools, converts it to clean markdown layout structures, and saves it directly back to the mock vault without any verbose text filler.
šļø Project Directory Structure
cli_project/
āāā core/
ā āāā cli.py # Terminal user interface buffer & keybind loops
ā āāā cli_chat.py # Command interceptors & history translation engines
ā āāā chat.py # Core chat loop & automated tool execution wheels
ā āāā tools.py # JSON schema translators and route selectors
ā āāā gemini.py # Stateless model wrappers & payload serializers
āāā main.py # Master context stack bootloader & orchestrator
āāā mcp_client.py # Background stdio process management client
āāā mcp_server.py # FastMCP tool, resource, and prompt provider
āāā .gitignore # Secret file shield exclusions
āāā .env # Private configurations (Local only)
āāā README.md # Project blueprint documentationAvailable Tools
2 toolsmcp_edit_documentA
Overwrites or updates a document's total content with new text.
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | The ID of the document to edit. | |
| content | Yes | The full, updated content to write into the document. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of disclosure. It clearly states that the operation overwrites the total content, which is a key behavioral trait. However, it does not mention prerequisites (e.g., document must exist), reversibility, permissions, or error behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded and to the point. It does not waste words, though 'overwrites or updates' is slightly redundant; 'overwrites' alone would be more direct. Overall, it is concise and readable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter mutation tool, the description conveys the core effect (full content replacement), but lacks information about return values, error conditions, and whether the document must already exist. Since there is no output schema, the description should have provided some of this context to be fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for both parameters, so the schema already describes doc_id and content adequately. The description adds no additional parameter semantics beyond the schema; it repeats the notion of 'total content' which matches the content parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('overwrites or updates') and identifies the resource ('a document's total content'), making it clear this is a write operation. It distinguishes from the sibling tool mcp_read_document by focusing on modification rather than reading.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage (to modify a document's content) but does not explicitly state when to use this over mcp_read_document or mention any exclusions. The sibling tool name provides context, but the description itself offers no direct guidance on selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mcp_read_documentB
Reads a document and returns its contents.
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | The ID of the document to read. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. The verb 'reads' implies non-destructive behavior, but the description does not explicitly state that it is read-only, nor does it mention error handling, permissions, or output formatting. This leaves significant behavioral ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no filler words. It is front-loaded with the action and outcome, making it easy to scan. No unnecessary information is present.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no annotations and no output schema, the description should clarify what 'contents' means (e.g., plain text, JSON) and what happens for invalid doc_id. These gaps leave the agent uncertain about the return format and error conditions, making the description incomplete for a reliable invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter, doc_id, is fully documented in the schema with a clear description ('The ID of the document to read'). The tool description does not add any extra meaning beyond referring to the document, which meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('reads') and resource ('document'), and states the outcome ('returns its contents'). This clearly distinguishes it from the sibling tool mcp_edit_document, which is for modifications.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving document contents, but it does not explicitly state when to prefer this over mcp_edit_document or any exclusion criteria. No alternatives are mentioned, so the agent must infer from the sibling name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v0.1.0- First observed
mcp_edit_document - First observed
mcp_read_document
TDQS
The two tools have clearly distinct purposes: one reads documents and the other edits/overwrites them. There is no overlap or ambiguity in their intended actions.
Both tool names follow a consistent verb_noun pattern with a common 'mcp_' prefix: mcp_read_document and mcp_edit_document. Naming is uniform and predictable.
With only 2 tools, the set is on the thin side for a server named 'Gemini Automation Engine.' While the tools are focused, the count feels minimal and may not justify a broader automation scope.
The domain appears to be document management, but the surface only covers reading and editing. Missing operations like create, delete, or list documents represent significant gaps that would hinder agents from performing basic lifecycle tasks.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The back-office workspace for your team's AIs: tasks, knowledge and context shared over MCP.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
Securely search and manage workspace context files for AI agents and teams.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI agents to interact with Google Workspace services including Drive, Docs, and Sheets through natural language commands.8MIT
- AlicenseNot gradedqualityCmaintenanceA robust, generic Model Context Protocol (MCP) Server that integrates AI agents with Google Workspace, enabling them to interact with Gmail and Google Docs.39MIT
- FlicenseNot gradedqualityAmaintenanceTurns local project directories into persistent MCP workspaces, allowing AI agents to read files, modify code, run commands, manage Git, and save session progress across conversations.-
- FlicenseNot gradedqualityBmaintenanceA single-file MCP server that turns any folder into a workspace for AI agents, enabling file operations, code search, shell commands, background jobs, HTTP testing, headless browsing, PDF extraction, and screen capture.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/RohitCds/local-mcp-gemini-cli'
If you have feedback or need assistance with the MCP directory API, please join our Discord server