Yuan1z0825/nature-skills / skills/nature-academic-search
nature-academic-search
FlaggedSearch literature across sources, verify or manage citations, and build MeSH strategies or citation-impact audits. Use for 文献检索、引文核对、参考文献管理、严格他引 and evidence-backed citer profiles; not for translating a paper or drafting manuscript prose.
mcp-server/utils/config.py
View on GitHub"""Configuration management for academic search server."""
import os
from pathlib import Path
import toml
class Config:
def __init__(self, config_path: str | Path | None = None):
if config_path is None:
config_path = Path(__file__).parent.parent / "config.toml"
self._config = toml.load(config_path)
@property
def pubmed_email(self) -> str:
return os.environ.get("PUBMED_EMAIL") or self._config.get("pubmed", {}).get("email", "")
@property
def pubmed_api_key(self) -> str:
return os.environ.get("NCBI_API_KEY") or self._config.get("pubmed", {}).get("api_key", "")
@property
def crossref_mailto(self) -> str:
return self._config.get("crossref", {}).get("mailto", "")
@property
def crossref_timeout(self) -> int:
return self._config.get("crossref", {}).get("timeout", 15)
@property
def arxiv_timeout(self) -> int:
return self._config.get("arxiv", {}).get("timeout", 30)
@property
def default_rows(self) -> int:
return self._config.get("general", {}).get("default_rows", 5)
@property
def max_rows(self) -> int:
return self._config.get("general", {}).get("max_rows", 50)
# Global config instance
_config: Config | None = None
def get_config() -> Config:
global _config
if _config is None:
_config = Config()
return _config
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |