<?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: Swayam Maheshwari</title>
    <description>The latest articles on DEV Community by Swayam Maheshwari (@swayam_maheshwari).</description>
    <link>https://dev.to/swayam_maheshwari</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%2F4212752%2F594457a8-6d9f-4f41-99da-1d706c1ed97b.png</url>
      <title>DEV Community: Swayam Maheshwari</title>
      <link>https://dev.to/swayam_maheshwari</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/swayam_maheshwari"/>
    <language>en</language>
    <item>
      <title>Claude Code vs Cursor vs Codex: Which Coding Agent Writes the Best API Docs?</title>
      <dc:creator>Swayam Maheshwari</dc:creator>
      <pubDate>Thu, 29 Oct 2026 11:29:42 +0000</pubDate>
      <link>https://dev.to/swayam_maheshwari/claude-code-vs-cursor-vs-codex-which-coding-agent-writes-the-best-api-docs-4m6k</link>
      <guid>https://dev.to/swayam_maheshwari/claude-code-vs-cursor-vs-codex-which-coding-agent-writes-the-best-api-docs-4m6k</guid>
      <description>&lt;p&gt;Your coding agent can scaffold a REST endpoint, write tests, and open a PR — all without you touching the keyboard. But can it write &lt;em&gt;good&lt;/em&gt; API documentation? We ran the same task through three leading coding agents — Claude Code, Cursor, and Codex (OpenAI) — and asked each one to document a small API from source code alone. Here's what we found, and what it tells you about where AI-assisted documentation is heading.&lt;/p&gt;

&lt;h2&gt;
  
  
  The task
&lt;/h2&gt;

&lt;p&gt;A Node.js Express API with six endpoints: auth, users (CRUD), and a webhook receiver. No OpenAPI file. No existing docs. Just source code and a one-line prompt:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Read this codebase and document the API."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We measured: completeness (were all endpoints captured?), accuracy (did params, types, and response shapes match the code?), structure (was the output usable without heavy editing?), and MCP-readiness (could the output power an AI agent tool call?).&lt;/p&gt;

&lt;h2&gt;
  
  
  Claude Code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Completeness:&lt;/strong&gt; ★★★★★ All six endpoints, all params, correct auth headers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accuracy:&lt;/strong&gt; High. Claude Code reads the actual route handlers and infers types from usage — it caught an optional &lt;code&gt;?include_deleted=true&lt;/code&gt; query param that wasn't in any README.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure:&lt;/strong&gt; Good. Output was Markdown with clear H2 headings per endpoint, request/response examples, and a note about the webhook HMAC signature requirement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP-readiness:&lt;/strong&gt; With DocStar wired in, Claude Code's output maps directly to hosted MCP tool definitions — no reformatting required. The &lt;code&gt;search_&lt;/code&gt;, &lt;code&gt;get_&lt;/code&gt;, and &lt;code&gt;call_&lt;/code&gt; tools are populated from the same structured data the agent just wrote.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Best overall. Strongest at reading implicit context (middleware, shared validators) that other agents miss.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cursor
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Completeness:&lt;/strong&gt; ★★★★☆ Caught five of six endpoints; missed the webhook receiver because it was in a separate &lt;code&gt;routes/webhooks.js&lt;/code&gt; file not imported from the main router.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accuracy:&lt;/strong&gt; Solid on the endpoints it did catch. Cursor's strength is inline editing — it's fast and the output slots neatly into an existing docs file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure:&lt;/strong&gt; Very good if you already have a docs template. Cursor respects your existing format and fills it in. Without a template, the output is flat Markdown.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP-readiness:&lt;/strong&gt; Requires an intermediate step. Cursor's output needs to be imported into a documentation platform before it can power MCP tools. There's no native path from Cursor → hosted MCP server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Best for teams that already have a docs framework and want an agent to fill gaps. Weaker for greenfield documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Codex (OpenAI)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Completeness:&lt;/strong&gt; ★★★☆☆ Four of six endpoints. Missed the webhook receiver and merged two user endpoints into one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accuracy:&lt;/strong&gt; Mixed. Codex hallucinated a &lt;code&gt;PUT /users/:id/role&lt;/code&gt; endpoint that doesn't exist, and got the response shape of the auth endpoint wrong (listed &lt;code&gt;access_token&lt;/code&gt; instead of &lt;code&gt;token&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure:&lt;/strong&gt; The output read more like a comment block than a developer reference. Needed substantial editing before it was publishable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP-readiness:&lt;/strong&gt; Not applicable without further tooling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Codex is a strong code-generation tool but not yet a reliable documentation writer. Use it for logic, not for consumer-facing API reference.&lt;/p&gt;

&lt;h2&gt;
  
  
  What makes API docs agent-ready?
