Lem/Docs

Read manuscripts and external literature from any agent.

LemMCP is a read-only stdio MCP server running in-process on the same LemCore APIs and stores as the app and CLI.

Run the server#

The server writes JSON-RPC frames only to stdout and routes diagnostics to stderr. It handles the standard initialize, ping, tools/list, and tools/call methods.

Shell
swift run LemMCP

Tools#

  • lem_list_papers — load the registry and return each paper's metadata (id, title, priority, status, source URLs, tags, target venue). Never returns any sensitive values.
  • lem_show_paper — take a required id (exact) or title (case-insensitive substring) and return that one paper's metadata.
  • lem_list_literature — return every paper in the independent external-literature library, including metadata, local reading files, and saved analysis.
  • lem_show_literature_paper — take an exact paper_id (an arXiv id, a DOI, or the page address a record is keyed on) or a case-insensitive title substring and return that external paper.
  • lem_provenance_report — read the existing provenance audit report from disk if present, or return a graceful "no report yet" note. It never runs or persists an audit.

Write surface#

No write tool is wired into the MCP server yet, so manuscript import, context refresh, audit runs, library add and analysis, and figure generation are reached through the CLI, separate utilities, or app. That is the current state of the code, not a restriction on what the surface may carry.