<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: theRMN</title>
    <description>The latest articles on DEV Community by theRMN (@thermn).</description>
    <link>https://dev.to/thermn</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4283658%2F854ca68e-bb1d-4814-968c-78bb9e17e092.jpg</url>
      <title>DEV Community: theRMN</title>
      <link>https://dev.to/thermn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thermn"/>
    <language>en</language>
    <item>
      <title>Stop LLMs from Hallucinating Old APIs: Fetch Exact-Version PyPI, npm &amp; Rust Docs via MCP</title>
      <dc:creator>theRMN</dc:creator>
      <pubDate>Fri, 04 Dec 2026 22:34:26 +0000</pubDate>
      <link>https://dev.to/thermn/stop-llms-from-hallucinating-old-apis-fetch-exact-version-pypi-npm-rust-docs-via-mcp-45k</link>
      <guid>https://dev.to/thermn/stop-llms-from-hallucinating-old-apis-fetch-exact-version-pypi-npm-rust-docs-via-mcp-45k</guid>
      <description>&lt;p&gt;Every developer using AI coding assistants (Cursor, Claude Desktop, Windsurf) or building RAG pipelines hits the same wall: &lt;strong&gt;LLMs hallucinate deprecated methods&lt;/strong&gt; or mix up major library versions (like Pydantic v1 vs v2, NumPy 1.x vs 2.x, or fast-moving Rust crates).&lt;/p&gt;

&lt;p&gt;And if you try pointing a generic "URL-to-Markdown" scraper at library documentation, two things usually break:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You first have to manually find the real docs URL for every package.&lt;/li&gt;
&lt;li&gt;Huge parts of the ecosystem — &lt;strong&gt;Read the Docs&lt;/strong&gt;, &lt;strong&gt;Sphinx / PyData&lt;/strong&gt; sites (&lt;code&gt;numpy&lt;/code&gt;, &lt;code&gt;pandas&lt;/code&gt;, &lt;code&gt;scipy&lt;/code&gt;, &lt;code&gt;openpyxl&lt;/code&gt;, &lt;code&gt;scikit-learn&lt;/code&gt;), and &lt;strong&gt;&lt;code&gt;docs.rs&lt;/code&gt;&lt;/strong&gt; — either don't expose inner pages in &lt;code&gt;sitemap.xml&lt;/code&gt;, hide behind &lt;code&gt;&amp;lt;meta http-equiv="refresh"&amp;gt;&lt;/code&gt; / version-hub splash pages, or dump noisy HTML navigation into your context window.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To solve this cleanly, I built &lt;strong&gt;&lt;a href="https://apify.com/thermn/package-docs-finder" rel="noopener noreferrer"&gt;Package Docs Finder&lt;/a&gt;&lt;/strong&gt; on Apify.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Does
&lt;/h2&gt;

&lt;p&gt;Instead of passing URLs, you pass a &lt;strong&gt;package name&lt;/strong&gt;, &lt;strong&gt;ecosystem&lt;/strong&gt; (&lt;code&gt;pypi&lt;/code&gt;, &lt;code&gt;npm&lt;/code&gt;, or &lt;code&gt;crates&lt;/code&gt;), and optionally an exact &lt;strong&gt;&lt;code&gt;version&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;topic&lt;/code&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fast-path &lt;code&gt;llms.txt&lt;/code&gt;:&lt;/strong&gt; Automatically checks for &lt;code&gt;llms-full.txt&lt;/code&gt; / &lt;code&gt;llms.txt&lt;/code&gt; first (used by modern libraries like &lt;code&gt;zod&lt;/code&gt;, &lt;code&gt;express&lt;/code&gt;, etc.).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep Sphinx &amp;amp; Read the Docs support:&lt;/strong&gt; Parses &lt;code&gt;sitemap.xml&lt;/code&gt;, &lt;code&gt;robots.txt&lt;/code&gt;, and Sphinx &lt;code&gt;searchindex.js&lt;/code&gt; — prioritizing tutorials and user guides ahead of thousands of auto-generated API stubs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version hubs &amp;amp; &lt;code&gt;docs.rs&lt;/code&gt;:&lt;/strong&gt; Follows version landing pages (e.g. &lt;code&gt;numpy&lt;/code&gt; &lt;code&gt;2.4&lt;/code&gt; -&amp;gt; &lt;code&gt;/doc/2.4/&lt;/code&gt;) and extracts clean module/trait documentation from &lt;code&gt;docs.rs&lt;/code&gt; for Rust crates (&lt;code&gt;tokio&lt;/code&gt;, &lt;code&gt;serde&lt;/code&gt;, &lt;code&gt;clap&lt;/code&gt;, &lt;code&gt;reqwest&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM-ready Markdown:&lt;/strong&gt; Strips navbars/footers/copy-buttons while preserving fenced code block language tags (&lt;code&gt;python&lt;/code&gt;, &lt;code&gt;typescript&lt;/code&gt;, &lt;code&gt;rust&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dual Output:&lt;/strong&gt; Structured JSON items in the Apify Dataset (for AI agents &amp;amp; RAG) + a single merged &lt;code&gt;DOCUMENTATION.md&lt;/code&gt; file in Key-Value Store.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Add It to Cursor or Claude Desktop in 30 Seconds (via MCP)
&lt;/h2&gt;

&lt;p&gt;Because it runs on Apify with &lt;code&gt;Limited permissions&lt;/code&gt;, you can expose it directly as an MCP tool using Apify's hosted MCP server (OAuth handles sign-in automatically — Apify's free tier includes $5/month of credits, which covers ~1,600 extracted doc pages for free):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"package-docs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://mcp.apify.com/?tools=thermn/package-docs-finder"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or via &lt;code&gt;npx&lt;/code&gt; if you prefer &lt;code&gt;stdio&lt;/code&gt; with an &lt;code&gt;APIFY_TOKEN&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"package-docs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"@apify/actors-mcp-server"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"--tools"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"thermn/package-docs-finder"&lt;/span&gt;
      &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"APIFY_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"YOUR_APIFY_TOKEN"&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once connected, you can prompt your agent directly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Use package-docs-finder to fetch the &lt;code&gt;openpyxl&lt;/code&gt; docs filtered by topic &lt;code&gt;chart&lt;/code&gt; and build me a bar chart generator."&lt;/em&gt;&lt;br&gt;
&lt;em&gt;"Fetch &lt;code&gt;numpy&lt;/code&gt; version &lt;code&gt;2.4&lt;/code&gt; quickstart docs before refactoring this module."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Try It Out / Break It
&lt;/h2&gt;

&lt;p&gt;You can test it directly in the browser or plug it into n8n / Make / Python workflows here:&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://apify.com/thermn/package-docs-finder" rel="noopener noreferrer"&gt;Package Docs Finder on Apify Store&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you know any tricky packages or custom documentation engines that usually break scrapers, drop them in the comments — I'd love to test them and add support!&lt;/p&gt;

</description>
      <category>api</category>
      <category>mcp</category>
      <category>python</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