&lt;/h2&gt;

&lt;p&gt;The results reveal three things that separate good agent-written docs from bad ones:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Source reading depth.&lt;/strong&gt; Agents that only scan &lt;code&gt;index.js&lt;/code&gt; miss routes defined in sub-files. Claude Code follows imports; Cursor partially does; Codex largely doesn't.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type inference.&lt;/strong&gt; Without a TypeScript schema or explicit JSDoc, agents have to infer types from how variables are used. Claude Code does this well. The others default to &lt;code&gt;string&lt;/code&gt; for almost everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output structure.&lt;/strong&gt; Docs that go straight to a hosting platform (and then to an MCP server) need consistent structure — endpoint name, method, path, params with types, request body, response examples, auth. Freeform Markdown doesn't cut it.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The missing layer: getting from agent output to a live MCP server
&lt;/h2&gt;

&lt;p&gt;Even with Claude Code's strong output, there's a gap between "agent wrote the docs" and "those docs power an MCP server your users can connect to." That gap is a platform. &lt;a href="https://docstar.io" rel="noopener noreferrer"&gt;DocStar&lt;/a&gt; closes it. Paste one prompt in Claude Code, Cursor, or Codex — DocStar reads the output (or reads the source directly), structures it, and publishes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A hosted API docs site with a try-it playground&lt;/li&gt;
&lt;li&gt;An &lt;code&gt;llms.txt&lt;/code&gt; and markdown twin for LLM consumption&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;hosted MCP server&lt;/strong&gt; with three ready-made tools per API: &lt;code&gt;search_&lt;/code&gt;, &lt;code&gt;get_&lt;/code&gt;, and &lt;code&gt;call_&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A branded CLI and an OpenAPI 3 file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All kept in sync with your repo. No separate documentation editor. No OpenAPI file required upfront. MSG91 (&lt;a href="https://docs.msg91.com" rel="noopener noreferrer"&gt;docs.msg91.com&lt;/a&gt;) runs on DocStar today.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to do right now
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Pick your coding agent (Claude Code is the strongest for docs today).&lt;/li&gt;
&lt;li&gt;Run: &lt;em&gt;"Read this codebase and document the API."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Pipe the output into &lt;a href="https://docstar.io" rel="noopener noreferrer"&gt;DocStar&lt;/a&gt; — free plan, no credit card.&lt;/li&gt;
&lt;li&gt;Get a live docs site, &lt;code&gt;llms.txt&lt;/code&gt;, and hosted MCP server in minutes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your API should be readable by humans &lt;em&gt;and&lt;/em&gt; AI agents. Most APIs today are neither. Fix both in one step.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://docstar.io" rel="noopener noreferrer"&gt;docstar.io&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;DocStar publishes AI-first API docs, hosted MCP servers, and developer CLIs from one coding-agent prompt. Free to start.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>documentation</category>
      <category>mcp</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Why Your API Is Invisible to AI Assistants (And How to Fix It)</title>
      <dc:creator>Swayam Maheshwari</dc:creator>
      <pubDate>Wed, 28 Oct 2026 12:03:32 +0000</pubDate>
      <link>https://dev.to/swayam_maheshwari/why-your-api-is-invisible-to-ai-assistants-and-how-to-fix-it-3be6</link>
      <guid>https://dev.to/swayam_maheshwari/why-your-api-is-invisible-to-ai-assistants-and-how-to-fix-it-3be6</guid>
      <description>&lt;h1&gt;
  
  
  Why Your API Is Invisible to AI Assistants (And How to Fix It)
&lt;/h1&gt;

&lt;p&gt;Developers are integrating APIs differently now. They open Claude, Cursor, or ChatGPT, describe what they need, and expect the AI to find the right endpoint, read the contract, and generate working code. If your API is not explicitly structured for AI consumption, the assistant skips it and recommends a competitor that is. This is the AI discoverability gap. Most APIs have it. Here is what causes it and how to close it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The AI Discoverability Gap
&lt;/h2&gt;

&lt;p&gt;Search engines index text. AI assistants index &lt;em&gt;structured context&lt;/em&gt; — they need to know what an endpoint does, what parameters it accepts, what errors it returns, and how to authenticate. An HTML docs page is not enough. When a developer asks an AI assistant "how do I send an SMS via API?", the assistant pulls from whatever is in its context or can be retrieved via tools. If your API has no &lt;code&gt;llms.txt&lt;/code&gt;, no MCP server, and no machine-readable OpenAPI spec linked anywhere the assistant can reach, you are invisible. Mintlify, ReadMe, and Stoplight are all adding MCP endpoints right now. The race for AI discoverability is already underway.&lt;/p&gt;

&lt;h2&gt;
  
  
  What MCP Actually Is
&lt;/h2&gt;

