<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Mcp Tool Definitions Portability on RockB</title><link>https://baeseokjae.github.io/tags/mcp-tool-definitions-portability/</link><description>Recent content in Mcp Tool Definitions Portability on RockB</description><image><title>RockB</title><url>https://baeseokjae.github.io/images/og-default.png</url><link>https://baeseokjae.github.io/images/og-default.png</link></image><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 08 Oct 2026 14:47:00 +0000</lastBuildDate><atom:link href="https://baeseokjae.github.io/tags/mcp-tool-definitions-portability/index.xml" rel="self" type="application/rss+xml"/><item><title>Cloud Agents Are Not Prisons: The Harness Portability Test</title><link>https://baeseokjae.github.io/posts/cloud-agents-ai-prisons-local-execution-2026/</link><pubDate>Thu, 08 Oct 2026 14:47:00 +0000</pubDate><guid>https://baeseokjae.github.io/posts/cloud-agents-ai-prisons-local-execution-2026/</guid><description>A four-surface test of how portable a cloud coding agent really is: agent skills, MCP tool definitions, session state and prompt-cache ownership, each checked against the vendor&amp;#39;s own documentation.</description><content:encoded><![CDATA[<p>When engineering leads ask what actually locks them to a cloud coding agent, the honest answer is the harness — the skills, tool definitions, session state and cached context that sit around the model — not the model itself. Models commoditised fast enough that swapping one for another is now routine; the accumulated configuration around it is what resists moving. That is a specific, checkable claim, and this article checks it.</p>
<p>The test is deliberately narrow. It names four surfaces where harness lock-in would live — agent skills, MCP tool definitions, session/checkpoint state, and prompt-cache ownership — and asks one question of each: does the vendor&rsquo;s own documentation show the artifact is exportable, versioned and self-hostable? The verdict is not uniform, and that is the point. Two surfaces are portable, one is partial, and one is not portable at all on the documentation available today. This is a portability audit, not a tool ranking; if you are still picking a tool, the <a href="/posts/continue-dev-vs-github-copilot-2026/">Continue.dev vs GitHub Copilot comparison</a> and the <a href="/posts/multi-agent-coding-workflow-2026/">multi-agent coding workflow guide</a> cover that neighbouring ground.</p>
<h2 id="what-this-test-is-and-what-it-is-not">What this test is, and what it is not</h2>
<p>This is a documentation test, not a benchmark. No agent was migrated between platforms, no provider was measured, and no migration cost was timed. Every quotation below is a verbatim excerpt from a page fetched on 2026-10-08, and each page is linked so you can re-read it and disagree. Where a claim could not be supported from the vendor&rsquo;s documentation, it was withdrawn rather than softened.</p>
<p>The seed version of this article carried a slogan in its title — &ldquo;inevitable AI prisons.&rdquo; That slogan is unfalsifiable and it is not what the evidence supports. The narrowed thesis is smaller and survives scrutiny: lock-in concentrates in the harness, and you can measure how much of it is real one surface at a time.</p>
<h2 id="the-four-surfaces-at-a-glance">The four surfaces at a glance</h2>
<table>
	<thead>
			<tr>
					<th>Surface</th>
					<th>Verdict</th>
					<th>What moves</th>
					<th>What does not move</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Agent skills</td>
					<td>Portable</td>
					<td><code>SKILL.md</code> and its files; project instruction files</td>
					<td>Automatic discovery, marketplace and cloud-side scanning</td>
			</tr>
			<tr>
					<td>MCP tool definitions</td>
					<td>Portable</td>
					<td>The protocol, the schema, the <code>tools/list</code> definition</td>
					<td>A vendor-hosted MCP <em>server</em>; server-assigned session IDs</td>
			</tr>
			<tr>
					<td>Session / checkpoint state</td>
					<td>Not portable</td>
					<td>Nothing, as documented</td>
					<td>The runtime session, its checkpoints and auto-memory</td>
			</tr>
			<tr>
					<td>Prompt-cache ownership</td>
					<td>Partial</td>
					<td>The reusable prefix text you author</td>
					<td>The provider-side KV cache itself</td>
			</tr>
	</tbody>
