pub struct Config {
pub zotero_sqlite_path: PathBuf,
pub zotero_storage_path: PathBuf,
pub bbt_migrated_path: PathBuf,
pub zotero_api_key: Option<String>,
pub zotero_library_id: String,
pub zotero_library_type: String,
pub bbt_url: String,
pub log_level: LogLevel,
pub writes_enabled: bool,
pub resolver: ResolverConfig,
pub zotero_api_base_url: Option<String>,
}Expand description
Server configuration, loaded from environment variables.
All paths have sensible defaults for a standard macOS Zotero installation. The API key is optional — without it, write tools return a clear error.
Fields§
§zotero_sqlite_path: PathBufPath to Zotero’s main SQLite database.
zotero_storage_path: PathBufPath to the Zotero storage directory (where PDFs live).
bbt_migrated_path: PathBufPath to BBT’s migrated citekey database.
zotero_api_key: Option<String>Zotero Web API key (required for write operations).
zotero_library_id: StringZotero library ID (default: personal library).
zotero_library_type: StringZotero library type (“user” or “group”).
bbt_url: StringBBT JSON-RPC URL (only needed for BibTeX/bibliography export).
log_level: LogLevelLog level for stderr diagnostics.
writes_enabled: boolWhether write tools are enabled (default: false for safety). Set ZOTERO_MCP_ENABLE_WRITES=true to enable.
resolver: ResolverConfigPaper resolver configuration (sources, timeouts, etc.). Loaded from TOML config file if present, otherwise defaults.
zotero_api_base_url: Option<String>Override Zotero API base URL (for testing). None = use default.
Implementations§
Source§impl Config
impl Config
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Load configuration from environment variables.
Reads .env file if present (via dotenvy), then environment variables.
All variables have sensible defaults except ZOTERO_API_KEY.
Sourcepub fn has_write_access(&self) -> bool
pub fn has_write_access(&self) -> bool
Whether write operations are available (API key is configured).