Local MCP Gemini Automation Engine

Local MCP Gemini Automation Engine

A local AI agent workspace that allows users to interact with simulated data files via custom slash commands and context mentions, powered by Google GenAI SDK and MCP.

Category
Visit Server

README

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 documentation

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured