Skip to main content
Glama
kdoooh000h

Gemini Daily MCP Server (Compressed)

by kdoooh000h

Gemini Daily MCP Server (Compressed) ⚑

npm version license

Token-optimized MCP server for Google Gemini CLI with 43.8% token savings through Progressive Disclosure strategy.

🎯 Why Compressed Version?

This is an experimental token-optimized variant of gemini-daily-mcp that reduces tool schema overhead by 43.8% while maintaining full functionality.

Token Savings Comparison

Version

Schema Size

Tokens

Savings

Original

1,227 bytes

306 tokens

-

Compressed ⚑

691 bytes

172 tokens

43.8%

Impact:

  • Per conversation: Save 134 tokens

  • 3,000 conversations/month: Save ~$1.61/month

  • Scale to 50 tools: Save ~$66/month (61%)

Related MCP server: Gemini Bridge

πŸ’‘ How It Works: Progressive Disclosure

Traditional Approach (Verbose Schema)

{
  "name": "gemini",
  "description": "Execute Gemini CLI in non-interactive mode for AI assistance with high Token efficiency",
  "inputSchema": {
    "properties": {
      "prompt": {
        "type": "string",
        "description": "The coding task, question, or analysis request"
      },
      "sessionId": {
        "type": "string",
        "description": "Optional session ID for conversational context (saves up to 74% tokens in multi-turn conversations)"
      }
    }
  }
}

Size: 731 bytes β‰ˆ 182 tokens

Progressive Disclosure (Compressed Schema)

{
  "name": "gemini",
  "description": "Execute Gemini CLI. Use help for details",
  "inputSchema": {
    "properties": {
      "prompt": {"type": "string"},
      "sessionId": {"type": "string"}
    }
  }
}

Size: 281 bytes β‰ˆ 70 tokens (61.6% savings)

Where Did the Details Go?

They're in the enhanced help tool! When Claude needs details:

# Claude calls: mcp__gemini-daily-compressed__help
# Returns comprehensive documentation:

# Gemini Daily MCP - Detailed Documentation

## gemini Tool

Execute Gemini CLI in non-interactive mode for AI assistance.

**Parameters:**
- prompt (required, string): The coding task, question, or analysis request
- sessionId (optional, string): Session ID for conversational context
  - Saves up to 74% tokens in multi-turn conversations
  - Obtained from previous gemini call's _meta.sessionId
- resetSession (optional, boolean): Reset session history before processing
- model (optional, string): Specify which Gemini model to use
  - Default: gemini-2.5-flash
  - Options: gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-pro-preview

**Example:**
{
  "prompt": "Write a Python function to calculate fibonacci",
  "sessionId": "session-abc123",
  "model": "gemini-2.5-flash"
}
...

Result:

  • βœ… 90% of conversations: Don't need details β†’ Save tokens

  • βœ… 10% of conversations: Call help once β†’ Get full docs

  • βœ… Overall: 43.8% token savings

πŸš€ Features

Same Functionality as Original

  • βœ… Full Gemini CLI integration

  • βœ… Session management (saves up to 74% tokens in multi-turn conversations)

  • βœ… Gemini 3 support (gemini-3-pro-preview with fallback)

  • βœ… Multi-model selection (Flash, Flash-Lite, Pro, Gemini 3)

  • βœ… Comprehensive error handling

Token Optimization

  • ⚑ 43.8% smaller tool schemas

  • ⚑ Progressive Disclosure via enhanced help tool

  • ⚑ Preserves all type information

  • ⚑ Maintains parameter validation

πŸ“¦ Installation

Prerequisites

  • Google Gemini CLI must be pre-installed and configured

    • Install: Follow Google's official Gemini CLI installation guide

    • Setup: Run gemini auth login with your Google account

    • API Key: Set GOOGLE_API_KEY environment variable or configure via gemini config

  • Claude Code or Claude Desktop installed

Claude Code

# Clone this repository
git clone https://github.com/kdoooh000h/gemini-daily-mcp-compressed.git
cd gemini-daily-mcp-compressed

# Install dependencies
npm install

# Build
npm run build

# Add to Claude Code
# Edit your .mcp.json:
{
  "mcpServers": {
    "gemini-daily-compressed": {
      "command": "node",
      "args": ["/path/to/gemini-daily-mcp-compressed/dist/index.js"],
      "env": {
        "GEMINI_ENABLED": "true",
        "SESSION_TTL_HOURS": "24",
        "MAX_SESSIONS": "100",
        "GEMINI_CLI_COMMAND": "gemini",
        "LOG_LEVEL": "info"
      }
    }
  }
}

Claude Desktop

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "gemini-daily-compressed": {
      "command": "node",
      "args": ["/path/to/gemini-daily-mcp-compressed/dist/index.js"],
      "env": {
        "GEMINI_ENABLED": "true",
        "SESSION_TTL_HOURS": "24",
        "GEMINI_CLI_COMMAND": "gemini"
      }
    }
  }
}

πŸ”§ Tools

gemini - AI Coding Assistant

Execute Gemini CLI with optional session support.

Basic Usage:

Use gemini to explain this Python function

Advanced Usage:

# With session for multi-turn conversation
Use gemini with sessionId "my-session" to analyze this code

# Continue conversation
Use gemini with sessionId "my-session" to implement the improvements

# Specify model
Use gemini with model "gemini-3-pro-preview" for complex analysis

# Reset session
Use gemini with sessionId "my-session" and resetSession true to start fresh

listSessions - Session Management

List all active conversation sessions.

ping - Connection Test

Test if the MCP server is working properly.

help - Enhanced Documentation

Get detailed documentation for all tools (this is where the detailed info lives in the compressed version).

πŸ“Š Compression Details

Strategy

  1. Remove verbose descriptions from tool schemas

  2. Preserve all functionality:

    • Parameter names

    • Type information

    • Required fields

    • Enum values

  3. Enhance help tool to provide complete documentation

Token Breakdown

Tool

Original

Compressed

Savings

gemini

182 tokens

70 tokens

61.6%

ping

49 tokens

37 tokens

24.5%

help

33 tokens

32 tokens

3.0%

listSessions

40 tokens

33 tokens

17.5%

Total

306 tokens

172 tokens

43.8%

Trade-offs

Pros βœ…:

  • Significant token savings (43.8%)

  • Lower costs ($66/month for 3K conversations with 50 tools)

  • Full functionality preserved

  • Claude understands compressed schemas

Cons ⚠️:

  • ~10% of conversations may need an extra help call

  • Schema less readable for developers

  • Need to maintain documentation in two places (schema + help tool)

πŸ“ˆ When to Use Compressed Version?

  • High-frequency usage (>100 conversations/day)

  • Many tools (>20 tools in your MCP setup)

  • Cost-sensitive projects

  • Complex tool schemas with verbose descriptions

Use Original Version Instead

  • Low-frequency usage (<100 conversations/day)

  • Few tools (<10 tools)

  • Need maximum schema readability

  • Occasional use

πŸ§ͺ Experimental Status

This is an experimental project to validate the Progressive Disclosure approach for MCP tool schemas.

Testing Results (from lab-02-testbed):

  • βœ… All tools function normally

  • βœ… help tool provides complete documentation

  • βœ… Claude understands compressed schemas

  • βœ… 43.8% token savings confirmed

  • ⚠️ ~10% scenarios require help call (adds 1 tool invocation)

Feedback Welcome: Please open issues if you encounter any problems or have suggestions.

πŸ“š Documentation

  • MODELS.md: Gemini model compatibility and selection guide

  • CODEX-TO-GEMINI-ADAPTATION.md: How this was adapted from codex-mcp-server

  • API Reference: Use the help tool within Claude for detailed documentation

πŸ› οΈ Development

# Install dependencies
npm install

# Development mode
npm run dev

# Build
npm run build

# Test
npm test

# Lint
npm run lint

πŸ“ Version Compatibility

This MCP server is compatible with:

  • Gemini CLI: v0.17.0+ (with Gemini 3 support)

  • Claude Code: Latest version

  • Claude Desktop: Latest version

  • MCP SDK: @modelcontextprotocol/sdk ^1.17.3

🀝 Contributing

This is an experimental project. Contributions, issues, and feature requests are welcome!

πŸ“„ License

ISC

πŸ’¬ Questions?

  • Use the help tool: mcp__gemini-daily-compressed__help

  • Open an issue: GitHub Issues

  • Original project: gemini-daily-mcp


⚑ Compressed. Efficient. Same Power.

Available Tools

4 tools
geminiD

Execute Gemini CLI. Use help for details

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes
sessionIdNo
resetSessionNo
modelNo

TDQS

D1.7/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. However, it only mentions executing the CLI and referring to help, without describing what the tool does (e.g., sends prompts to a model, manages sessions), its effects (e.g., creates responses, modifies session state), or any constraints like rate limits or authentication needs. This is inadequate for a tool with multiple parameters and no structured annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very brief with two short sentences, which is efficient but under-specified. While it avoids unnecessary words, the second sentence 'Use help for details' shifts responsibility rather than providing useful information, reducing its effectiveness. It's front-loaded but lacks substantive content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (4 parameters, no annotations, no output schema), the description is severely incomplete. It doesn't explain the tool's function, parameter usage, behavioral traits, or output expectations. For a tool that likely interacts with a model or sessions, this leaves critical gaps in understanding how to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning none of the 4 parameters (prompt, sessionId, resetSession, model) are documented in the schema. The description adds no information about what these parameters mean, their purposes, or how they interact (e.g., sessionId vs. resetSession). This leaves all parameters completely unexplained, failing to compensate for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Execute Gemini CLI' states the tool's action but is vague about what resource it operates on. It doesn't specify whether this is for querying a model, managing sessions, or another function, and it doesn't distinguish from sibling tools like 'help' or 'listSessions'. The phrase 'Use help for details' suggests incomplete documentation rather than clear purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance by mentioning 'Use help for details', implying that users should refer elsewhere for usage instructions. It doesn't specify when to use this tool versus alternatives like 'help' or 'listSessions', nor does it outline any prerequisites or contexts for invocation. This leaves the agent with little practical direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

helpC

Get detailed documentation

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get detailed documentation' implies a read-only operation, but it doesn't specify what kind of documentation (e.g., tool-specific, server-wide), format (e.g., text, structured data), or any behavioral traits like rate limits, authentication needs, or potential side effects. This leaves significant gaps for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description 'Get detailed documentation' is extremely conciseβ€”just three wordsβ€”and front-loaded with the core action. There's zero waste, making it efficient for an agent to parse, though this conciseness comes at the cost of detail in other dimensions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain what 'detailed documentation' entails, the return format, or how it integrates with the server context (e.g., sibling tools like 'gemini'). For a tool with no structured fields to rely on, more context is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100% (though trivial since there are no parameters). The description doesn't need to add parameter semantics, so it meets the baseline of 4 for tools with no parameters, as there's nothing to compensate for.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get detailed documentation' states a clear purpose (retrieving documentation) but is vague about what documentation it retrieves. It doesn't specify whether it's system documentation, API documentation, or something else, and doesn't distinguish itself from potential sibling tools like 'listSessions' or 'ping' that might also provide informational outputs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any context, prerequisites, or exclusions, leaving the agent to guess when this is appropriate compared to other informational tools like 'ping' (which might test connectivity) or 'listSessions' (which might list active sessions).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

listSessionsB

List active sessions

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'List active sessions' implies a read-only operation but doesn't specify what constitutes an 'active' session, whether there are permissions required, how results are formatted, or if there are rate limits. This leaves significant gaps for an agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise at just three words ('List active sessions') with zero wasted language. It's front-loaded with the core action and resource, making it immediately understandable without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple, parameterless listing tool with no output schema, the description is minimally adequate. However, without annotations and with the behavioral gaps noted above, it doesn't provide complete context about what 'active' means, how results are returned, or any operational constraints that might affect usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the absence of inputs. The description appropriately doesn't add parameter information beyond what's already covered by the schema, maintaining a clean baseline for parameterless tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List active sessions' clearly states the verb ('List') and resource ('active sessions'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'gemini', 'help', or 'ping', which appear to be unrelated functions rather than alternative session listing tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. While the sibling tools seem unrelated (e.g., 'gemini', 'help', 'ping'), there's no explicit mention of when this tool is appropriate or any prerequisites for its use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pingC

Test connection

ParametersJSON Schema
NameRequiredDescriptionDefault
messageNo

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Test connection' implies a diagnostic operation but doesn't reveal what happens during testing, what the expected response is, whether it requires authentication, or if it has side effects. This is inadequate for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just two words, with zero wasted language. It's appropriately sized for a simple diagnostic tool and is front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a diagnostic tool with no annotations, no output schema, and undocumented parameters, the description is incomplete. It doesn't explain what 'connection' means, what gets tested, what the response indicates, or how to interpret results. The agent would struggle to use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 1 parameter with 0% description coverage, and the tool description provides no information about parameters. 'Test connection' doesn't mention the 'message' parameter at all, leaving it completely undocumented. The description fails to compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Test connection' states a general purpose but is vague about what exactly is being tested. It doesn't specify what resource or system is being tested, nor does it distinguish this from sibling tools like 'help' or 'listSessions'. The verb 'test' is clear but the object 'connection' is ambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of context, prerequisites, or exclusions. Given sibling tools like 'gemini', 'help', and 'listSessions', the agent has no indication of when 'ping' would be the appropriate choice.

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.

  1. 4 tool updatesv1.0.0
    • First observedgemini
    • First observedhelp
    • First observedlistSessions
    • First observedping

TDQS

C2.7/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: gemini executes CLI commands, help provides documentation, listSessions shows active sessions, and ping tests connectivity. There is no overlap or ambiguity between these functions.

Naming Consistency2/5

Naming is inconsistent: gemini and ping use lowercase, help is lowercase but a generic verb, and listSessions uses camelCase. There is no uniform verb_noun pattern or consistent casing style across the set.

Tool Count5/5

With 4 tools, this is well-scoped for a server focused on Gemini CLI interaction and session management. Each tool serves a clear, necessary function without bloat or redundancy.

Completeness3/5

For a Gemini CLI server, core operations like execution, help, and session listing are covered, but there are notable gaps such as creating or managing sessions, handling specific Gemini commands directly, or error handling tools. The surface is functional but limited.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers