Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问clear审计提醒

gemini-mcpGemini MCP 搜索

Agent Skill

gemini-mcp 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

465

周安装

19

GitHub Stars

9

下载量

150
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gemini-mcp(Gemini MCP 搜索)
来源仓库:https://github.com/adaptationio/skrillz
仓库路径:skills/gemini-mcp
安装命令:
npx skills add https://github.com/adaptationio/skrillz --skill gemini-mcp
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/adaptationio/skrillz --skill gemini-mcp

简介

用于查找、检索和筛选相关信息。gemini-mcp 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合根据关键词快速定位候选结果或来源线索。
  • 通过 GitHub 安装,建议确认搜索范围和结果过滤方式。
  • 可能触发联网请求,需评估数据源可靠性和更新频率。
  • 适用于 Codex、Claude、Cursor 和 Gemini CLI 研究场景。

SKILL.md

Gemini MCP Server Management

Comprehensive MCP (Model Context Protocol) server integration for extending Gemini CLI with custom tools and capabilities.

What is MCP?

MCP (Model Context Protocol) allows Gemini to connect to external servers that provide additional tools and capabilities:

  • Database connections
  • API integrations
  • Custom business logic
  • Enterprise systems
  • Specialized tools

Quick Start

List MCP Servers

# View configured servers
gemini mcp list

# Check server status
gemini -i
/mcp

# Test server connection
gemini mcp test <server-name>

Add MCP Server

# Interactive setup
gemini mcp add

# Manual configuration
gemini mcp add \
  --name "my-server" \
  --command "python" \
  --args "-m my_mcp_server" \
  --cwd "./mcp-servers/"

Remove Server

gemini mcp remove <server-name>

MCP Configuration

Configuration File

// ~/.gemini/mcp-servers.json or ./.gemini/mcp-servers.json
{
  "mcpServers": {
    "database-tools": {
      "command": "python",
      "args": ["-m", "database_mcp_server"],
      "cwd": "./mcp-tools/database",
      "env": {
        "DATABASE_URL": "postgresql://localhost/mydb",
        "DB_PASSWORD": "$DB_PASSWORD_FROM_ENV"
      },
      "timeout": 30000,
      "trust": false
    },
    "api-gateway": {
      "command": "node",
      "args": ["./api-mcp-server.js"],
      "cwd": "./mcp-tools/api",
      "env": {
        "API_KEY": "$API_KEY",
        "BASE_URL": "https://api.example.com"
      },
      "includeTools": ["getUser", "createOrder"],
      "excludeTools": ["deleteUser"]
    },
    "analytics": {
      "command": "docker",
      "args": ["run", "-p", "8080:8080", "analytics-mcp:latest"],
      "timeout": 60000,
      "trust": true
    }
  }
}

Security Settings

{
  "mcpServers": {
    "secure-server": {
      "command": "python",
      "args": ["secure_server.py"],
      "trust": false,  // Require confirmation for tool calls
      "includeTools": ["safe_read", "safe_write"],
      "excludeTools": ["dangerous_delete"],
      "allowedDomains": ["*.internal.com"],
      "maxConcurrent": 5,
      "rateLimit": {
        "requests": 100,
        "window": 60000  // per minute
      }
    }
  }
}

Building MCP Servers

Python MCP Server

# database_mcp_server.py
import json
import sys
import psycopg2
from typing import Dict, Any

class DatabaseMCP:
    def __init__(self):
        self.conn = psycopg2.connect(
            os.environ.get('DATABASE_URL')
        )

    def handle_request(self, request: Dict[str, Any]):
        method = request.get('method')
        params = request.get('params', {})

        if method == 'query':
            return self.execute_query(params.get('sql'))
        elif method == 'insert':
            return self.insert_data(
                params.get('table'),
                params.get('data')
            )

    def execute_query(self, sql: str):
        cursor = self.conn.cursor()
        cursor.execute(sql)
        return cursor.fetchall()

    def get_tools(self):
        return [
            {
                "name": "database_query",
                "description": "Execute SQL query",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "sql": {
                            "type": "string",
                            "description": "SQL query to execute"
                        }
                    },
                    "required": ["sql"]
                }
            },
            {
                "name": "database_insert",
                "description": "Insert data into table",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "table": {"type": "string"},
                        "data": {"type": "object"}
                    },
                    "required": ["table", "data"]
                }
            }
        ]

if __name__ == "__main__":
    server = DatabaseMCP()
    server.start()

Node.js MCP Server

// api-mcp-server.js
const { MCPServer } = require('@modelcontextprotocol/server');
const axios = require('axios');

class APIMCPServer extends MCPServer {
  constructor() {
    super();
    this.baseURL = process.env.BASE_URL;
    this.apiKey = process.env.API_KEY;
  }

  async getTools() {
    return [
      {
        name: 'api_get',
        description: 'Make GET request to API',
        parameters: {
          type: 'object',
          properties: {
            endpoint: {
              type: 'string',
              description: 'API endpoint path'
            },
            params: {
              type: 'object',
              description: 'Query parameters'
            }
          },
          required: ['endpoint']
        }
      },
      {
        name: 'api_post',
        description: 'Make POST request to API',
        parameters: {
          type: 'object',
          properties: {
            endpoint: { type: 'string' },
            body: { type: 'object' }
          },
          required: ['endpoint', 'body']
        }
      }
    ];
  }

  async handleToolCall(name, params) {
    const headers = {
      'Authorization': `Bearer ${this.apiKey}`,
      'Content-Type': 'application/json'
    };

    switch(name) {
      case 'api_get':
        const response = await axios.get(
          `${this.baseURL}${params.endpoint}`,
          { headers, params: params.params }
        );
        return response.data;

      case 'api_post':
        const postResponse = await axios.post(
          `${this.baseURL}${params.endpoint}`,
          params.body,
          { headers }
        );
        return postResponse.data;

      default:
        throw new Error(`Unknown tool: ${name}`);
    }
  }
}

const server = new APIMCPServer();
server.start();

Docker MCP Server

# Dockerfile for MCP server
FROM python:3.11-slim

WORKDIR /app

# Install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt

# Copy server code
COPY mcp_server.py .

# MCP protocol port
EXPOSE 8080

# Start server
CMD ["python", "mcp_server.py"]
# Build and run
docker build -t my-mcp-server .
docker run -p 8080:8080 -e DATABASE_URL="$DATABASE_URL" my-mcp-server

Usage Patterns

Database Operations

# Configure database MCP
cat > ~/.gemini/mcp-servers.json << 'EOF'
{
  "mcpServers": {
    "postgres": {
      "command": "python",
      "args": ["-m", "postgres_mcp"],
      "env": {
        "DATABASE_URL": "postgresql://user:pass@localhost/db"
      }
    }
  }
}
EOF

# Use with YOLO for automated database operations
gemini --yolo -p "Query the users table and generate comprehensive report of active users from last week"
gemini --yolo -p "Create detailed sales analysis with charts from the orders table"

API Integration

# Configure API MCP
gemini mcp add \
  --name "stripe" \
  --command "node" \
  --args "stripe-mcp.js" \
  --env "STRIPE_KEY=$STRIPE_SECRET_KEY"

# Use with YOLO for automated API operations
gemini --yolo -p "Create a new customer and subscription using Stripe with full setup"
gemini --yolo -p "Generate comprehensive transaction report with analytics for this month"

Custom Business Logic

# Configure business logic MCP
gemini mcp add \
  --name "business-rules" \
  --command "java" \
  --args "-jar business-mcp.jar"

# Apply business rules with YOLO automation
gemini --yolo -p "Validate this order against all business rules and generate compliance report"
gemini --yolo -p "Calculate pricing using custom algorithm and create detailed breakdown"

YOLO Mode with MCP Servers

YOLO mode with MCP servers enables powerful automation for trusted operations:

Automated Data Operations

# Database automation with YOLO
gemini --yolo -p "Using the database MCP:
1. Query all user activity from last 30 days
2. Generate engagement analytics
3. Create user segmentation report
4. Export findings to CSV
5. Send summary email to stakeholders"

# Multi-database operations
gemini --yolo -p "Synchronize data between PostgreSQL and Redis:
1. Read user sessions from Redis
2. Update last_active in PostgreSQL
3. Clean expired sessions
4. Generate sync report"

API Workflow Automation

# Automated API orchestration
gemini --yolo -p "Using Stripe and database MCP servers:
1. Fetch all subscription cancellations from Stripe
2. Update user status in our database
3. Send personalized retention offers
4. Log all actions for audit
5. Generate retention campaign report"

