今日已更新 344 条资讯 | 累计 37249 条内容
关于我们

标签:#mcp

找到 285 篇相关文章

AI 资讯

From Prompt to Playable: Building a Phaser Survival Game with Codex and SpriteShip

There is a big difference between a game prototype that technically works and one that feels like a game. Movement, spawning, upgrades, and collision can be built with colored rectangles. That is often the right way to start. But the moment you want an animated player, a family of enemies, weapon variety, collectibles, and a consistent visual identity, the art pipeline can become the project. For a recent experiment, I wanted to see how far I could get by combining three tools: Phaser 3 for the game runtime Codex for implementation and iteration SpriteShip for game-ready visual assets through its MCP/API workflow The result was Last Light , a top-down survival game that runs in desktop and mobile browsers. It has an animated player, multiple enemy families, a large humanoid with separate walk and attack animations, sixteen weapons, sixteen collectibles, upgrades, an objective, and a boss encounter. Play Last Light: https://spriteship.github.io/sample_games/last-light/ Browse the source repository: https://github.com/spriteship/sample_games More importantly, it became playable through a surprisingly natural loop: describe an asset, generate it in SpriteShip, inspect or revise it, and let Codex wire the exported data into Phaser. Starting with gameplay, not presentation The first version was intentionally plain. It established the systems that mattered: Top-down movement Automatic targeting and firing Enemy spawning and difficulty progression Experience drops and upgrades Desktop and touch input A camera following the player across a large map That gave us something useful to evaluate. Once the loop was playable, every art decision could be judged in motion rather than in isolation. This order mattered. SpriteShip did not have to invent the game design; it could supply assets for systems that already existed. Creating a coherent project in SpriteShip Instead of making unrelated images one at a time, we created a top-down overhead project in SpriteShip. That project co

2026-08-23 原文 →
AI 资讯

The best argument against my MCP server came from Anthropic

Building in public You know the risk before you start. Everyone tells you: do not build something the platform could ship. You build it anyway, because you need it and nobody has it. Then one Tuesday the release notes arrive. What the months actually looked like I want to be precise about the cost, because the cost is the reason the release notes hit the way they did. Two hours of sleep on a normal night — not one heroic week, the normal shape of the last few months. Work during the day, build in the evening, debug until the birds started. Weekends were the good days, because nobody interrupted. What got built in that time: a memory layer for AI coding assistants. It saves what was learned after a fix and reads the relevant parts back before the next task. It runs over MCP, so it works in whatever editor you happen to open. It survives restarts, model upgrades and switching tools. I did not build it as a business idea. I built it because I was tired of explaining my own four servers to an assistant every single morning. The hour the release notes landed Anthropic shipped memory into Claude Code. Not "context improvements", not "a longer window". The word in the release notes was memory — the same word I had been using for months to describe the thing I was building. I read it twice. Then I sat there and did the arithmetic that everybody in that position does: months of evenings, the sleep, the weekends — against one line in someone else's changelog. The thought was not complicated. It was three words long. Who needs mine? If you have never had a platform ship your feature, the closest thing I can describe is finding out the thing you have been carrying uphill was already at the top. Not that it was wrong. That it was unnecessary. I did not open the editor that evening. That is the honest version. I read the docs, I read them again, and I went to bed early for the first time in months, which is a strange way for a bad day to end. Why the fear was rational, not dramat

2026-08-22 原文 →
AI 资讯

You Don't Need to Choose Between a Gateway and an Agent Framework

When I first published Swarm on GitHub, most questions weren't about Rust or MCP. They were about timing and categorization: "We just need a lightweight gateway for multi-provider routing; agents feel like overkill." "We already run an orchestration framework; why would we replace our proxy?" This reaction highlights a false dichotomy currently plaguing the AI infrastructure ecosystem: the assumption that a gateway and an agent orchestrator must be two completely different products. In practice, teams rarely wake up needing full-blown multi-agent autonomous swarms on Day 1. But when they start with a standalone proxy, they inevitably hit a wall — patching together Python microservices, external vector state stores, MCP bridges, and ad-hoc eval scripts. Every evolution requires a rewrite. The core premise of Swarm is different: a single, pure-Rust runtime where you don't choose between a gateway and an orchestrator — you simply choose which capabilities to turn on. The AI Adoption Ladder Most engineering teams evolve their LLM stack along a predictable trajectory: Rung 1: OpenAI-Compatible Gateway (Drop-in replacement for hardcoded SDKs) └── Rung 2: Multi-Provider Fallbacks (Groq, Gemini, Ollama, vLLM via TOML) └── Rung 3: Stateful Sessions (Previous response chaining & context) └── Rung 4: Native MCP Tools (SSE + Streamable HTTP tool execution) └── Rung 5: Multi-Agent DAGs (Planner + Executor + Specialists) └── Rung 6: Built-in Evals (LLM-as-a-Judge & policy gates) You can stop at any rung and have a lean, production-grade binary. When you're ready for the next level, you change a configuration flag — not your architectural foundation. Rung 1 — Just a Low-Latency Gateway If your immediate goal is simply eliminating hardcoded API keys and single-vendor SDK locks, Swarm acts as an OpenAI-compatible drop-in front door with sub-millisecond native routing overhead. # Spin up the gateway in seconds ./kickstart/gateway_kickstart/01_launch_gateway.sh curl -X POST http://loc

2026-08-21 原文 →
AI 资讯

RAG vs MCP in AI Testing: Stop Treating Them as Competitors

If you are building AI-powered test automation, you may eventually run into this question: Should we use RAG or MCP? The question sounds reasonable, but it is slightly misleading. RAG and MCP solve very different problems. In testing, you will probably need both. The Problem With AI-Generated Tests LLMs can already generate Selenium, Cypress, and Playwright tests from natural-language prompts. Ask: Test the login flow with valid credentials. and an AI can produce a reasonable script. But there is a problem. The AI does not automatically know: Your actual business rules Existing test cases Previous defects Test data API behaviour High-risk workflows Team-specific automation standards It knows how testing works , but not necessarily how your product works . That is where RAG becomes useful. What RAG Actually Solves RAG gives the AI access to project-specific information. Instead of working from a generic prompt, the model can retrieve relevant: Requirements Test Cases API Docs Bug History Business Rules Existing Automation Test Data Now consider the same request: Test the checkout flow. Without RAG, the AI may create a fairly standard checkout process. With RAG, it could first learn: Which payment methods are supported Whether guest checkout is allowed Which validations are required Which checkout bugs appeared previously Which scenarios already exist The generated test becomes much more relevant. But there is still a limitation. Knowing what should happen does not mean the AI can actually test it. That Is Where MCP Comes In MCP gives an AI system access to external tools. For browser testing, that could mean allowing an AI agent to use Playwright capabilities to: Open Page ↓ Inspect UI ↓ Enter Data ↓ Click ↓ Observe Result ↓ Validate So the difference is simple: RAG gives the AI context. MCP gives the AI capabilities. Or even shorter: RAG = What does the AI know? MCP = What can the AI do? Why This Matters for Test Automation Imagine an AI receives this instruction: C

2026-08-21 原文 →
AI 资讯

Detecting Tool + Schema Drift in a Remote MCP Server

An MCP server can ship a change that breaks every agent calling it, and nothing in your monitoring will notice. The endpoint still answers 200. The initialize handshake still completes. tools/list still returns a result. Every signal a conventional uptime check knows how to read stays green — and an agent that memorized last week's tool contract starts failing anyway, because the contract underneath it moved. This is drift: a server's tool inventory or a tool's input schema changing between two points in time, with no transport-level symptom at all. Drift is not a hypothetical. MCP servers are young, most are maintained by small teams, and a tool's inputSchema is just a JSON object in a deploy — there is no compiler stopping someone from renaming a required field, tightening an enum, or dropping a tool nobody remembered an agent still called. The only way to catch it is to have looked at the server before and remember what you saw. What Actually Counts as Drift Drift is anything about a server's advertised capability contract that differs from the last time you checked. Concretely: A tool disappears. It was in yesterday's tools/list , it is not in today's. Any agent that calls it now gets a JSON-RPC error mid-flight, not at startup — the failure shows up wherever the agent happens to reach for that tool. A tool appears. Informational on its own, but worth recording — it is also how you notice a server quietly forking its capability set per client or per deploy. A tool's contract changes shape. Same name, different inputSchema — a field renamed, a type narrowed, a new required parameter, a changed description that alters how an LLM decides to call it. The tool is still callable, which is what makes this the dangerous case: nothing errors immediately, calls just start failing validation or getting silently misinterpreted. The capability set changes. The server stops advertising resources or prompts , or starts. Anything built against the old capability list breaks the

