LitSource Agent 平台

MCP 接入指南

通过 Streamable HTTP 将 Agent 连接到 https://litsource.net/mcp,使用带权限范围的 LitSource Agent Token 认证。

可用工具

  • litsource_search_evidence — 有结果时消耗 1 credit。
  • litsource_verify_references — 沿用现有 Verify 计费公式。
  • litsource_get_run — 免费。
  • litsource_get_usage — 免费。

付费工具需要提供稳定的 request_id。仅在重试相同请求时复用同一个 ID。

导出 LITSOURCE_AGENT_TOKEN 环境变量,将配置添加到 ~/.codex/config.toml,然后运行 codex mcp list。Codex CLI、IDE 扩展和 ChatGPT 桌面端 Codex 共享此配置。

[mcp_servers.litsource]
url = "https://litsource.net/mcp"
bearer_token_env_var = "LITSOURCE_AGENT_TOKEN"

HTTP 是推荐的远程传输方式。运行命令后,使用 /mcpclaude mcp get litsource 确认已连接。

claude mcp add --transport http --scope user \
  --header "Authorization: Bearer $LITSOURCE_AGENT_TOKEN" \
  litsource https://litsource.net/mcp

保存为 ~/.cursor/mcp.json 用于全局使用,或 .cursor/mcp.json 用于单个项目。Cursor 会自动从环境变量中展开 Token。

{
  "mcpServers": {
    "litsource": {
      "url": "https://litsource.net/mcp",
      "headers": {
        "Authorization": "Bearer ${env:LITSOURCE_AGENT_TOKEN}"
      }
    }
  }
}

ChatGPT

当前 ChatGPT 网页版自定义插件需要兼容 MCP 的 OAuth 2.1 授权流程。LitSource Agent v1 使用静态 Bearer Token,因此暂不支持直接连接 ChatGPT 网页版插件。

你现在可以通过 OpenAI Responses API 配置远程 MCP 工具(设置 server_urlAuthorization 请求头)来使用 LitSource,或者直接使用 REST API。原生 ChatGPT 网页版支持将在 OAuth discovery、PKCE、授权确认和 Token 刷新实现后推出(Phase 2)。

OpenAI 官方 OAuth 要求

安全清单

  • 切勿提交 lsa_… Token,请从环境变量加载。
  • 为每个 Agent 创建独立的 Token,仅授予所需权限。
  • 仅授予必要的权限范围,Token 泄露后立即撤销。
  • 每次新的付费操作使用新的 request_id

What you can do

  • Verify a reference list in Cursor or Codex. Paste your draft references and ask the agent to run litsource_verify_references — it flags fabricated or mismatched citations before they reach your paper.
  • Fact-check a claim in Claude. Ask it to call litsource_search_evidence on a sentence and get real PubMed / Crossref evidence supporting or challenging it.
  • Check your spend. Ask litsource_get_usage for your current balance and today's token usage.

Pricing: litsource_search_evidence costs 1 credit only when results are returned; litsource_verify_references costs 3 credits per 10 references; litsource_get_run and litsource_get_usage are free. Free accounts can verify up to 10 references per call. There is no daily credit limit — your balance is the only cap.

LitSource — AI引文验证 & 生物医学文献检索工具