# Multi-service integration
gemini --yolo -p "Complete order processing workflow:
1. Validate order via business rules MCP
2. Process payment via Stripe MCP
3. Update inventory via database MCP
4. Send confirmation via email MCP
5. Log transaction and generate receipt"

Enterprise Automation

# Automated compliance reporting
gemini --yolo -p "Generate quarterly compliance report:
1. Query all financial data via database MCP
2. Validate against regulations via compliance MCP
3. Generate charts and visualizations
4. Create executive summary
5. Export to PDF and store securely"

# Infrastructure monitoring
gemini --yolo -p "Complete infrastructure health check:
1. Query metrics from monitoring MCP
2. Check service status via K8s MCP
3. Analyze logs via logging MCP
4. Generate incident reports
5. Update status dashboard"

Safe YOLO Practices for MCP

# ✅ SAFE with YOLO (read-only or low-risk)
gemini --yolo -p "Generate analytics dashboard from database MCP"
gemini --yolo -p "Sync read-only data between MCP services"
gemini --yolo -p "Create comprehensive status reports from all MCPs"

# ⚠️ USE CAUTION (write operations)
# Review first, then use YOLO if confident
gemini -p "Plan user data migration between databases"
# After review:
gemini --yolo -p "Execute the reviewed migration plan"

# 🔒 NEVER YOLO (critical operations)
# Always manual approval for:
# - Production data deletion
# - Security configuration changes
# - Financial transactions above thresholds

MCP Server Management Automation

#!/bin/bash
# Automated MCP server lifecycle management

manage_mcp_servers() {
  local operation="$1"

  case $operation in
    health-check)
      gemini --yolo -p "Check health of all MCP servers and create status report"
      ;;

    restart-all)
      gemini --yolo -p "Safely restart all MCP servers in dependency order"
      ;;

    update-configs)
      gemini --yolo -p "Update all MCP server configurations and validate"
      ;;

    deploy-new)
      gemini --yolo -p "Deploy new MCP servers from configs and test connections"
      ;;
  esac
}

# Usage
manage_mcp_servers health-check

Advanced Workflows

Multi-Server Orchestration

#!/bin/bash
# Orchestrate multiple MCP servers

orchestrate_mcp() {
  # Start all servers
  gemini mcp start database
  gemini mcp start api
  gemini mcp start analytics

  # Execute workflow
  gemini --yolo -p "Using all available MCP tools:
  1. Query user data from database
  2. Enrich with API data
  3. Analyze with analytics tools
  4. Generate comprehensive report"

  # Stop servers
  gemini mcp stop --all
}

Dynamic Server Management

#!/bin/bash
# Dynamically add servers based on project

setup_project_mcp() {
  local project_type="$1"

  case $project_type in
    ecommerce)
      gemini mcp add --name "payment" --command "payment-mcp"
      gemini mcp add --name "inventory" --command "inventory-mcp"
      gemini mcp add --name "shipping" --command "shipping-mcp"
      ;;

    analytics)
      gemini mcp add --name "bigquery" --command "bq-mcp"
      gemini mcp add --name "tableau" --command "tableau-mcp"
      ;;

    devops)
      gemini mcp add --name "kubernetes" --command "k8s-mcp"
      gemini mcp add --name "terraform" --command "tf-mcp"
      ;;
  esac

  echo "MCP servers configured for $project_type project"
}

Health Monitoring

#!/bin/bash
# Monitor MCP server health

monitor_mcp_health() {
  while true; do
    echo "=== MCP Server Status ==="

    for server in $(gemini mcp list --json | jq -r '.servers[].name'); do
      if gemini mcp test "$server" > /dev/null 2>&1; then
        echo "✓ $server: Healthy"
      else
        echo "✗ $server: Unhealthy"

        # Attempt restart
        echo "  Attempting restart..."
        gemini mcp restart "$server"
      fi
    done

    sleep 30
  done
}

Load Balancing

