forked from mixelpixx/Google-Search-MCP-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
141 lines (122 loc) · 5.41 KB
/
.env.example
File metadata and controls
141 lines (122 loc) · 5.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# ============================================================
# SEARCH PROVIDER SELECTION
# ============================================================
# Choose which search provider to use: google, brave, or tavily
# Default: google (for backwards compatibility)
#
# Recommended: brave (better pricing, no sunset date)
# ============================================================
#SEARCH_PROVIDER=google
# ============================================================
# BRAVE SEARCH API CONFIGURATION (Recommended)
# ============================================================
# Why Brave?
# - 2,000 free queries/month (vs Google's 100/day)
# - $3/month for 5,000 queries (vs Google's $5/1,000)
# - Privacy-focused, no tracking
# - No sunset date announced
#
# Get API key: https://api.search.brave.com/app/keys
# Free tier: No credit card required!
# ============================================================
#BRAVE_API_KEY=your_brave_api_key_here
# ============================================================
# TAVILY SEARCH API CONFIGURATION (AI-Optimized)
# ============================================================
# Why Tavily?
# - Optimized for AI agents and research workflows
# - 1,000 free queries/month
# - $30/month for 4,000 queries
# - Advanced search depth for comprehensive results
# - Quality scoring for better source ranking
#
# Get API key: https://app.tavily.com/sign-in
# Best for: Deep research, synthesis, academic use
# ============================================================
#TAVILY_API_KEY=your_tavily_api_key_here
# ============================================================
# GOOGLE CUSTOM SEARCH API CONFIGURATION (Legacy)
# ============================================================
# IMPORTANT: Google CLOSED this API to new users in 2024!
# API SUNSET: January 1, 2027 - migrate to Brave or Tavily
# ============================================================
# Required (if using Google): Your Google API Key
# Get from: https://console.cloud.google.com/apis/credentials
# NOTE: You need an EXISTING key (new keys cannot be created)
GOOGLE_API_KEY=your_google_api_key_here
# Required (if using Google): Your Custom Search Engine ID
# Get from: https://programmablesearchengine.google.com/
GOOGLE_SEARCH_ENGINE_ID=your_search_engine_id_here
# ============================================================
# GOOGLE USAGE LIMITS (FREE TIER)
# ============================================================
# - 100 queries per day FREE
# - After 100: $5 per 1,000 queries (max 10k/day)
#
# Monitor usage: https://console.cloud.google.com/apis/dashboard
# Enable billing: https://console.cloud.google.com/billing
# ============================================================
# ============================================================
# USAGE TRACKING (Optional)
# ============================================================
# Track your API usage and costs across all providers
# Helps prevent unexpected bills and quota overruns
#
# USAGE_TRACKING_ENABLED: Enable/disable tracking (default: false)
# USAGE_TRACKING_PERSIST: Save to SQLite database for history (default: false)
# USAGE_TRACKING_DB_PATH: Database file location (default: ./.mcp-usage-tracking.db)
#
# Thresholds (0 = unlimited):
# USAGE_MAX_SEARCHES_PER_MONTH: Alert when approaching search limit
# USAGE_MAX_COST_PER_MONTH: Alert when approaching cost limit (USD)
# ============================================================
#USAGE_TRACKING_ENABLED=true
#USAGE_TRACKING_PERSIST=true
#USAGE_TRACKING_DB_PATH=./.mcp-usage-tracking.db
#USAGE_MAX_SEARCHES_PER_MONTH=1000
#USAGE_MAX_COST_PER_MONTH=10.00
# ============================================================
# OPTIONAL CONFIGURATION
# ============================================================
# Transport mode (stdio or http)
# Use stdio for Claude Code/Desktop/Cline (default)
# Use http for testing or custom integrations
#MCP_TRANSPORT=stdio
# Port for HTTP mode (only used when MCP_TRANSPORT=http)
#PORT=3000
# ============================================================
# DIRECT API MODE (Advanced Users Only)
# ============================================================
# By default, the server uses Agent Mode which leverages your
# existing Claude session - NO additional API key required.
#
# Only enable Direct API mode if you:
# - Are running automated scripts without Claude
# - Need synthesis in non-interactive workflows
#
# To enable:
# 1. Get Anthropic API key: https://console.anthropic.com/
# 2. Uncomment the lines below
# 3. Rebuild: npm run build
#
#ANTHROPIC_API_KEY=your_anthropic_api_key_here
#USE_DIRECT_API=true
# ============================================================
# TROUBLESHOOTING
# ============================================================
# Error: "403 Forbidden" or "Access Denied"
# -> Check API key is correct
# -> Verify Custom Search API is enabled in Google Cloud Console
# -> You may have hit the 100/day limit (enable billing or wait)
#
# Error: "429 Too Many Requests"
# -> You exceeded 100 queries today
# -> Wait until midnight UTC or enable billing
#
# Error: "API not enabled"
# -> Go to: https://console.cloud.google.com/apis/library/customsearch.googleapis.com
# -> Click "Enable"
# -> Wait 2-3 minutes
#
# Still stuck? See ALTERNATIVES.md for other search APIs
# ============================================================