<?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: AI Prime Tech</title>
    <description>The latest articles on DEV Community by AI Prime Tech (@aiprimeclaudeapi).</description>
    <link>https://dev.to/aiprimeclaudeapi</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%2F4075335%2Fbc388075-0a09-49ae-b5d2-98ceb29fa480.png</url>
      <title>DEV Community: AI Prime Tech</title>
      <link>https://dev.to/aiprimeclaudeapi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aiprimeclaudeapi"/>
    <language>en</language>
    <item>
      <title>The best MCP servers for Claude Code (and the config that actually works)</title>
      <dc:creator>AI Prime Tech</dc:creator>
      <pubDate>Wed, 12 Aug 2026 23:11:58 +0000</pubDate>
      <link>https://dev.to/aiprimeclaudeapi/the-best-mcp-servers-for-claude-code-and-the-config-that-actually-works-1e4o</link>
      <guid>https://dev.to/aiprimeclaudeapi/the-best-mcp-servers-for-claude-code-and-the-config-that-actually-works-1e4o</guid>
      <description>&lt;p&gt;Model Context Protocol turns Claude Code from a code generator into something that can read your repo,&lt;br&gt;
query a database, drive a browser and file a PR. The catch is that most "MCP setup" posts stop at&lt;br&gt;
&lt;code&gt;filesystem&lt;/code&gt; and never mention the traps. Here's a config I actually run, plus the gotchas.&lt;/p&gt;
&lt;h2&gt;
  
  
  A &lt;code&gt;.mcp.json&lt;/code&gt; that earns its place
&lt;/h2&gt;

&lt;p&gt;Drop this in your repo root; Claude Code auto-detects it and asks you to trust it once.&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="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"filesystem"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&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="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@modelcontextprotocol/server-filesystem"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${workspaceFolder}"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"github"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&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="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@modelcontextprotocol/server-github"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"GITHUB_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"git"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"uvx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mcp-server-git"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"--repository"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${workspaceFolder}"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"fetch"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"uvx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mcp-server-fetch"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"playwright"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&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="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@playwright/mcp@latest"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Full pack with a postgres server and per-tool notes:&lt;br&gt;
&lt;a href="https://github.com/iskandaryv/anthropic-gateway-examples/tree/main/mcp" rel="noopener noreferrer"&gt;https://github.com/iskandaryv/anthropic-gateway-examples/tree/main/mcp&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  The gotchas that cost real time
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The trust prompt is a feature.&lt;/strong&gt; Claude Code refuses to load project MCP servers until you approve
them — per project. That's the security boundary, not a bug.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Give &lt;code&gt;postgres&lt;/code&gt; a read-only role.&lt;/strong&gt; An MCP server runs whatever SQL the model emits. A read-only
role makes a hallucinated &lt;code&gt;DROP&lt;/code&gt; physically impossible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scope the GitHub token.&lt;/strong&gt; &lt;code&gt;repo&lt;/code&gt; + &lt;code&gt;read:org&lt;/code&gt; is enough. Don't hand it an all-scopes classic PAT.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP output is context.&lt;/strong&gt; A 200-row query result or a full page fetch gets re-sent on the next
turn. Big tool outputs inflate token usage fast — the thing that makes agentic sessions expensive.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  It works the same through a gateway
&lt;/h2&gt;

&lt;p&gt;MCP wiring is independent of where model calls go. Whether Claude Code talks to the official API or an&lt;br&gt;
&lt;a href="https://claudeapikey.dev/learn/anthropic-compatible-api/" rel="noopener noreferrer"&gt;Anthropic-compatible gateway&lt;/a&gt;, the servers&lt;br&gt;
are configured identically — the gateway only changes &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt;, not &lt;code&gt;.mcp.json&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Start with filesystem + git + github; add browser/db only when a task needs them.&lt;/li&gt;
&lt;li&gt;Treat every server as an untrusted executor — least-privilege tokens, read-only DB roles.&lt;/li&gt;
&lt;li&gt;Watch token usage: tool results are the hidden cost of an agentic loop.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I run &lt;a href="https://claudeapikey.dev/" rel="noopener noreferrer"&gt;ClaudeAPIKey.dev&lt;/a&gt;, an Anthropic-compatible API&lt;br&gt;
gateway — mentioned above only because MCP config is unaffected by it. "Claude" is a trademark of&lt;br&gt;
Anthropic; we are not affiliated with Anthropic.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claude</category>
      <category>mcp</category>
      <category>ai</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Cutting Claude Code token costs: where the tokens actually go</title>
      <dc:creator>AI Prime Tech</dc:creator>
      <pubDate>Wed, 12 Aug 2026 23:10:54 +0000</pubDate>
      <link>https://dev.to/aiprimeclaudeapi/cutting-claude-code-token-costs-where-the-tokens-actually-go-2n9a</link>
      <guid>https://dev.to/aiprimeclaudeapi/cutting-claude-code-token-costs-where-the-tokens-actually-go-2n9a</guid>
      <description>&lt;p&gt;If you've run Claude Code for a full working day, you've seen the bill. Agentic loops are&lt;br&gt;
