Skip to main content
Glama

MCP Gemini Server

by bsmi021
.env.example2.4 kB
# Required API Configuration GOOGLE_GEMINI_API_KEY=your_api_key_here # Required for Production (unless NODE_ENV=test) MCP_SERVER_HOST=localhost MCP_SERVER_PORT=8080 # Generate this token securely using the methods in Installation step 4 # e.g., node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" MCP_CONNECTION_TOKEN=your_generated_secure_token_from_step_4 # Optional API Configuration GOOGLE_GEMINI_MODEL=gemini-1.5-pro-latest GOOGLE_GEMINI_DEFAULT_THINKING_BUDGET=4096 # Security Configuration ALLOWED_OUTPUT_PATHS=/var/opt/mcp-gemini-server/outputs,/var/opt/mcp-gemini-server/tool_data # For mcpCallServerTool and writeToFileTool # URL Context Configuration GOOGLE_GEMINI_ENABLE_URL_CONTEXT=true # Enable URL context features GOOGLE_GEMINI_URL_MAX_COUNT=20 # Maximum URLs per request GOOGLE_GEMINI_URL_MAX_CONTENT_KB=100 # Maximum content size per URL in KB GOOGLE_GEMINI_URL_FETCH_TIMEOUT_MS=10000 # Fetch timeout per URL in milliseconds GOOGLE_GEMINI_URL_ALLOWED_DOMAINS=* # Allowed domains (* for all, or comma-separated list) GOOGLE_GEMINI_URL_BLOCKLIST=malicious.com,spam.net # Blocked domains (comma-separated) GOOGLE_GEMINI_URL_CONVERT_TO_MARKDOWN=true # Convert HTML to markdown GOOGLE_GEMINI_URL_INCLUDE_METADATA=true # Include URL metadata in context GOOGLE_GEMINI_URL_ENABLE_CACHING=true # Enable URL content caching GOOGLE_GEMINI_URL_USER_AGENT=MCP-Gemini-Server/1.0 # Custom User-Agent # Server Configuration MCP_CLIENT_ID=gemini-sdk-client # Optional: Default client ID for MCP connections (defaults to "gemini-sdk-client") MCP_TRANSPORT=stdio # Options: stdio, sse, streamable, http (replaced deprecated MCP_TRANSPORT_TYPE) MCP_LOG_LEVEL=info # Optional: Log level for MCP operations (debug, info, warn, error) MCP_ENABLE_STREAMING=true # Enable SSE streaming for HTTP transport MCP_SESSION_TIMEOUT=3600 # Session timeout in seconds for HTTP transport SESSION_STORE_TYPE=memory # Options: memory, sqlite SQLITE_DB_PATH=./data/sessions.db # Path to SQLite database file. For production, consider an absolute path to a persistent volume. ENABLE_HEALTH_CHECK=true HEALTH_CHECK_PORT=3000 # GitHub Personal Access Token for API access (required for GitHub code review features) # For public repos, token needs 'public_repo' and 'read:user' scopes # For private repos, token needs 'repo' scope GITHUB_API_TOKEN=your_github_token_here

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/bsmi021/mcp-gemini-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server