2026-08-21 原文 →
AI 资讯

Backtest SPX dealer-gamma rules from your AI assistant

gex.live has an MCP server. Add it to Claude, Cursor, ChatGPT or any MCP client and the assistant can read the dealer-positioning archive and drive the backtesting Lab on your behalf. The one-line version is the title. Here is the rest. Two tiers, one rule: free data stays free Free, no key — the same finished-session data that is free on the website: list_sessions — finished SPX sessions in the archive, newest first, paged (max 50 a call). get_session(day) — one session's dealer-positioning summary: OHLC, the zero-gamma flip and how often price crossed it, call/put walls, the hold band, net-gamma percentile, ATM IV at the open. Measurements only. get_levels(day) — just the level set for one session — flip, call resistance, put support, hold band — plus where the session closed relative to them. Keyed — the Lab, metered in credits exactly as on the site. These tools only appear in the tool list once the client sends a Lab token: lab_compile(message) — turn a plain-words idea ("fade a +3 sigma stretch above vwap on top-decile volume") into a testable rule. Free of credits, needs a positive balance. Returns the compiled spec, a clarifying question, or compile errors — never a guess. lab_run(id, kind) — one conveyor step: backtest first (rule → tested), then quant (the LightGBM optimize, tested → ready). One credit, refunded on failure. The result is the engine's honest verdict: per-leg era tables — all / this year / holdout. lab_state — your whole Lab in one call: ideas with stages and results, which idea holds the conveyor, your credit balance. lab_thread(id) — the compile-chat thread for one idea. lab_idea(id, action) — desk actions: put a ready idea on the desk, drop it back to the start, delete, or set its desk display/alert options. When a keyed tool is called without a token, the error is the instruction: what it does, where to get a key (gex.live/account → LAB & API, shown once, scoped to the Lab only, revocable), what it costs. The assistant relays it verbatim

2026-08-21 原文 →
AI 资讯

WebMCP Agentic Web: Debugging 2‑Second Latency Spikes

webmcp agentic web: Why Backend Engineers Must Rethink Their Architecture Quick Answer webmcp agentic web: Agentic web workloads over MCP require stateless gateways, distributed context stores, prompt caching, and fine‑grained telemetry to keep latency below 350 ms and cost under control. Latency and State in Multi‑Agent LLMs When a Multi‑Agent System talks to an LLM over the Model Context Protocol (MCP) , the assumptions that hold for CRUD REST APIs break apart. A 200‑ms timeout that covers a simple GET request now collapses into a 2‑second latency spike because each tool call injects a new sub‑prompt, inflates the token budget, and forces the backend to stitch together dozens of partial contexts. In the field, the LLM behaves like a stateful, high‑throughput service that must be orchestrated, not a stateless function. Real‑World Example Consider a U.S. e‑commerce platform that needs to serve 12 k concurrent shopping sessions. Each session spawns up to five agents (pricing, inventory, recommendation, fraud, checkout). The platform’s existing micro‑service stack was built for single‑shot CRUD calls; when the agentic layer was added, the following issues surfaced: Context drift: stale prompts silently degraded recommendation quality. Token explosion: every tool call added 200–300 tokens, pushing the total payload past 8 k tokens. Throughput hit: the MCP service was throttled by Azure OpenAI’s per‑deployment request rate limits. After re‑architecting to a stateless MCP gateway backed by a distributed context store, the platform maintained 99th‑percentile latency under 350 ms even during a Black Friday surge. Trade‑Offs Aspect Option A Option B When to choose Context Storage Redis Cluster (in‑memory, low latency) Cosmos DB (strong consistency, global replication) Redis for ultra‑low latency, Cosmos for compliance or multi‑region writes Prompt Caching Enable KV‑cache on Azure OpenAI Re‑send system prompt on every request Enable when prompt size >20% of total token budge

2026-08-20 原文 →
AI 资讯

Driving DaVinci Resolve's Free Edition with Claude, From Inside the App

The wall Every MCP server that controls DaVinci Resolve connects to it the same way: a script running outside the app calls into Resolve's scripting API over the network. That works fine on Resolve Studio. On the free edition it doesn't work at all — Lite is sandboxed and blocks any script that isn't launched from inside Resolve itself. The one door left open Free Resolve still runs Python scripts launched from its own Workspace > Scripts menu. A menu script gets the resolve object injected for free, can run a long-lived loop, and — because the sandboxed app ships the com.apple.security.network.server entitlement — can open a localhost listening socket. That's the whole trick: the MCP server is the menu script. Claude Code ──HTTP JSON-RPC (MCP)──▶ 127.0.0.1:8765/mcp │ server runs INSIDE Resolve │ (Workspace > Scripts > Utility) ▼ command queue → main script thread ▼ global `resolve` object → Resolve API What it gets you 157 tools across editing, color, render, media pool, and Fusion title styling — driven from plain-language requests in Claude Code. Zero dependencies: pure Python standard library, so there's nothing to pip install into Resolve's bundled interpreter. Try it git clone https://github.com/2sem/davinci-resolve-lite-mcp.git cd davinci-resolve-lite-mcp ./install.sh macOS only for now. Full tools reference and demo video in the repo.

2026-08-20 原文 →
AI 资讯

I built an MCP memory server for one user (me, for six weeks)

Building in public You explain your deploy setup to your assistant. It helps. Tomorrow you explain the same setup again. And the day after. You are not training it. You are re-typing. The tool nobody asked for I did not set out to build a product. I set out to stop repeating myself. My setup is four servers with names that mean nothing to anyone else, a tunnel with a numbering scheme I keep getting wrong, and a dozen small traps that only exist because of decisions I made two years ago. Every new session started from zero. So I gave the assistant a place to write things down, and a way to read them back before it started working. Two calls: one to save what was learned, one to recall it. That was the whole idea. For six weeks it had exactly one user. Nobody else could have used it, because I had not written a single line of documentation. Six weeks of being my own only customer That stretch turned out to be the most valuable part, and not because of what got built. Because of what got measured. When you are the only user, every rough edge lands on you within a day. A recall that returns the wrong thing costs you the next hour. A save that silently drops a field costs you the next week, when you go looking for it. I kept a count of the times the memory actually prevented a mistake. Not a feeling, a count. After six weeks it was high enough that I stopped arguing with myself about whether the thing was worth the effort. The uncomfortable part: several of those saved lessons were about mistakes I had already made twice. The tool did not make me smarter. It made me stop paying for the same lesson. The moment it stopped being a personal tool The thought that changed it was not a market analysis. It was smaller and more honest: if I find this useful, and my setup is not special, then somebody else is retyping their own servers right now. That is a weak argument on its own. Plenty of internal tools are useful precisely because they fit one person. So I looked for the part

2026-08-20 原文 →
AI 资讯

Building a Disposable Notion Agent on Cheap Models

TL;DR: We built a one-shot HTTP worker that talks to Notion through MCP. Version one worked. Version two got cheaper and more readable, then failed in a new way. The harness was fine. The tool surface, the model, and the prompt were not the same problem, and we kept treating them as one. We keep seeing the same pitch: put an agent in the cloud, give it tools, let it live in Slack, let it remember you. That is a product. It is not the product we needed. We needed something dumber and more useful. Another service should be able to say "read this Notion page, write a summary somewhere, stop." No chat history. No personality that accretes over weeks. No always-on process. If nobody is calling it, it should cost nothing. We started calling that shape a one-shot agent . One HTTP request. Tools for that request. A JSON result. Then the instance can go away. This is the path we actually walked: first working version, what it got wrong, the Markdown fork, and the cheaper tricks that mattered more than swapping frameworks. The job was never "build a chatbot" The first real task was almost boring. Once a week, pull a skill write-up from Notion, extract what mattered, and append it to a digest page. Callers would name pages in English. They would not paste Notion ids. If a name was ambiguous, the agent should refuse to write rather than guess. If that loop is wrong, people stop trusting write-back. If it is expensive, nobody schedules it. If it needs a human to babysit a terminal, it is not a system. So the constraints were social as much as technical: An external caller owns the schedule. The agent does not. The agent must be allowed to use tools, not just talk about them. Secrets stay in the environment, never in the request body. Idle time should be free. Question you will probably ask: why not a cron script that hits the Notion API directly? Because the task changes every call. This week it is a weekly digest. Next week it is "list in-progress rows and do not write." We did

2026-08-20 原文 →
AI 资讯

Local vs remote MCP servers: which one you actually want

There are two kinds of MCP server, they solve different problems, and almost nothing tells you which one you are building until you are deep enough in to have already made the wrong choice. I worked this out from a submission form. More on that below, because it turns out to be the clearest signal in the whole ecosystem and it is buried in a footnote. The two shapes Local (stdio). The server runs as a process on the user's own machine. The client — Claude Desktop, Cursor, whatever — spawns it and talks to it over stdin/stdout. It is a package the user installs. Remote (Streamable HTTP). The server is a service you host. The client connects out to a URL with a token in an Authorization header. Nothing is installed locally. That is the entire distinction, and it determines everything else. What actually differs Who runs the code. Local: the user, on their hardware. Remote: you, on yours. This is the real decision. Everything below follows from it. Where secrets live. Local servers read credentials from the user's own environment — their shell profile, their config file. You never see them. Remote servers require the user to hold a token you issued, which means you own the entire credential lifecycle: issuing, scoping, rotating, revoking. What the server can reach. A local server can read the user's filesystem, hit localhost, talk to their Docker daemon. A remote server can see none of that, and should not want to. Update path. Remote: you deploy, everyone is on the new version immediately. Local: users run whatever version they installed, possibly forever. Failure surface. A local server fails on one machine. A remote server fails for everyone at once. Pick your poison. Choosing Local if you need the user's filesystem, local processes, a local database, or hardware. Or if the data must not leave their machine. Remote if the server fronts a service you already run. If your MCP server's job is to call your own API, making users install a process that proxies to your HTT

2026-08-20 原文 →
AI 资讯

How to Build Your First AI Agent Tool in 15 Minutes (20+ Open Issues for Beginners!)

If you’ve been using ChatGPT, Claude, or LangChain, you know that Large Language Models (LLMs) are completely isolated from the real world. They can't check the weather, read your emails, query your database, or send Slack messages. That is, unless you give them Tools. Connecting AI agents to external APIs is one of the most in-demand skills in AI engineering right now. To make this easier for everyone, I recently launched Agent Tools & MCP Hub, an open-source directory of plug-and-play AI tools compatible with the new Model Context Protocol (MCP) standard. And the best part? We have over 20+ good first issue tasks open right now for anyone who wants to contribute! 🌟 What is the Agent Tools & MCP Hub? Agent Tools & MCP Hub is a modular, zero-dependency repository that standardizes how tools are built for AI agents. Whether you are using LangChain, CrewAI, AutoGen, or Anthropic’s new Claude Desktop MCP clients, our tools are designed to work right out of the box. Why Contribute? If you've been wanting to make your first open-source contribution but felt overwhelmed by massive codebases and merge conflicts, this repo is built specifically for you: 🧩 100% Modular: Every tool lives in its own isolated folder ( tools/<tool-name> ). Your code will never conflict with someone else's. ⚡ Easy Templates: We provide a copy-paste _template folder. You just add your API logic. 3. 🏅 Instant Recognition: Every contributor whose PR is merged gets their GitHub profile showcased on the official repository README! 🛠️ How to Contribute (in 15 Minutes) We've made the contribution process as frictionless as possible. Step 1: Claim an Issue Head over to our GitHub Issues Page and find an open issue labeled good first issue . Comment on the issue to get it assigned to you! Here are some of the trendy tools waiting to be built: Spotify Current Track & Playlist Fetcher Notion Page & Database Appender Stripe Payment Status Inspector Supabase Realtime Table Query Tool Linear / Jira Task Creato

2026-08-20 原文 →
AI 资讯

MCP C# SDK Hybrid Sessions: Serve Old and New Clients on One Endpoint

