config

class google_scholar_search_mcp.config.ProxyType(*values)[source]

Bases: str, Enum

Proxy strategy used for Google Scholar requests (GS_PROXY_TYPE).

NONE = 'none'
FREE = 'free'
SINGLE = 'single'
SCRAPERAPI = 'scraperapi'
class google_scholar_search_mcp.config.Config(min_delay_seconds, max_delay_seconds, max_retries, proxy_type, proxy_http, proxy_https, scraperapi_key, timeout_seconds, skill_url='https://raw.githubusercontent.com/LWaetzig/google-scholar-mcp/main/src/google_scholar_search_mcp/skills/google-scholar-mcp/SKILL.md', block_cooldown_seconds=900.0, cache_ttl_seconds=3600.0, cache_max_entries=256, cookies=None, user_agent=None)[source]

Bases: object

Immutable server settings, normally built with from_env().

min_delay_seconds: float
max_delay_seconds: float
max_retries: int
proxy_type: ProxyType
proxy_http: str | None
proxy_https: str | None
scraperapi_key: str | None
timeout_seconds: int
skill_url: str = 'https://raw.githubusercontent.com/LWaetzig/google-scholar-mcp/main/src/google_scholar_search_mcp/skills/google-scholar-mcp/SKILL.md'
block_cooldown_seconds: float = 900.0
cache_ttl_seconds: float = 3600.0
cache_max_entries: int = 256
cookies: str | None = None
user_agent: str | None = None
classmethod from_env()[source]

Build a configuration from GS_* environment variables.

Returns:

Config – Settings read from the environment, with defaults for unset variables.

Raises:

ValueError – If a numeric variable is not a number, GS_PROXY_TYPE is not one of none, free, single or scraperapi, or GS_COOKIES_FILE is unreadable.

Return type:

Config