Skip to content

pubmed-stream 0.4.2

Choose a tag to compare

@melhzy melhzy released this 22 Oct 20:48
· 16 commits to main since this release

pubmed-stream now works as a plugin for Claude Code and Codex, so your assistant has its tools and its research rules in every folder, and it asks for your free NCBI API key once, which makes downloads about three times faster.

claude plugin install pubmed-stream --marketplace melhzy/pubmed-stream   # Claude Code
codex plugin marketplace add melhzy/pubmed-stream                         # Codex: then /plugins, Install plugin
pubmed-stream init --ncbi-api-key YOUR-KEY                                # save your NCBI API key for every folder

The plugin needs uv, which fetches pubmed-stream for it. Tutorial 7 shows both ways to connect your assistant, step by step. The Codex plugin follows OpenAI's documentation but has not yet been tried in Codex itself; if it misbehaves, please open an issue.

This release also makes pubmed_stream.impact, which tutorial 8 imports, part of the package on PyPI.

Added

  • pubmed-stream as a plugin for Claude Code and Codex, in plugins/pubmed-stream, with marketplaces at .claude-plugin/marketplace.json and .agents/plugins/marketplace.json: claude plugin install pubmed-stream --marketplace melhzy/pubmed-stream, or codex plugin marketplace add melhzy/pubmed-stream and then Install plugin under /plugins. It gives the assistant the MCP tools in every folder, running the pubmed-stream release of the plugin's own version through uvx, and the instructions of AGENTS.md as the skill literature-search. Where the plugin is installed, init leaves the server out of the folder, and removes one it added earlier, so the tools are not listed twice. Tests keep the plugin's version, the release it runs and the skill in step with the package, and make AGENTS.md name every tool.

  • A studies/ folder for research done with pubmed-stream, kept with its frozen data so its numbers can be checked and the study rerun. The first, studies/abeta56_retraction_impact, continues tutorial 8: the 1,240 papers citing the retracted 2006 Nature paper on Aβ*56 and the 44,957 papers citing those, frozen as tables with the kind of citation and the citing sentence; a sourced account of what the paper claimed, exactly what was wrong and what the retraction does not overturn; infini-gram counts of the claim and its correction in Dolma and The Pile; twelve probe questions for language models with a runner for Ollama models and the installed assistants; and a web page (index.html, a React application with its stylesheet and a data file built from the study's files) with the citing papers searchable by the sentence in which they cite the paper.

  • A place for the NCBI API key that works everywhere. pubmed-stream init --ncbi-api-key KEY saves it in ~/.pubmed-stream.json, which the command line and the MCP server read in every folder when NCBI_API_KEY is unset, and init asks for it in a terminal while none is configured. The Claude Code plugin asks for it at install and passes it to the server; init lists NCBI_API_KEY among the variables Codex forwards to the server. The server tells the assistant when none is configured, and the instructions say what to tell the researcher, and never to ask for the key in the conversation. init checks a key with NCBI before saving it, remembers a skipped question so it asks once, and ends with the key's status; a configured key NCBI rejects is dropped with a warning, so requests continue without it instead of all failing with 400 API key invalid; after a download that a key would have shortened by ten seconds or more, the command line and the download tool say by how much; the MCP server saves the Claude Code plugin's key for the command line too, when none is saved, after a tool call in which NCBI accepted it, and tells the assistant once when a configured key was rejected. The settings files live in pubmed_stream.settings.

Changed

  • pyproject.toml takes the version from pubmed_stream/__init__.py, one place fewer to change at a release. AGENTS.md names export_citations, says when to export, and says what missing tools mean with the plugin.
  • The Aβ*56 study page is easier to find. The README, the studies index and the study's own README link to it at the top, the study README with a screenshot; the documentation site names it in the navigation and opens the study's About page with a button to it; the page's header links back to the site, the About page and the folder on GitHub; and the page carries a description, a preview image and an icon for links shared elsewhere.
  • Tutorial 8's helpers are now part of pubmed-stream, as pubmed_stream.impact: from pubmed_stream import impact gives the citing papers of many papers at once, counts by year and flag, the sentences in which full texts or Semantic Scholar cite a paper, their classification, and the annotation of a knowledge graph, without the tutorials folder on the path. The notebook and the tests import the module from the package; tutorials/citation_impact.py remains as a shim that imports everything from it, so older copies of the notebook still run.

Upgrade: pip install --upgrade pubmed-stream