&lt;p&gt;MCP stands for Model Context Protocol. It is an open protocol (originally from Anthropic, now adopted broadly) that lets AI assistants call external tools in a structured, safe, and authenticated way. Instead of copy-pasting your docs into a chat window, a developer connects their AI coding agent to your MCP server once. From that point on, the agent can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search your documentation in plain language&lt;/li&gt;
&lt;li&gt;Read the exact endpoint contract (methods, params, responses, auth)&lt;/li&gt;
&lt;li&gt;Make real API calls on behalf of the user&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of it as giving your API a direct line into every AI assistant your users already have open.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Three MCP Tools Every API Needs
&lt;/h2&gt;

&lt;p&gt;A well-structured MCP server exposes at least three tools:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;search_&amp;lt;api&amp;gt;_docs&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Plain-language search across your documentation. The agent types a question; your MCP returns the relevant sections. No hallucination, no guessing.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;get_&amp;lt;api&amp;gt;_api_docs&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Returns the exact endpoint contract: HTTP method, URL, path params, query params, request body schema, response schema, error codes, and examples. This is what the agent uses to generate correct code.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;code&gt;call_any_api_of_&amp;lt;api&amp;gt;&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Makes a real, authenticated request to your API on behalf of the user. OAuth-signed. No credentials in the chat window.&lt;/p&gt;

&lt;p&gt;These three tools cover discovery, reading, and execution — the full loop an AI agent needs to use your API without human hand-holding.&lt;/p&gt;

&lt;h2&gt;
  
  
  What &lt;code&gt;llms.txt&lt;/code&gt; Does — And Why It Matters
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;llms.txt&lt;/code&gt; is a plain-text file at the root of your docs site that tells AI systems what your product is, what endpoints exist, and how to read your documentation. It is to LLMs what &lt;code&gt;robots.txt&lt;/code&gt; is to crawlers. A minimal &lt;code&gt;llms.txt&lt;/code&gt; looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# MyAPI&lt;/span&gt;
&lt;span class="gt"&gt;&amp;gt; MyAPI lets you send SMS, email, and WhatsApp messages programmatically.&lt;/span&gt;

&lt;span class="gu"&gt;## Endpoints&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;Send SMS&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;/docs/sms/send&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="nv"&gt;Send Email&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;/docs/email/send&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="nv"&gt;Delivery Webhooks&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;/docs/webhooks&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="gu"&gt;## Authentication&lt;/span&gt;
Bearer token. Get yours at https://app.myapi.com/keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When an AI assistant is asked about messaging APIs, it can now find this file, understand your product scope immediately, and link to the right docs. Without it, you rely on the assistant having seen your site in its training data — which may be months out of date.&lt;/p&gt;

&lt;h2&gt;
  
  
  How DocStar Makes This Automatic
&lt;/h2&gt;

&lt;p&gt;Building and maintaining an MCP server, an &lt;code&gt;llms.txt&lt;/code&gt;, and an OpenAPI spec by hand is real engineering work. It goes stale every time the codebase changes. &lt;a href="https://docstar.io" rel="noopener noreferrer"&gt;DocStar&lt;/a&gt; automates the entire stack from a single agent prompt. You paste one instruction into Claude Code, Cursor, or Codex. The agent reads your codebase and DocStar publishes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A hosted docs site&lt;/strong&gt; with a try-it playground&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An MCP server&lt;/strong&gt; with the three tools above, on your own domain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;llms.txt&lt;/code&gt; and markdown twins&lt;/strong&gt; for AI indexing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An OpenAPI 3 file&lt;/strong&gt; for tooling compatibility&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A branded CLI&lt;/strong&gt; (&lt;code&gt;your-api mcp&lt;/code&gt; for local connections)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything stays in sync with GitHub. No documentation editor to learn. No OpenAPI file to write first. MSG91 (&lt;a href="https://docs.msg91.com" rel="noopener noreferrer"&gt;docs.msg91.com&lt;/a&gt;) uses DocStar in production — their MCP server is live and their docs are AI-readable today.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Do Today
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Check your discoverability&lt;/strong&gt; — ask Claude or ChatGPT: &lt;em&gt;"How do I use [your API name]?"&lt;/em&gt; If it guesses or refuses, you have a gap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add &lt;code&gt;llms.txt&lt;/code&gt;&lt;/strong&gt; — even a minimal file is better than none.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stand up an MCP server&lt;/strong&gt; — either build one or use a platform that generates it from your codebase.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep it in sync&lt;/strong&gt; — tie your docs pipeline to your CI/CD so docs update when code updates.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AI assistants are becoming the primary interface developers use to discover and integrate APIs. If your API is not structured for AI consumption, you are not just harder to use — you are invisible.&lt;/p&gt;

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