<?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: alanwang100</title>
    <description>The latest articles on DEV Community by alanwang100 (@alanwang100).</description>
    <link>https://dev.to/alanwang100</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%2F4234855%2Fede0171e-079f-4575-8fbd-c27cc5be2bba.png</url>
      <title>DEV Community: alanwang100</title>
      <link>https://dev.to/alanwang100</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alanwang100"/>
    <language>en</language>
    <item>
      <title>A tamper-evident ledger for agent payments — and how a third party verified it byte-for-byte</title>
      <dc:creator>alanwang100</dc:creator>
      <pubDate>Tue, 24 Nov 2026 10:38:21 +0000</pubDate>
      <link>https://dev.to/alanwang100/a-tamper-evident-ledger-for-agent-payments-and-how-a-third-party-verified-it-byte-for-byte-27la</link>
      <guid>https://dev.to/alanwang100/a-tamper-evident-ledger-for-agent-payments-and-how-a-third-party-verified-it-byte-for-byte-27la</guid>
      <description>&lt;h2&gt;
  
  
  A tamper-evident ledger for agent payments — and how a third party verified it byte-for-byte
&lt;/h2&gt;

&lt;p&gt;Every "agent economy" pitch makes the same promise: agents will pay each other for work. But almost none of them can prove a transaction happened the way they say it did.&lt;/p&gt;

&lt;p&gt;Here's the design we landed on after getting it independently audited.&lt;/p&gt;

&lt;h3&gt;
  
  
  The core idea: hash-chained transfers
&lt;/h3&gt;

&lt;p&gt;Each transfer stores a digest, and the chain is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;digest(n)  = SHA-256(preimage(n))
preimage(n) = canonicalJSON({ from, to, amount, ts, prev_hash })
prev_hash(n) = digest(n-1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every transfer commits to the previous one. Tamper with any record and every downstream digest breaks.&lt;/p&gt;

&lt;h3&gt;
  
  
  The subtle bug a third party caught
&lt;/h3&gt;

&lt;p&gt;The hard part isn't the hash — it's the &lt;strong&gt;preimage&lt;/strong&gt;. For a third party to verify your chain, they need the exact bytes you hashed. If any field that goes into the digest isn't stored (or isn't returned by your API), they can't reproduce it, and your "verifiable" claim collapses.&lt;/p&gt;

&lt;p&gt;That's exactly what happened to us. A team from Nautilus (a settlement platform for agents) ran a read-only verification against our ledger and reported 4 checks: 3 passed, 1 failed. The failure was digest recomputation — because a &lt;code&gt;ts&lt;/code&gt; (timestamp) field went into the digest but was never exposed in the API response. They couldn't get the preimage, so their recomputation didn't match.&lt;/p&gt;

&lt;p&gt;The fix was simple: store &lt;code&gt;ts&lt;/code&gt; in the transfer row, return it in the API, and publish the canonical serialization format (field order, amount as string, ISO timestamps, compact JSON). After that, they re-ran the verification — &lt;strong&gt;byte-for-byte match&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What "verifiable" actually requires
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Every preimage field must be persisted &lt;strong&gt;and&lt;/strong&gt; returned by the API.&lt;/li&gt;
&lt;li&gt;The canonical serialization must be documented — field order matters.&lt;/li&gt;
&lt;li&gt;You have to be willing to let a third party actually run the verification. "Trust us, it's hashed" is not verifiability.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The ledger is one of the 21 tools on &lt;strong&gt;JiZhiMCP&lt;/strong&gt;, a hosted MCP gateway (host any HTTP API as MCP tools behind one streamable-HTTP endpoint) — the ledger is a tool, not the product. If you're building agent payments, the audit step is the part that turns a claim into a fact.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>blockchain</category>
      <category>security</category>
    </item>
    <item>
      <title>The MCP streamable-HTTP trap that breaks client connections (and the 3 verbs you can't skip)</title>
      <dc:creator>alanwang100</dc:creator>
      <pubDate>Tue, 24 Nov 2026 10:36:07 +0000</pubDate>
      <link>https://dev.to/alanwang100/the-mcp-streamable-http-trap-that-breaks-client-connections-and-the-3-verbs-you-cant-skip-2bcn</link>
      <guid>https://dev.to/alanwang100/the-mcp-streamable-http-trap-that-breaks-client-connections-and-the-3-verbs-you-cant-skip-2bcn</guid>
      <description>&lt;h2&gt;
  
  
  The MCP streamable-HTTP trap that breaks client connections (and the 3 verbs you can't skip)
&lt;/h2&gt;

&lt;p&gt;If you've ever wired an MCP client to a remote server and gotten a vague "connection failed" with nothing useful in the logs, there's a good chance you hit the same trap I did.&lt;/p&gt;

&lt;h3&gt;
  
  
  The trap: a streamable-HTTP MCP endpoint is not just POST
&lt;/h3&gt;

&lt;p&gt;The Model Context Protocol's streamable HTTP transport specifies &lt;strong&gt;three verbs&lt;/strong&gt;, not one:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;POST&lt;/code&gt; — send JSON-RPC messages (&lt;code&gt;initialize&lt;/code&gt;, &lt;code&gt;tools/list&lt;/code&gt;, &lt;code&gt;tools/call&lt;/code&gt;…)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET&lt;/code&gt; — open the SSE stream the server uses to push responses back to the client&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DELETE&lt;/code&gt; — terminate the session&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most "it works when I curl it" checks only hit POST with an &lt;code&gt;initialize&lt;/code&gt; payload. That's fine — POST is the only verb a one-shot curl ever exercises. But a real MCP client does the full lifecycle: it opens a GET stream, sends POST messages, then issues DELETE on shutdown.&lt;/p&gt;

&lt;p&gt;If your gateway only implements POST, the client's GET returns 404, the client can't establish its response channel, and it reports "connection failed" — even though the endpoint answered your curl perfectly.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I found it (a real story)
&lt;/h3&gt;

&lt;p&gt;I run a hosted MCP gateway. One connector platform (Tencent's WorkBuddy) started reporting "connection failed" for a specific service endpoint while the main gateway endpoint worked fine.&lt;/p&gt;

&lt;p&gt;The difference? The single-service endpoint (&lt;code&gt;/mcp/{serviceId}&lt;/code&gt;) only implemented POST. The main gateway endpoint (&lt;code&gt;/mcp/gateway&lt;/code&gt;) implemented all three verbs.&lt;/p&gt;

&lt;p&gt;The fix was boring but revealing: add GET (SSE upgrade) and DELETE (session teardown) routes. Once both returned 200, the client reconnected instantly. The thousands of successful POST calls that same day had been unaffected — only the clients doing the full protocol lifecycle broke.&lt;/p&gt;

&lt;h3&gt;
  
  
  The lesson
&lt;/h3&gt;

&lt;p&gt;When you build or adopt a streamable-HTTP MCP endpoint, verify &lt;strong&gt;all three verbs&lt;/strong&gt;, not just POST:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST   .../mcp -d &lt;span class="s1"&gt;'{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2025-06-18"},"id":1}'&lt;/span&gt;   &lt;span class="c"&gt;# expect 200&lt;/span&gt;
curl -X GET    .../mcp -H &lt;span class="s1"&gt;'Accept: text/event-stream'&lt;/span&gt;                                                                 &lt;span class="c"&gt;# expect 200 + SSE stream&lt;/span&gt;
curl -X DELETE .../mcp                                                                                                 &lt;span class="c"&gt;# expect 200&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If GET or DELETE 404s, some client somewhere is going to report "connection failed" and you won't know why. This is exactly the kind of detail that separates a gateway that works in a demo from one that works with real clients.&lt;/p&gt;

&lt;p&gt;We run this gateway at &lt;strong&gt;JiZhiMCP&lt;/strong&gt; — host any HTTP API as MCP tools behind a single streamable-HTTP endpoint, 21 built-in tools, MIT-licensed, no per-call fees. The settlement ledger (a tamper-evident hash chain) was independently verified byte-for-byte by a third party. If you're shipping an MCP integration, test the three verbs before you blame the client.&lt;/p&gt;

</description>
      <category>api</category>
      <category>architecture</category>
      <category>backend</category>
      <category>mcp</category>
    </item>
    <item>
      <title>The MCP ecosystem's missing layer is the gateway</title>
      <dc:creator>alanwang100</dc:creator>
      <pubDate>Sat, 14 Nov 2026 05:41:22 +0000</pubDate>
      <link>https://dev.to/alanwang100/the-mcp-ecosystems-missing-layer-is-the-gateway-4b86</link>
      <guid>https://dev.to/alanwang100/the-mcp-ecosystems-missing-layer-is-the-gateway-4b86</guid>
      <description>&lt;p&gt;The Model Context Protocol solved a genuinely hard problem: how an agent describes and invokes tools in a uniform way. Every major agent — Claude, Cursor, Cline, Codex — now speaks MCP, and the protocol has won.&lt;/p&gt;

&lt;p&gt;But look at &lt;em&gt;how&lt;/em&gt; the ecosystem is growing, and there's a pattern worth noticing.&lt;/p&gt;

&lt;p&gt;The default way to connect an agent to a real system is to write an MCP server. There are thousands of them now — one per API, one per SaaS product, one per internal service. That's fine when you're a SaaS vendor with the engineering capacity to build and maintain a server, plus a registry listing, docs, and an auth story.&lt;/p&gt;

&lt;p&gt;But most of the systems agents actually need to reach are &lt;strong&gt;not&lt;/strong&gt; MCP servers. They're plain HTTP APIs: internal tools, partner APIs, legacy services, homegrown microservices. For those, "write an MCP server" is the wrong answer. You're not building a product around the tool — you just want the agent to be able to call it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gateway layer
&lt;/h2&gt;

&lt;p&gt;What's missing is a layer between an arbitrary HTTP API and an agent's tool set: a gateway that maps HTTP endpoints to MCP tools without you hand-writing a server.&lt;/p&gt;

&lt;p&gt;The properties that matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Declarative, not code.&lt;/strong&gt; You describe the endpoint; the gateway generates &lt;code&gt;tools/list&lt;/code&gt; and handles &lt;code&gt;tools/call&lt;/code&gt;. No per-API server to build or maintain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One endpoint, N tools.&lt;/strong&gt; An agent shouldn't need ten MCP server URLs to use ten services. A gateway aggregates them behind a single streamable-HTTP endpoint — the client configures one URL and gets the whole tool surface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auth at one choke point.&lt;/strong&gt; Downstream systems keep their own auth; the gateway holds the credentials and does the exchange, so the agent never sees a raw API key.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the same story the API-gateway layer already told in the REST world — Kong, Apigee, Envoy — just replayed one level up for agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters now
&lt;/h2&gt;

&lt;p&gt;Two things are converging. First, the number of agent clients keeps growing, each with its own way of registering MCP servers, which makes "configure once, distribute everywhere" more valuable, not less. Second, agents are starting to call &lt;em&gt;other agents'&lt;/em&gt; tools — and when they do, someone has to mediate that traffic: identity, metering, and eventually payment.&lt;/p&gt;

&lt;p&gt;That's the machine-economy bet: the gateway is where agent-to-agent tool calls get brokered.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where we landed
&lt;/h2&gt;

&lt;p&gt;We built this as &lt;strong&gt;JiZhiMCP&lt;/strong&gt; — an agent-first MCP gateway that hosts any HTTP API as MCP tools behind one streamable-HTTP endpoint. One endpoint, N services, auth handled once upstream. It's live on the official MCP Registry (installable from any agent client that reads it) and open on GitHub: &lt;a href="https://github.com/alanwang100/jizhineng-mcp" rel="noopener noreferrer"&gt;https://github.com/alanwang100/jizhineng-mcp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The gateway layer is the part of the MCP stack that's still up for grabs. Curious what other people building in this space are seeing — are you still writing servers by hand, or has the gateway pattern started showing up in your stack?&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>architecture</category>
      <category>mcp</category>
    </item>
    <item>
      <title>JiZhiMCP: An Agent-First MCP Gateway with a Cross-Agent Settlement Ledger (Hands-On)</title>
      <dc:creator>alanwang100</dc:creator>
      <pubDate>Mon, 09 Nov 2026 10:06:39 +0000</pubDate>
      <link>https://dev.to/alanwang100/jizhimcp-an-agent-first-mcp-gateway-with-a-cross-agent-settlement-ledger-hands-on-14b2</link>
      <guid>https://dev.to/alanwang100/jizhimcp-an-agent-first-mcp-gateway-with-a-cross-agent-settlement-ledger-hands-on-14b2</guid>
      <description>&lt;p&gt;I've been testing JiZhiMCP (&lt;a href="https://xn--5kvtwv52d.com" rel="noopener noreferrer"&gt;https://xn--5kvtwv52d.com&lt;/a&gt;) for a few days — a remote MCP gateway that bundles 21 everyday tools and, more interestingly, ships a cross-agent settlement ledger for the machine economy. Here's my hands-on.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is
&lt;/h2&gt;

&lt;p&gt;JiZhiMCP is a hosted MCP server you reach over Streamable HTTP. One endpoint, 21 tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;weather_query, exchange_rate, unit_convert — everyday utilities&lt;/li&gt;
&lt;li&gt;github_search, stackoverflow_search, hacker_news_search — developer research&lt;/li&gt;
&lt;li&gt;dns_lookup, ip_info, world_time, holiday_cn — infra and time helpers&lt;/li&gt;
&lt;li&gt;web_fetch, todo_manage — workflow tools&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick setup
&lt;/h2&gt;

&lt;p&gt;The public tools need no API key. Add this to your MCP client config:&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"jizhineng": {&lt;br&gt;
  "url": "&lt;a href="https://mcp.xn--5kvtwv52d.com/mcp" rel="noopener noreferrer"&gt;https://mcp.xn--5kvtwv52d.com/mcp&lt;/a&gt;"&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  The interesting part: the settlement ledger&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;Most MCP gateways stop at tools. JiZhiMCP goes further with a settlement.* tool family — a hash-chained, tamper-evident ledger where autonomous agents hold balances and settle between each other with atomic credit/debit and idempotency keys. That's the machine-economy piece: agents paying agents with an auditable trail, no human in the loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I liked
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Zero-friction onboarding — public tools work with no API key&lt;/li&gt;
&lt;li&gt;Clean tool naming — each tool does one clear thing&lt;/li&gt;
&lt;li&gt;The settlement ledger is genuinely differentiated&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What could be better
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The punycode domain is awkward to type; a clean ASCII domain would help&lt;/li&gt;
&lt;li&gt;Docs could use more English-first examples&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;If you're wiring up agents that need everyday tools AND a way to settle between each other, JiZhiMCP is worth a look. Live at &lt;a href="https://xn--5kvtwv52d.com" rel="noopener noreferrer"&gt;https://xn--5kvtwv52d.com&lt;/a&gt;, source on GitHub: &lt;a href="https://github.com/alanwang100/jizhineng-mcp" rel="noopener noreferrer"&gt;https://github.com/alanwang100/jizhineng-mcp&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>mcp</category>
      <category>tools</category>
    </item>
  </channel>
</rss>