token-hungry in a way normal chat never is — every file read, every tool result, every diff lands in&lt;br&gt;
context and gets re-sent on the next turn. Here's where the tokens go and how to stop the leak.&lt;/p&gt;
&lt;h2&gt;
  
  
  Output tokens are the expensive ones
&lt;/h2&gt;

&lt;p&gt;On every frontier model, output tokens cost 4–5× input. A verbose model that "thinks out loud" in the&lt;br&gt;
final answer burns money faster than one that's concise. Cap &lt;code&gt;max_tokens&lt;/code&gt; deliberately, and prefer a&lt;br&gt;
model that answers tightly for routine work.&lt;/p&gt;

&lt;p&gt;Quick way to see the shape of a task's cost before you run it — this reads a live model catalog and&lt;br&gt;
prints per-model cost for the token counts you expect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 cost_estimate.py &lt;span class="nt"&gt;--in&lt;/span&gt; 20000 &lt;span class="nt"&gt;--out&lt;/span&gt; 2000
&lt;span class="c"&gt;# MODEL                CTX          COST (USD)&lt;/span&gt;
&lt;span class="c"&gt;# Claude Haiku 4.5     200K            $0.0120&lt;/span&gt;
&lt;span class="c"&gt;# Claude Sonnet 4.6    200K/1M         $0.0270&lt;/span&gt;
&lt;span class="c"&gt;# Claude Opus 4.8      200K            $0.0900&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(The script is in an open repo: &lt;a href="https://github.com/iskandaryv/anthropic-gateway-examples" rel="noopener noreferrer"&gt;https://github.com/iskandaryv/anthropic-gateway-examples&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  The four levers that actually move the bill
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Route by task.&lt;/strong&gt; Classification, extraction and routing don't need Opus — Haiku does them at a
fraction of the price. Reserve the flagship for reasoning-heavy work. Full comparison:
&lt;a href="https://claudeapikey.dev/learn/claude-api-models-compared/" rel="noopener noreferrer"&gt;all Claude models compared&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt caching.&lt;/strong&gt; Repeated system prompts and stable prefixes are re-read from cache at ~10% of
input price on supported endpoints. For agentic tools this is the single biggest lever.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trim context each turn.&lt;/strong&gt; Don't resend the whole transcript; keep the last few turns plus a
running summary. Unbounded context growth is what turns a $2 session into a $20 one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cap the loop.&lt;/strong&gt; Set a hard step limit on autonomous runs so a stuck agent can't spin forever.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The gotcha almost everyone hits
&lt;/h2&gt;

&lt;p&gt;If &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt; is set in your shell, Claude Code bills that key at API rates and &lt;strong&gt;silently&lt;br&gt;
ignores your Pro/Max subscription&lt;/strong&gt;. Unset it when you mean to use the subscription. (More setup&lt;br&gt;
traps in the &lt;a href="https://claudeapikey.dev/learn/claude-code-api-costs/" rel="noopener noreferrer"&gt;Claude Code API costs guide&lt;/a&gt;.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Watch output tokens, not prompt length — that's where the money is.&lt;/li&gt;
&lt;li&gt;Route cheap-first, escalate only when quality demands it.&lt;/li&gt;
&lt;li&gt;Turn on prompt caching for anything with a stable prefix.&lt;/li&gt;
&lt;li&gt;Estimate before you run; measure tokens in/out after.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I run &lt;a href="https://claudeapikey.dev/" rel="noopener noreferrer"&gt;ClaudeAPIKey.dev&lt;/a&gt;, an Anthropic-compatible API&lt;br&gt;
gateway, so read the pricing notes as coming from an interested party. The token-accounting advice&lt;br&gt;
above applies identically on the official API. "Claude" is a trademark of Anthropic; we are not&lt;br&gt;
affiliated with Anthropic.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claude</category>
      <category>ai</category>
      <category>api</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