</table>
<p>Two portable, one partial, one not — that clears the brief&rsquo;s three-of-four threshold, but only because the test was narrowed to documentation-checkable claims.</p>
<h2 id="surface-1--agent-skills-a-directory-of-markdown-you-already-own">Surface 1 — Agent skills: a directory of Markdown you already own</h2>
<p>Anthropic defines the artifact plainly: skills are &ldquo;reusable, filesystem-based resources that give Claude domain-specific expertise&rdquo; (<a href="https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview.md">Agent Skills overview</a>). In Claude Code the same page states that &ldquo;Custom Skills in Claude Code are filesystem-based and don&rsquo;t require API uploads: place them in <code>~/.claude/skills/</code> (personal) or <code>.claude/skills/</code> (project).&rdquo; A skill is a directory of text on your own disk. Nothing in that description is held in vendor custody.</p>
<p>The qualifier matters, and the same vendor page supplies it: &ldquo;<strong>Custom Skills do not sync across surfaces</strong>. Skills uploaded to one surface are not automatically available on others.&rdquo; So the file travels; the conveniences wrapped around it — automatic loading, marketplace distribution, cloud-side scanning — do not. Portable here means the artifact is exportable, not that its behaviour is guaranteed identical elsewhere.</p>
<p>Project instruction context sits on the same surface. Claude Code reads <code>CLAUDE.md</code> files — &ldquo;markdown files that give Claude persistent instructions for a project, your personal workflow, or your entire organization&rdquo; — written in plain text and read at the start of every session (<a href="https://docs.claude.com/en/docs/claude-code/memory.md">Claude Code memory</a>). The same page records a version dependency worth noting: &ldquo;Reading <code>AGENTS.md</code> directly requires Claude Code v2.1.277 or later.&rdquo; OpenAI&rsquo;s CLI mirrors the pattern from its own documentation: &ldquo;Codex reads configuration details from more than one location. Your personal defaults live in <code>~/.codex/config.toml</code>, and you can add project overrides with <code>.codex/config.toml</code> files&rdquo; (<a href="https://developers.openai.com/codex/local-config.md">Codex local configuration</a>). Two vendors, plain files in both cases. The conventions are converging, not identical, so a shared file can produce different behaviour.</p>
<h2 id="surface-2--mcp-tool-definitions-an-open-versioned-protocol">Surface 2 — MCP tool definitions: an open, versioned protocol</h2>
<p>Tool definitions are the second place a harness could hold you. They do not, because the definition format is a public standard. The Model Context Protocol specification states that it &ldquo;defines the authoritative protocol requirements, based on the TypeScript schema in <a href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2025-06-18/schema.ts">schema.ts</a>&rdquo; — a file that lives in a public repository under a pinned revision, 2025-06-18 (<a href="https://modelcontextprotocol.io/specification/2025-06-18/index.md">MCP specification index</a>). A versioned spec with a public schema is the opposite of a proprietary format.</p>
<p>The mechanics are standardised too. The specification explains that MCP &ldquo;allows servers to expose tools that can be invoked by language models,&rdquo; and that tool discovery is a defined call: &ldquo;To discover available tools, clients send a <code>tools/list</code> request&rdquo; (<a href="https://modelcontextprotocol.io/specification/2025-06-18/server/tools.md">Server features: tools</a>). A tool definition you wrote against this spec is readable by any client that implements the spec.</p>
<p>Two honest limits. First, the protocol is portable; a given MCP <em>server</em> may still be a hosted dependency you do not control. Second, the transport layer reintroduces server-side state: &ldquo;An MCP &lsquo;session&rsquo; consists of logically related interactions between a client and a server, beginning with the initialization phase,&rdquo; and the Streamable HTTP transport assigns an <code>Mcp-Session-Id</code> that the server tracks (<a href="https://modelcontextprotocol.io/specification/2025-06-18/basic/transports.md">Transports</a>). The tool <em>definition</em> moves cleanly; a live stateful session does not.</p>
<h2 id="surface-3--session-and-checkpoint-state-the-wall-that-is-still-standing">Surface 3 — Session and checkpoint state: the wall that is still standing</h2>
<p>This is the surface where the documentation gives the least comfort. Claude Code&rsquo;s memory page states the starting position directly: &ldquo;Each Claude Code session begins with a fresh context window. Two mechanisms carry knowledge across sessions:&rdquo; — the <code>CLAUDE.md</code> file you own, and auto memory, which the same page describes in one sentence: &ldquo;Auto memory is machine-local. All worktrees and subdirectories within the same git repository share one auto memory directory. Files are not shared across machines or cloud environments.&rdquo; (<a href="https://docs.claude.com/en/docs/claude-code/memory.md">Claude Code memory</a>). On the OpenAI side, the hosted path is equally explicit: Codex Cloud tasks &ldquo;Start tasks from a published environment. Each task has its own workspace and can keep working while your computer is asleep&rdquo; (<a href="https://learn.chatgpt.com/docs/cloud.md">Codex Cloud</a>). The environment is the vendor&rsquo;s.</p>
<p>Neither page documents an export of a runtime session or its checkpoints. That is a real finding, but it must be stated at its true strength: the absence of a documented export is evidence of no documented export, not proof that none exists. A CLI-level resume flag is not an artifact format you can carry to another harness. This is the softest of the four verdicts for exactly that reason, and it is the one most likely to change on the next vendor documentation release.</p>
<h2 id="surface-4--prompt-cache-ownership-the-cache-is-not-yours-the-prefix-can-be">Surface 4 — Prompt-cache ownership: the cache is not yours, the prefix can be</h2>
<p>Prompt caching is the partial case, and the distinction is worth making precisely. OpenAI&rsquo;s guide states what the cache actually holds: &ldquo;The prompt cache stores key-value (KV) tensors, not the tokens themselves,&rdquo; and reuse is fragile — &ldquo;Cache reuse requires the entire rendered prefix to match&rdquo; (<a href="https://platform.openai.com/docs/guides/prompt-caching.md">OpenAI prompt caching</a>). That is provider-side state keyed to an exact byte prefix, and it is not an artifact you can hand to a competing provider.</p>
<p>The reason it can still be owned is that the prefix is authored content. OpenAI documents that it &ldquo;caches the model&rsquo;s full rendered context including OpenAI-provided instructions, developer messages&rdquo; — meaning the cache key is built from the system prompt, the tool definitions, the instruction files and the conversation history, all of which you can version as source. The KV cache cannot move; the text that generates it is entirely yours, provided you keep it in files rather than in a vendor console.</p>
<p>The economics reinforce the same split. Anthropic documents that &ldquo;By default, the cache has a 5-minute lifetime,&rdquo; and that &ldquo;5-minute cache write tokens are 1.25 times the base input tokens price&rdquo; (<a href="https://docs.claude.com/en/docs/build-with-claude/prompt-caching.md">Anthropic prompt caching</a>). OpenAI states that &ldquo;For GPT-5.6 and later, cache writes cost 1.25× the standard, uncached input-token rate&rdquo; (<a href="https://platform.openai.com/docs/guides/prompt-caching.md">OpenAI prompt caching</a>). Both are vendor-published list figures, not measured invoices — treat them as published rate behaviour, not spend. The practical conclusion is unglamorous: you cannot carry a cache, but you can guarantee it is cheap to rebuild by keeping the prefix in version control.</p>
<h2 id="the-local-execution-counter-case-as-a-labelled-trade-off">The local-execution counter-case, as a labelled trade-off</h2>
<p>The claim that local execution is the escape is stronger as a trade-off statement than as an inevitability, and it needs one measured anchor rather than slogans. The relevant anchor is the price of the machine itself, taken from the vendor&rsquo;s own store on 2026-10-08.</p>
<p>Apple&rsquo;s US store lists preconfigured Mac Studio configurations from $2,499 to $6,799 in list price (US store, checked 2026-10-08) (<a href="https://www.apple.com/shop/buy-mac/mac-studio">Apple, Shop Mac Studio</a>). That is a primary vendor list price band for one desktop-class machine&rsquo;s starting build. This article does not bind a specific dollar amount to a named CPU/GPU configuration, because the fetched store markup does not evidence that pairing.</p>
<p>Read that anchor as what it is: a floor for one desktop-class machine&rsquo;s entry configuration. It excludes memory and storage upgrades, power, support, the operations labour of running a fleet, and the model-quality gap between a local model and a frontier hosted one. A list price is not a total cost of ownership, and this article does not present it as one.</p>
<p>What the anchor supports is a labelled trade: a local runtime converts exit cost from an engineering project into a capital purchase plus an operations obligation. It buys independence and marginal-cost-zero inference after the hardware, and it pays for them with a real operations burden and a capability lag. Cloud agents buy frontier reasoning and zero capital expenditure, and pay for them with dependency and a higher exit cost. Neither column is the right answer in general. The right answer is that you should be able to choose, and to know what the choice costs. For the concrete local-execution side of that trade, see the <a href="/posts/self-hosted-ai-coding-comparison-2026/">self-hosted AI coding assistants comparison</a> and the <a href="/posts/local-ai-agents-guide-2026/">local AI agents guide</a>.</p>
<h2 id="the-portability-audit-you-can-run-this-quarter">The portability audit you can run this quarter</h2>
<p>Abstract lock-in advice is useless, so here is the checkable version — one row per surface, each tied to the documentation above.</p>
<ol>
<li><strong>Skills.</strong> Locate every skill as a directory of plain text (<code>SKILL.md</code> plus assets) and confirm it lives in a repository you control rather than only in a vendor console. If a skill exists only inside a hosted product, it fails this test by the vendor&rsquo;s own statement that custom skills do not sync across surfaces.</li>
<li><strong>Instruction and configuration.</strong> Confirm your project rules are plain files (<code>CLAUDE.md</code>, <code>AGENTS.md</code>, <code>.codex/config.toml</code>) under version control, and record the client versions that read them. Note the version dependency — reading <code>AGENTS.md</code> directly requires Claude Code v2.1.277 or later — so a teammate on an older client is a portability gap.</li>
<li><strong>Tool definitions.</strong> Confirm your tools are declared against the pinned MCP revision and discoverable through a standard <code>tools/list</code> call, and separate them in your inventory from any hosted MCP <em>server</em> you do not operate. The protocol moves; the server may not.</li>
<li><strong>Session state.</strong> List every workflow that depends on accumulated session or checkpoint state, and mark it unmovable until a documented export exists. This is the surface with no documented exit today, so treat it as the honest floor of your exit cost.</li>
<li><strong>Prompt-cache prefix.</strong> Move the system prompt, tool definitions and instruction files that form the cache key into version control, so the prefix is rebuildable on any provider. You cannot move the KV cache; you can make regenerating it a checkout.</li>
</ol>
<p>Run the five checks and you will know, per surface, whether your cloud agent deployment is a rental with a stated exit or a lease you cannot get out of. Many teams will find a rental with a reasonable exit. That is a legitimate outcome, and it is a better answer than a slogan.</p>
<h2 id="what-this-article-withdraws-from-its-earlier-draft">What this article withdraws from its earlier draft</h2>
<p>The seed version of this piece rested on numbers that were never verified against a primary source in this run. They are withdrawn here rather than repeated:</p>
<ul>
<li>The IBM IBV figures (71% unable to switch, 91% unable to map dependencies, 68% data-residency difficulty) are removed; the IBM survey was not re-opened for this test.</li>
<li>The Zapier migration figures (42% smooth, 58% overran) and the 41% / ~90% expectation numbers are removed for the same reason.</li>
<li>The agentic-market size ($100B by 2028), the vendor revenue figure (approximately $14B annualised), Gartner&rsquo;s cancellation forecast (over 40%), the GitGuardian 28.65M-secrets count, and the hardware and throughput tables (DGX Spark, Strix Halo, RTX 3090, token-per-second rates) are all removed. None was re-verified against a primary source in this run.</li>
<li>Two vendor marketing claims that the seed draft repeated (a &ldquo;70% of companies&rdquo; figure and an &ldquo;~80% savings&rdquo; hybrid figure) are dropped rather than carried with a label.</li>
</ul>
<p>What remains is what the four linked vendor pages and the one vendor price page actually state, on the date each was checked.</p>
<h2 id="quick-answers">Quick answers</h2>
<p><strong>Do you have to choose between cloud and local agent execution?</strong> Not on the evidence here. The two portable surfaces — skills and MCP tool definitions — are portable in both directions, so a harness built on them can route to either. The surface that does not move, session and checkpoint state, is where the real lock-in sits, and it is the one to plan around first (<a href="https://docs.claude.com/en/docs/claude-code/memory.md">Claude Code memory</a>).</p>
<p><strong>What is the smallest change that reduces harness lock-in?</strong> Make the prompt-cache prefix a versioned artifact. OpenAI documents that the cache key is &ldquo;the model&rsquo;s full rendered context including OpenAI-provided instructions, developer messages,&rdquo; and that reuse &ldquo;requires the entire rendered prefix to match&rdquo; (<a href="https://platform.openai.com/docs/guides/prompt-caching.md">OpenAI prompt caching</a>). Moving that prefix into source control is nearly free and converts a cache you cannot carry into one you can always rebuild.</p>
<h2 id="sources">Sources</h2>
<p>Every source below was fetched by the author on 2026-10-08; the raw pages are a private local author check and are not published for download. Each URL is the exact page quoted above.</p>
<ul>
<li><a href="https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview.md">Anthropic — Agent Skills overview</a></li>
<li><a href="https://docs.claude.com/en/docs/claude-code/memory.md">Anthropic — Claude Code memory</a></li>
<li><a href="https://docs.claude.com/en/docs/build-with-claude/prompt-caching.md">Anthropic — Prompt caching</a></li>
<li><a href="https://developers.openai.com/codex/local-config.md">OpenAI — Codex local configuration</a></li>
<li><a href="https://learn.chatgpt.com/docs/cloud.md">OpenAI — Codex Cloud</a></li>
<li><a href="https://platform.openai.com/docs/guides/prompt-caching.md">OpenAI — Prompt caching</a></li>
<li><a href="https://modelcontextprotocol.io/specification/2025-06-18/index.md">Model Context Protocol — specification, revision 2025-06-18</a></li>
<li><a href="https://modelcontextprotocol.io/specification/2025-06-18/server/tools.md">Model Context Protocol — server tools</a></li>
<li><a href="https://modelcontextprotocol.io/specification/2025-06-18/basic/transports.md">Model Context Protocol — transports</a></li>
<li><a href="https://www.apple.com/shop/buy-mac/mac-studio">Apple — Shop Mac Studio</a></li>
</ul>
]]></content:encoded></item></channel></rss>