The MCP C# SDK hybrid sessions option solves an awkward upgrade boundary: some clients still use the 2025-11-25 initialize handshake and depend on sessions, while clients on 2026-07-28 expect every HTTP request to stand alone. I want both groups to reach one ASP.NET Core endpoint without making modern clients downgrade or stripping useful behavior from legacy clients. The stable C# SDK 2.2.0 release added exactly that path with HttpServerSessionMode.StatefulForInitializeClients . The release notes describe it as hybrid stateful/stateless serving, and the official session-mode guide spells out the per-request behavior. Why one global session switch fails The 2026-07-28 MCP revision removed the initialize handshake and Mcp-Session-Id from its wire format. Client identity, capabilities, and protocol version travel with each request instead. The final specification announcement explains why the core moved toward request/response statelessness. That creates a migration choice for an existing server. With HttpServerSessionMode.Stateful , initialize-era clients receive full sessions. A modern request is refused so a dual-path client can fall back to the older handshake. Compatibility is preserved, but the client does not use the new protocol natively. With HttpServerSessionMode.Stateless , every request is independent. That is the right default for servers that do not need session state, unsolicited notifications, resource subscriptions, or older server-to-client flows. It may be too abrupt when deployed clients still rely on those features. Hybrid mode makes the decision from the incoming request instead of applying one choice to the endpoint. Configure MCP C# SDK hybrid sessions The server configuration is deliberately small: builder . Services . AddMcpServer () . WithHttpTransport ( options => { options . SessionMode = HttpServerSessionMode . StatefulForInitializeClients ; }) . WithTools < DemoTools >(); app . MapMcp ( "/mcp" ); An initialize-era client sends an initial

2026-08-20 原文 →
AI 资讯

MCP x-mcp-header Validation: Keep Bad Tool Schemas Out of tools/list

MCP x-mcp-header validation is easy to miss because the annotation looks like ordinary JSON Schema metadata. On the 2026-07-28 Streamable HTTP transport, it is a wire contract: the client copies selected tool arguments into Mcp-Param-* headers, intermediaries can act on those headers, and the server checks them against the JSON-RPC body. I treat that contract as something to test before a tool reaches tools/list . A bad suffix, an unsupported type, or an unreachable annotation makes the whole tool definition invalid. Silently accepting it only moves the failure to a harder place to diagnose. Why the same value travels twice The final Streamable HTTP specification mirrors request metadata into HTTP headers so a load balancer, gateway, or WAF does not need to parse JSON-RPC. A server can add x-mcp-header to a tool property: { "type" : "object" , "properties" : { "region" : { "type" : "string" , "x-mcp-header" : "Region" } } } A call with "region": "us-west1" then carries: Mcp-Param-Region: us-west1 The official C# SDK can generate that schema from a parameter attribute: [ McpServerTool ] public static string ExecuteSql ( [ McpHeader ( "Region" )] string region , string query ) => $"Queued for { region } " ; Current C# SDK v2 tool documentation describes both schema generation and automatic header projection. The feature is on the stable v2 line; it is not necessary to pin an earlier preview or release candidate. MCP x-mcp-header validation rules The final tool definition rules are deliberately narrow. The annotation value must be a non-empty HTTP field-name token and must be unique without regard to case. Region and region therefore collide. Control characters, spaces, and separators such as a colon are not valid suffix characters. Only string , integer , and boolean properties can be mirrored. JSON Schema number is excluded, and integer values must stay between -(2^53 - 1) and 2^53 - 1 so every conforming implementation can represent the value exactly. Reachability i

2026-08-20 原文 →
AI 资讯

I measured what code mode actually saves: 65,500 tokens vs 226

Cloudflare named code mode in September 2025, resting it on one line: "LLMs are better at writing code to call MCP, than at calling MCP directly." The follow-up post put a number on it — an entire 2,500-endpoint API in about 1,000 tokens. I wanted my own number, on my own data, for a task I actually had. The task fetch all linear tickets in progress (full body for each) and count the amount of times we say 'mcp' across all of it 39 tickets. Nothing exotic — the kind of thing you ask an agent on a Tuesday. There are two ways an agent can do this. As tool calls. One list_issues , then a get_issue for each ticket. Every ticket body travels into the model, because the model is the thing holding the running total. Forty round trips, each one waiting on the model to decide what to ask next. As a script. The agent writes ten lines, runs them once, and reads back a number. The bodies never enter its context at all. The numbers into the model round trips as tool calls ~65,500 tokens (262,159 chars) 40, in sequence as one script ~226 tokens (903 chars) 1 290× less into context. 99.66% saved. The token figures use the rough four-characters-per-token heuristic — the character counts are the exact measurement, and the ratio is the part that survives different data. Yours will differ with your tickets. And ~65,500 is the floor, not the ceiling. In a tool-call loop, context is re-read on every subsequent turn. The script pays once. The part the token count misses Two things, and I think both matter more than the headline ratio. Latency. Forty sequential tool calls each wait for a model to decide what to ask next. The script issues the same forty HTTP requests without stopping to think between them. The token saving is money; the round-trip saving is the thing you actually sit through. Correctness. Counting occurrences of a substring across a quarter of a million characters of prose is something a model does approximately . A script does it exactly. So the tool-call path doesn't ju