// Load-balanced MCP configuration
{
  "mcpServers": {
    "api-pool": {
      "type": "pool",
      "strategy": "round-robin",  // or "random", "least-connections"
      "servers": [
        {
          "command": "node",
          "args": ["api-1.js"],
          "port": 8081
        },
        {
          "command": "node",
          "args": ["api-2.js"],
          "port": 8082
        },
        {
          "command": "node",
          "args": ["api-3.js"],
          "port": 8083
        }
      ],
      "healthCheck": {
        "interval": 10000,
        "timeout": 5000,
        "path": "/health"
      }
    }
  }
}

Security Best Practices

Authentication

{
  "mcpServers": {
    "secure-server": {
      "command": "python",
      "args": ["server.py"],
      "auth": {
        "type": "bearer",
        "token": "$MCP_AUTH_TOKEN"
      },
      "tls": {
        "enabled": true,
        "cert": "/path/to/cert.pem",
        "key": "/path/to/key.pem",
        "ca": "/path/to/ca.pem"
      }
    }
  }
}

Tool Restrictions

#!/bin/bash
# Restrict MCP tool access

restrict_mcp_tools() {
  local server="$1"
  local allowed_tools=("$@")

  # Generate config with restrictions
  cat > ~/.gemini/mcp-restrictions.json << EOF
{
  "$server": {
    "includeTools": [${allowed_tools[@]}],
    "requireConfirmation": true,
    "logAllCalls": true,
    "maxCallsPerMinute": 10
  }
}
EOF

  # Apply restrictions
  gemini mcp update "$server" --config ~/.gemini/mcp-restrictions.json
}

# Usage
restrict_mcp_tools "database" "read_only_query" "get_schema"

Audit Logging

# Auditing MCP server
import logging
import json
from datetime import datetime

class AuditedMCPServer:
    def __init__(self):
        self.audit_log = logging.getLogger('mcp.audit')
        self.audit_log.setLevel(logging.INFO)

        # Setup audit file
        handler = logging.FileHandler('/var/log/mcp-audit.log')
        formatter = logging.Formatter(
            '%(asctime)s - %(name)s - %(message)s'
        )
        handler.setFormatter(formatter)
        self.audit_log.addHandler(handler)

    def handle_tool_call(self, tool, params, user_context):
        # Log before execution
        self.audit_log.info(json.dumps({
            'event': 'tool_call_start',
            'tool': tool,
            'params': params,
            'user': user_context,
            'timestamp': datetime.utcnow().isoformat()
        }))

        try:
            result = self.execute_tool(tool, params)

            # Log success
            self.audit_log.info(json.dumps({
                'event': 'tool_call_success',
                'tool': tool,
                'result_size': len(str(result))
            }))

            return result

        except Exception as e:
            # Log failure
            self.audit_log.error(json.dumps({
                'event': 'tool_call_failure',
                'tool': tool,
                'error': str(e)
            }))
            raise

Troubleshooting

Common Issues

  1. Server Won't Start
# Check logs
gemini mcp logs <server-name>

# Test manually
python -m my_mcp_server --debug

# Check port conflicts
lsof -i :8080
  1. Connection Timeout
# Increase timeout
gemini mcp update <server> --timeout 60000

# Check network
ping localhost
telnet localhost 8080
  1. Tool Not Available
# List available tools
gemini -i
/tools

# Refresh tool list
gemini mcp refresh <server>

# Check server implementation
gemini mcp debug <server>

Debug Mode

# Enable debug logging
export GEMINI_MCP_DEBUG=true

# Verbose output
gemini --verbose mcp test <server>

# Trace tool calls
gemini --trace -p "Use MCP tools to query database"

Performance Optimization

Connection Pooling

{
  "mcpServers": {
    "database": {
      "command": "python",
      "args": ["db_mcp.py"],
      "pool": {
        "min": 2,
        "max": 10,
        "idle": 300000  // 5 minutes
      }
    }
  }
}

Caching

# Enable MCP response caching
export GEMINI_MCP_CACHE=true
export GEMINI_MCP_CACHE_TTL=300  # seconds

# Clear cache
gemini mcp cache clear

Related Skills

  • gemini-cli: Main Gemini CLI integration
  • gemini-auth: Authentication management
  • gemini-chat: Interactive chat sessions
  • gemini-tools: Tool execution workflows

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

30.7%
按下载量换算46

Cursor

20.83%
按下载量换算31

Antigravity

15.32%
按下载量换算23

codebuddy

12.87%
按下载量换算19

qwen-code

7.28%
按下载量换算11

windsurf

3.44%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills