Configuration
The server is configured via the Config dataclass,
which is instantiated once at module level by reading environment variables through
from_env().
No configuration files are required — all settings have sensible defaults.
See the full class reference at google_scholar_search_mcp.config.Config.
Defaults
Field |
Default value |
Notes |
|---|---|---|
|
|
Minimum pause between Scholar requests (seconds) |
|
|
Maximum pause — actual delay is random in |
|
|
Retry attempts on rate-limit errors before raising |
|
|
Proxy mode: |
|
(unset) |
HTTP proxy URL, used when |
|
(unset) |
HTTPS proxy URL, used when |
|
(unset) |
API key for ScraperAPI, used when |
|
|
Scholarly request timeout in seconds |
Environment Variables
All fields are populated from environment variables:
Environment variable |
Field |
Example |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Proxy Modes
NONENo proxy — connects to Google Scholar directly. Suitable for light usage.
FREEUses the scholarly library’s built-in free proxy rotation. May be unreliable.
SINGLERoutes all requests through a specific proxy defined by
GS_PROXY_HTTP/GS_PROXY_HTTPS.SCRAPERAPIUses ScraperAPI for reliable access. Requires
GS_SCRAPERAPI_KEY.
Agent Skill
The repository ships src/google_scholar_search_mcp/skills/google-scholar-mcp/SKILL.md, which explains to an
agent when and how to use the tools (tool choice, rate limits, error handling).
The server appends the skill’s URL (GS_SKILL_URL) to its MCP instructions,
which clients show to the agent on connect. Run google-scholar-mcp setup (or
google-scholar-mcp install-skill) to download it into
~/.claude/skills/google-scholar-mcp/; if the download fails the bundled
copy is used.
Passing Config via Claude Desktop
Set environment variables in the MCP server entry:
{
"mcpServers": {
"google-scholar": {
"command": "google-scholar-mcp",
"env": {
"GS_MIN_DELAY": "3.0",
"GS_MAX_DELAY": "8.0",
"GS_PROXY_TYPE": "scraperapi",
"GS_SCRAPERAPI_KEY": "your-key-here"
}
}
}
}
Extending Config
Config is a frozen dataclass. To override defaults programmatically,
instantiate it directly in a custom server entry point:
from google_scholar_search_mcp.config import Config, ProxyType
from google_scholar_search_mcp import server
server.config = Config(
min_delay_seconds=2.0,
max_delay_seconds=6.0,
max_retries=5,
proxy_type=ProxyType.SCRAPERAPI,
proxy_http=None,
proxy_https=None,
scraperapi_key="your-key-here",
timeout_seconds=60,
)