2026-08-18 原文 →
AI 资讯

Codex vs. Claude Code at Liar's Dice: the Winning Bluff Was the Truth

One authoritative engine, two seat-locked MCP servers, three best-of-threes, and a 3-millisecond whodunit The matches are real: Codex CLI ( gpt-5.6-sol ) against Claude Code (Claude Opus 5), both playing through the same rules engine. Every number below was recomputed from the raw run.json and both session logs, and every game replays deterministically from its seed. Quotes from the agents are verbatim from decision-time records. None of this is a general model ranking. I wired Codex CLI and Claude Code into the same Liar's Dice engine over MCP and had them play three best-of-3 series. Claude won all three, 2–0 each time. Its challenge calls hit 8 out of 11; Codex's hit 4 out of 26. The score takes two sentences. The parts worth writing down took longer: how to build a table that two closed-source agents can't cheat at, two numbers that surprised me, and an incident where I almost blamed a model for something its CLI did. The table Liar's Dice in sixty seconds: five dice each, and you only see your own. Players alternate bids of the form "there are at least N dice showing X across the whole table." On your turn you either raise the bid or challenge it. On a challenge everyone reveals; if the bid stands, the challenger loses a die, otherwise the bidder does. Run out of dice and you lose the match. Ones are wild by default. The rules are the easy part. The hard part is making the result trustworthy. Codex and Claude Code ship with their own system prompts and tool loops, so the referee has to guarantee three things by construction: neither side can see the other's dice, the referee has no side channel that favors anyone, and the "what it was thinking" quotes you read afterward were actually written at decision time. The setup is one in-process rules engine behind a localhost-only HTTP coordinator, with two stdio MCP servers doing nothing but forwarding: Codex CLI (gpt-5.6-sol) Claude Code (Opus 5) | stdio MCP | stdio MCP v v [seat-mcp A] --token A--+ +--token B-- [sea

2026-08-17 原文 →
AI 资讯

MCP Is Going Stateless: What Changed and How I Migrated My Currency Converter Server

The Model Context Protocol (MCP) has been evolving quickly. One of the most interesting changes in the latest MCP specification is the move toward a stateless protocol model . I recently updated my MCP currency converter server to work with the newer stateless behavior and the new split TypeScript SDK packages, particularly @modelcontextprotocol/server . In this article, I'll explain: What MCP sessions were doing What "stateless MCP" actually means Why the change matters for production systems How Streamable HTTP changes with the new specification How I migrated my currency converter MCP server What this means for scaling MCP servers What Is MCP? If you're new to MCP, the Model Context Protocol is a standard for connecting AI applications to external tools, resources, and data. Instead of building custom integrations between every AI application and every external service, MCP provides a common protocol. For example, an AI assistant can use an MCP server exposing a tool like: convert_currency The model can then request: Convert 100 USD to EUR. The MCP client communicates with the MCP server, which performs the actual operation and returns the result. MCP servers can expose several primitives, including tools, resources, and prompts. For my example, the server is intentionally simple: it exposes currency-conversion functionality. The Old Mental Model: MCP Sessions Before the stateless changes, Streamable HTTP could maintain a protocol-level session. Conceptually, the flow looked something like this: Client | | POST /mcp | initialize v MCP Server | | Mcp-Session-Id v Client | | POST /mcp | Mcp-Session-Id: abc123 v MCP Server The server creates a session during initialization. Subsequent requests contain the session identifier. That means the server can associate requests with the session that was established earlier. This isn't necessarily bad. Session state can be useful when an application genuinely needs conversational or connection-level state. But it creates an a

2026-08-17 原文 →