<?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: Yantrix</title>
    <description>The latest articles on DEV Community by Yantrix (@yantrix-ai).</description>
    <link>https://dev.to/yantrix-ai</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%2F3810817%2F4ff03d14-a1c6-4cf0-bc75-7d26d49d0e99.png</url>
      <title>DEV Community: Yantrix</title>
      <link>https://dev.to/yantrix-ai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yantrix-ai"/>
    <language>en</language>
    <item>
      <title>A one-line access check that silently checked nothing</title>
      <dc:creator>Yantrix</dc:creator>
      <pubDate>Thu, 27 Aug 2026 15:10:55 +0000</pubDate>
      <link>https://dev.to/yantrix-ai/a-one-line-access-check-that-silently-checked-nothing-36ah</link>
      <guid>https://dev.to/yantrix-ai/a-one-line-access-check-that-silently-checked-nothing-36ah</guid>
      <description>&lt;p&gt;&lt;strong&gt;What a real security review finds in a codebase that looked fine.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;We ran Yantrix cold against &lt;code&gt;shadcn-ui/taxonomy&lt;/code&gt; — a real, widely-used Next.js + Prisma + NextAuth reference application with almost 20,000 GitHub stars, no special access, no hints, exactly the way a customer's security team would approach a codebase they'd never seen before.&lt;/p&gt;

&lt;p&gt;Two functions handle deleting and editing a blog post:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;DELETE&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;verifyCurrentUserHasAccessToPost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;postId&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;403&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;postId&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;This looks correct. There's a dedicated function, named exactly what it does, called before every mutation. A reviewer skimming this file would move on.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's actually inside the check
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;verifyCurrentUserHasAccessToPost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;postId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getServerSession&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;authOptions&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;count&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;postId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;authorId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When there's no active session, &lt;code&gt;session?.user.id&lt;/code&gt; evaluates to &lt;code&gt;undefined&lt;/code&gt;. Prisma's query engine treats a field set to &lt;code&gt;undefined&lt;/code&gt; in a &lt;code&gt;where&lt;/code&gt; clause as &lt;em&gt;"this field wasn't specified"&lt;/em&gt; — not &lt;em&gt;"match nothing."&lt;/em&gt; The query that actually runs is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;count&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;postId&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;The ownership check is gone. If the post exists at all, &lt;code&gt;count&lt;/code&gt; comes back &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;count &amp;gt; 0&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, and an unauthenticated request is told it has access to someone else's post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this one is worth naming specifically
&lt;/h2&gt;

&lt;p&gt;Every field in this function reads as intentional access control — the name, the placement, the shape of the check. Nothing about it looks like a gap. The failure is entirely in what one ORM does with one specific value, which happens to be the opposite of what the code visibly appears to be checking for. It's exactly the kind of finding that survives a normal code review, because a normal code review is reading for intent, and the intent here was correct — the implementation just didn't do what it looks like it does.&lt;/p&gt;

&lt;p&gt;This is also not a one-off. The same shape — a field derived from an optional session, dropped straight into a &lt;code&gt;where&lt;/code&gt; clause with no guard in front of it — is common enough across Next.js + Prisma codebases that it's worth a deliberate check for, not something to catch by accident.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part worth being honest about
&lt;/h2&gt;

&lt;p&gt;This exact bug class turned out to be hard for general-purpose AI reasoning to catch reliably, even for a capable model given the whole file. Across repeated real runs, it required the model to already know a narrow, specific fact about Prisma's own behavior — not a security concept, an ORM implementation detail. When that fact wasn't already primed, the model looked at the code and reasonably concluded the check was fine.&lt;/p&gt;

&lt;p&gt;That's the finding that shaped how this is built: this specific pattern is now caught by a deterministic check, not left to chance on whether reasoning happens to recall the right ORM trivia in the moment. Some things need a model that can reason about intent. Some things need a narrow, permanent, always-on check that doesn't forget. Knowing which is which — and building both — is the actual engineering problem, not just running an LLM over a diff.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for a codebase getting ready for scrutiny
&lt;/h2&gt;

&lt;p&gt;A vendor security review, an enterprise procurement questionnaire, or acquisition due diligence isn't looking for typos. It's looking for exactly this shape of thing — code that reads correctly and isn't. The value isn't in flagging more issues. It's in finding the ones that would actually surface when someone official is looking, before they do.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Full methodology — 21 real codebases, 17 risk categories, verified ground-truth recall — at &lt;a href="https://yantrix.ai" rel="noopener noreferrer"&gt;yantrix.ai&lt;/a&gt;. The repository's owner has closed both issues and pull requests on this project — respected here rather than worked around. The fix shown above is preserved as a public commit at &lt;a href="https://github.com/yantrix-ai/taxonomy/commit/c7d0c92" rel="noopener noreferrer"&gt;yantrix-ai/taxonomy&lt;/a&gt;, for anyone who wants to verify it directly.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>nextjs</category>
      <category>prisma</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I built a 58-tool MCP server where AI agents pay per call in USDC — here's how</title>
      <dc:creator>Yantrix</dc:creator>
      <pubDate>Wed, 25 Mar 2026 20:18:04 +0000</pubDate>
      <link>https://dev.to/yantrix-ai/i-built-a-58-tool-mcp-server-where-ai-agents-pay-per-call-in-usdc-heres-how-e4n</link>
      <guid>https://dev.to/yantrix-ai/i-built-a-58-tool-mcp-server-where-ai-agents-pay-per-call-in-usdc-heres-how-e4n</guid>
      <description>&lt;p&gt;For the past few weeks I've been building Yantrix — an agent-native API network where every tool call costs fractions of a cent in USDC, settled automatically on Base mainnet via x402.&lt;br&gt;
Today it hit 58 tools and I want to share what I learned.&lt;/p&gt;

&lt;p&gt;What is x402?&lt;br&gt;
x402 is an emerging standard that revives the HTTP 402 "Payment Required" status code. When an agent calls a paid endpoint without payment, it gets back a 402 with instructions on how to pay. An x402-enabled client automatically signs a USDC microtransaction and retries — no credit cards, no API key billing, no invoices.&lt;br&gt;
The economics: $0.001 per call. Agents can autonomously consume APIs and pay for them. No human in the loop.&lt;/p&gt;

&lt;p&gt;What Yantrix covers&lt;br&gt;
The 58 tools span 7 service groups:&lt;br&gt;
Crypto — real-time price, trading signals, deep analysis, AI reports&lt;br&gt;
Finance — stocks, company profiles, financials, forex, market overview&lt;br&gt;
Web Extract — clean text, metadata, contacts, PDF, structured data, AI summaries&lt;br&gt;
India Business — GST lookup, MCA21/CIN, business enrichment (this is a real gap in the market)&lt;br&gt;
Agent Utility — Indic script transliteration (9 scripts), IFSC lookup, phone validation, timezone, pincode&lt;br&gt;
Agent Registry — register agents with capabilities and DIDs, discover other agents&lt;br&gt;
Agent Session — stateful workflow sessions with spend caps and call tracking&lt;/p&gt;

&lt;p&gt;The architecture that makes it work&lt;br&gt;
Each service is a single Python file. FastAPI + asyncpg + eth-account. Deployed on Railway. Here's the full pattern:&lt;br&gt;
python# Single-file Railway service — no core/ dependency hell&lt;br&gt;
import os, asyncpg&lt;br&gt;
from fastapi import FastAPI&lt;br&gt;
from contextlib import asynccontextmanager&lt;/p&gt;

&lt;p&gt;DATABASE_URL = os.getenv("DATABASE_URL")&lt;br&gt;
PORT = int(os.getenv("PORT", 8000))&lt;/p&gt;

&lt;p&gt;_pool = None&lt;/p&gt;

&lt;p&gt;async def get_pool():&lt;br&gt;
    global _pool&lt;br&gt;
    if _pool is None and DATABASE_URL:&lt;br&gt;
        _pool = await asyncpg.create_pool(DATABASE_URL, min_size=1, max_size=10)&lt;br&gt;
    return _pool&lt;/p&gt;

&lt;p&gt;@asynccontextmanager&lt;br&gt;
async def lifespan(app):&lt;br&gt;
    await run_migrations()&lt;br&gt;
    yield&lt;br&gt;
    if _pool: await _pool.close()&lt;/p&gt;

&lt;p&gt;app = FastAPI(lifespan=lifespan)&lt;/p&gt;

&lt;p&gt;if &lt;strong&gt;name&lt;/strong&gt; == "&lt;strong&gt;main&lt;/strong&gt;":&lt;br&gt;
    import uvicorn&lt;br&gt;
    uvicorn.run("main:app", host="0.0.0.0", port=PORT)&lt;br&gt;
Key lesson: self-contained single files deploy reliably. I wasted days trying to share a core/ library across services in a monorepo. Railway builds each service in isolation — relative paths break. Single file = no path issues.&lt;/p&gt;

&lt;p&gt;TrustLayer — every response is ECDSA signed&lt;br&gt;
This is the part I'm most proud of. Every API response includes a _trust envelope:&lt;br&gt;
json{&lt;br&gt;
  "data": { ... },&lt;br&gt;
  "_trust": {&lt;br&gt;
    "call_id": "ytx_abc123",&lt;br&gt;
    "endpoint": "/v1/agents/register",&lt;br&gt;
    "payload_hash": "sha256:def456...",&lt;br&gt;
    "timestamp": 1711234567,&lt;br&gt;
    "signer": "0x41A024...",&lt;br&gt;
    "signature": "0x3ad7f1..."&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
Agents can verify this signature cryptographically:&lt;br&gt;
pythonfrom eth_account import Account&lt;br&gt;
from eth_account.messages import encode_defunct&lt;/p&gt;

&lt;p&gt;message = f"{call_id}:{endpoint}:sha256:{payload_hash}:{timestamp}"&lt;br&gt;
msg = encode_defunct(text=message)&lt;br&gt;
recovered = Account.recover_message(msg, signature=signature)&lt;br&gt;
assert recovered.lower() == expected_signer.lower()&lt;br&gt;
No other API marketplace does this. When an agent makes a decision based on data from Yantrix, there's cryptographic proof of what data it was given.&lt;/p&gt;

&lt;p&gt;The MCP server is dynamic&lt;br&gt;
Instead of hardcoding 58 tools in a TypeScript file, the MCP server fetches a registry JSON at startup:&lt;br&gt;
typescriptconst REGISTRY_URL = "&lt;a href="https://registry.yantrix.ai/mcp-registry.json" rel="noopener noreferrer"&gt;https://registry.yantrix.ai/mcp-registry.json&lt;/a&gt;";&lt;/p&gt;

&lt;p&gt;// On startup, fetch all tools dynamically&lt;br&gt;
const registry = await fetch(REGISTRY_URL).then(r =&amp;gt; r.json());&lt;br&gt;
// New APIs appear automatically on next host restart&lt;br&gt;
This means adding a new API requires zero npm publishes. Update the registry JSON, done.&lt;/p&gt;

&lt;p&gt;Agent Registry — agents registering themselves&lt;br&gt;
The newest addition is an agent registry where AI agents can register their own capabilities:&lt;br&gt;
bashcurl -X POST &lt;a href="https://agent-registry.yantrix.ai/v1/agents/register" rel="noopener noreferrer"&gt;https://agent-registry.yantrix.ai/v1/agents/register&lt;/a&gt; \&lt;br&gt;
  -H "Content-Type: application/json" \&lt;br&gt;
  -d '{&lt;br&gt;
    "name": "GSTIN Intelligence Agent",&lt;br&gt;
    "endpoint_url": "&lt;a href="https://my-agent.railway.app" rel="noopener noreferrer"&gt;https://my-agent.railway.app&lt;/a&gt;",&lt;br&gt;
    "wallet_address": "0x...",&lt;br&gt;
    "capabilities": [{&lt;br&gt;
      "name": "gstin_lookup",&lt;br&gt;
      "category": "data_enrichment",&lt;br&gt;
      "price_usdc": 0.001&lt;br&gt;
    }]&lt;br&gt;
  }'&lt;br&gt;
Returns an agent_id and a W3C DID (did:yantrix:). Other agents can discover it:&lt;br&gt;
bashGET /v1/agents/?capability=gstin_lookup&amp;amp;status=active&lt;br&gt;
This is the foundation for agent-to-agent commerce — Relay, the next layer I'm building.&lt;/p&gt;

&lt;p&gt;Agent Session — tracking multi-step workflows&lt;br&gt;
For workflows that make multiple API calls, sessions track everything:&lt;br&gt;
bash# Create session with $1 spend cap&lt;br&gt;
POST /v1/sessions/&lt;br&gt;
{"ttl_seconds": 3600, "max_spend_usdc": 1.0}&lt;/p&gt;

&lt;h1&gt;
  
  
  Record each call
&lt;/h1&gt;

&lt;p&gt;POST /v1/sessions/{id}/calls&lt;br&gt;
{"service": "udbavam", "endpoint": "/v1/gstin", "price_usdc": 0.002}&lt;/p&gt;

&lt;h1&gt;
  
  
  Get analytics
&lt;/h1&gt;

&lt;p&gt;GET /v1/sessions/{id}/analytics&lt;/p&gt;

&lt;h1&gt;
  
  
  → {total_calls: 47, total_spend_usdc: 0.094, success_rate: 97.8}
&lt;/h1&gt;

&lt;p&gt;Sessions auto-abort if the spend cap is hit. No surprise charges.&lt;/p&gt;

&lt;p&gt;How to use it&lt;br&gt;
Install the MCP server:&lt;br&gt;
bashnpx @yantrixai/mcp&lt;br&gt;
Or add to Claude Desktop:&lt;br&gt;
json{&lt;br&gt;
  "mcpServers": {&lt;br&gt;
    "yantrix": {&lt;br&gt;
      "command": "npx",&lt;br&gt;
      "args": ["@yantrixai/mcp"]&lt;br&gt;
    }&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
All 58 tools are available immediately. Paid tools return a x402_payment_required response until you configure an x402-enabled wallet.&lt;br&gt;
Full API reference: &lt;a href="https://yantrix.ai/llms.txt" rel="noopener noreferrer"&gt;https://yantrix.ai/llms.txt&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What's next&lt;br&gt;
Yantrix Relay — agent-to-agent micropayment mesh. When Agent A needs something Agent B offers, Yantrix brokers and settles in USDC. I take 2-5% of every settlement. Currently building the Capability Discovery and Settlement Record services.&lt;br&gt;
TrustLayer Protocol — spinning out the ECDSA signing as an open standard. Any API provider can implement it. trustlayer-verify npm package coming soon.&lt;/p&gt;

&lt;p&gt;If you're building with AI agents and want to try x402 micropayments, the registry is at &lt;a href="https://registry.yantrix.ai/mcp-registry.json" rel="noopener noreferrer"&gt;https://registry.yantrix.ai/mcp-registry.json&lt;/a&gt; and everything is open at &lt;a href="https://github.com/yantrix-ai" rel="noopener noreferrer"&gt;https://github.com/yantrix-ai&lt;/a&gt;.&lt;br&gt;
Happy to answer questions about the x402 implementation, the Railway single-file pattern, or the agent registry design.&lt;/p&gt;

&lt;p&gt;Tags: #ai #python #web3 #agents #mcp #x402 #blockchain #api[]&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>web3</category>
      <category>agents</category>
    </item>
    <item>
      <title>Built 17 x402-gated APIs + a dynamic MCP package as a solo indie dev — here's everything</title>
      <dc:creator>Yantrix</dc:creator>
      <pubDate>Sat, 21 Mar 2026 11:49:11 +0000</pubDate>
      <link>https://dev.to/yantrix-ai/built-17-x402-gated-apis-a-dynamic-mcp-package-as-a-solo-indie-dev-heres-everything-4p1p</link>
      <guid>https://dev.to/yantrix-ai/built-17-x402-gated-apis-a-dynamic-mcp-package-as-a-solo-indie-dev-heres-everything-4p1p</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;Over the past few weeks I shipped 17 production APIs — all x402/USDC micropayment gated, &lt;br&gt;
all MCP compatible, all deployed on Railway under my own domain &lt;code&gt;yantrix.ai&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here's the full list:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;API&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;groundtruth.yantrix.ai&lt;/td&gt;
&lt;td&gt;Fact verification for agents&lt;/td&gt;
&lt;td&gt;$0.002–$0.020&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;memex.yantrix.ai&lt;/td&gt;
&lt;td&gt;Persistent agent memory&lt;/td&gt;
&lt;td&gt;$0.001–$0.005&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;indic.yantrix.ai&lt;/td&gt;
&lt;td&gt;Indian language NLP (9 scripts)&lt;/td&gt;
&lt;td&gt;$0.001–$0.008&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;contractscan.yantrix.ai&lt;/td&gt;
&lt;td&gt;Contract risk analysis&lt;/td&gt;
&lt;td&gt;$0.005–$0.025&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;threatmodel.yantrix.ai&lt;/td&gt;
&lt;td&gt;STRIDE threat modelling&lt;/td&gt;
&lt;td&gt;$0.005–$0.025&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;signal.yantrix.ai&lt;/td&gt;
&lt;td&gt;AI trend intelligence&lt;/td&gt;
&lt;td&gt;$0.005–$0.020&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;compwatch.yantrix.ai&lt;/td&gt;
&lt;td&gt;Competitor intelligence&lt;/td&gt;
&lt;td&gt;$0.010–$0.020&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;examforge.yantrix.ai&lt;/td&gt;
&lt;td&gt;Exam generator&lt;/td&gt;
&lt;td&gt;$0.005–$0.020&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;voiceprint.yantrix.ai&lt;/td&gt;
&lt;td&gt;Writing style transfer&lt;/td&gt;
&lt;td&gt;$0.003–$0.010&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;papertrail.yantrix.ai&lt;/td&gt;
&lt;td&gt;Indian regulatory intel&lt;/td&gt;
&lt;td&gt;$0.003–$0.015&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ratelord.yantrix.ai&lt;/td&gt;
&lt;td&gt;Rate limit coordinator&lt;/td&gt;
&lt;td&gt;$0.0005–$0.001&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;heatmap.yantrix.ai&lt;/td&gt;
&lt;td&gt;API usage analytics&lt;/td&gt;
&lt;td&gt;$0.0001–$0.015&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;debateclub.yantrix.ai&lt;/td&gt;
&lt;td&gt;Argument generator&lt;/td&gt;
&lt;td&gt;$0.003–$0.010&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;callsight.yantrix.ai&lt;/td&gt;
&lt;td&gt;Sales call intelligence&lt;/td&gt;
&lt;td&gt;$0.010–$0.025&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;phonevalidator.yantrix.ai&lt;/td&gt;
&lt;td&gt;Global phone validation&lt;/td&gt;
&lt;td&gt;$0.001&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ifsclookup.yantrix.ai&lt;/td&gt;
&lt;td&gt;Indian bank IFSC lookup&lt;/td&gt;
&lt;td&gt;$0.001&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;timezonedetective.yantrix.ai&lt;/td&gt;
&lt;td&gt;Timezone detection&lt;/td&gt;
&lt;td&gt;$0.001–$0.002&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  What is x402?
&lt;/h2&gt;

&lt;p&gt;x402 is an open payment protocol by Coinbase built on HTTP 402 "Payment Required". &lt;br&gt;
Instead of API keys and billing dashboards, agents pay per call using USDC on Base. &lt;br&gt;
No accounts. No monthly invoices. Just pay and get the resource.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent calls API → gets 402 with payment terms → pays USDC → gets response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The MCP package
&lt;/h2&gt;

&lt;p&gt;Instead of building a static MCP server, I built a &lt;strong&gt;dynamic&lt;/strong&gt; one.&lt;/p&gt;

&lt;p&gt;The package fetches its tool list from a live registry at startup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @praveen030686/yantrix-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When I add a new API, I update one JSON file on the server. All users get the &lt;br&gt;
new tool automatically on next restart. No npm republish ever needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding a new API takes 10 lines
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# In mcp-registry/main.py, add to TOOLS list:
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;new_tool&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;service&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;newapi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;endpoint&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://newapi.yantrix.ai/endpoint&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;method&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;POST&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;description&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What it does.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;input_schema&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{...},&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cost_usdc&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0.005&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;category&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;category&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;# git push → Railway redeploys → users get new tool automatically
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tech stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; FastAPI (Python 3.11)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payments:&lt;/strong&gt; x402 + USDC on Base Mainnet
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt; Claude API (Sonnet + Haiku)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment:&lt;/strong&gt; Railway (one service per API)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP:&lt;/strong&gt; TypeScript MCP SDK&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain:&lt;/strong&gt; Spaceship + custom subdomains per API&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Claude Desktop config
&lt;/h2&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;"yantrix"&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;"@praveen030686/yantrix-mcp"&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;"DEV_MODE"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"true"&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;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;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;npm: &lt;code&gt;npx @praveen030686/yantrix-mcp&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/praveen030686/yantrix-mcp" rel="noopener noreferrer"&gt;https://github.com/praveen030686/yantrix-mcp&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Registry: &lt;a href="https://registry.yantrix.ai" rel="noopener noreferrer"&gt;https://registry.yantrix.ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Building in public. Happy to answer questions.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>web3</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>I Built 3 APIs With 22 Paid Endpoints That AI Agents Pay For Automatically — Here's How (x402 + USDC on Base)</title>
      <dc:creator>Yantrix</dc:creator>
      <pubDate>Sun, 08 Mar 2026 07:50:58 +0000</pubDate>
      <link>https://dev.to/yantrix-ai/i-built-3-apis-with-22-paid-endpoints-that-ai-agents-pay-for-automatically-heres-how-x402--22oa</link>
      <guid>https://dev.to/yantrix-ai/i-built-3-apis-with-22-paid-endpoints-that-ai-agents-pay-for-automatically-heres-how-x402--22oa</guid>
      <description>&lt;p&gt;Liquid syntax error: 'raw' tag was never closed&lt;/p&gt;
</description>
      <category>webdev</category>
      <category>ai</category>
      <category>cryptocurrency</category>
      <category>x402</category>
    </item>
    <item>
      <title>How I Built a Crypto Data API That AI Agents Pay For (x402 + Express.js</title>
      <dc:creator>Yantrix</dc:creator>
      <pubDate>Sat, 07 Mar 2026 02:20:10 +0000</pubDate>
      <link>https://dev.to/yantrix-ai/how-i-built-a-crypto-data-api-that-ai-agents-pay-for-x402-expressjs-723</link>
      <guid>https://dev.to/yantrix-ai/how-i-built-a-crypto-data-api-that-ai-agents-pay-for-x402-expressjs-723</guid>
      <description>&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;A crypto data enrichment API where AI agents pay USDC micropayments per request on Base mainnet.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Traditional APIs need subscriptions, API keys, billing systems. AI agents can't sign up for accounts autonomously.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;x402 protocol — agents discover my API, pay $0.01-$0.10 USDC per request, get data instantly. No signup, no API keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Endpoints
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;/api/v1/price/{symbol} → $0.01 — real-time price data&lt;/li&gt;
&lt;li&gt;/api/v1/signal/{symbol} → $0.05 — BUY/HOLD/SELL trading signal&lt;/li&gt;
&lt;li&gt;/api/v1/deep-analysis/{symbol} → $0.10 — full analysis with risk assessment&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Express.js + @x402/express&lt;/li&gt;
&lt;li&gt;@coinbase/x402 for CDP facilitator auth&lt;/li&gt;
&lt;li&gt;USDC on Base (eip155:8453)&lt;/li&gt;
&lt;li&gt;Deployed on Railway ($5/month)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Agent requests data&lt;/li&gt;
&lt;li&gt;Server returns HTTP 402 with payment instructions&lt;/li&gt;
&lt;li&gt;Agent signs USDC transfer, retries with payment proof&lt;/li&gt;
&lt;li&gt;Server verifies via CDP facilitator, returns data&lt;/li&gt;
&lt;li&gt;USDC lands in my wallet&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;API: &lt;a href="https://crypto-enrich.up.railway.app" rel="noopener noreferrer"&gt;https://crypto-enrich.up.railway.app&lt;/a&gt;&lt;br&gt;
MCP config: &lt;a href="https://crypto-enrich.up.railway.app/.well-known/mcp.json" rel="noopener noreferrer"&gt;https://crypto-enrich.up.railway.app/.well-known/mcp.json&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost to Build
&lt;/h2&gt;

&lt;p&gt;$5/month hosting. That's it. 88-90% profit margins.&lt;/p&gt;

</description>
      <category>x402</category>
      <category>cryptocurrency</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
