<?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 on Mini Fish</title>
    <link>https://blog.minifish.org/tags/mcp/</link>
    <description>Recent content in Mcp on Mini Fish</description>
    <image>
      <title>Mini Fish</title>
      <url>https://blog.minifish.org/android-chrome-512x512.png</url>
      <link>https://blog.minifish.org/android-chrome-512x512.png</link>
    </image>
    <generator>Hugo -- 0.165.0</generator>
    <language>en-US</language>
    <copyright>Mini Fish 2014-present. Licensed under CC-BY-NC</copyright>
    <lastBuildDate>Sat, 15 Aug 2026 16:11:02 +0800</lastBuildDate>
    <atom:link href="https://blog.minifish.org/tags/mcp/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>agentd: A Transport-Neutral Runtime for Personal Agents</title>
      <link>https://blog.minifish.org/posts/agentd-transport-neutral-runtime/</link>
      <pubDate>Sat, 15 Aug 2026 16:11:02 +0800</pubDate>
      <guid>https://blog.minifish.org/posts/agentd-transport-neutral-runtime/</guid>
      <description>A systems-level look at agentd, a durable single-host runtime for personal agents with scoped execution, explicit capabilities, inspectable traces, and transactional delivery.</description>
      <content:encoded><![CDATA[<p>Most personal-agent demos begin with a chat surface: receive a message, call a
model, perhaps execute a tool, and send the answer back. That is enough to show
the interaction. It does not define what should happen when two messages arrive
for the same conversation, a process restarts, a delivery attempt times out, or
a model invokes a capability with side effects.</p>
<p><a href="https://github.com/minifish-org/agentd"><code>agentd</code></a> is my attempt to put those
questions behind a small runtime contract. It is an experimental, multi-tenant,
single-agent runtime for one host. The model still decides what to do. The host
runtime owns the less glamorous parts: persistence, scheduling, scoped
serialization, capability boundaries, raw traces, and a pull delivery outbox.</p>
<p>The goal is not to build a universal agent framework. The narrower goal is to
make one turn durable and inspectable without coupling execution to Telegram,
a browser, a game, or any other user interface.</p>
<h2 id="the-boundary-starts-with-a-turn">The boundary starts with a turn</h2>
<p>External systems submit work through one transport-neutral endpoint:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>POST /v1/tenants/:tenant/turns
</span></span></code></pre></div><p>A request identifies an agent, a scope, a payload, and optionally a delivery
destination and <code>request_id</code>. Submission returns <code>202</code> with a queued <code>run_id</code>.
The caller can wait for the canonical result, inspect the trace, cancel the run,
or consume delivery through a separate adapter.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>REST turn / due schedule
</span></span><span style="display:flex;"><span>          |
</span></span><span style="display:flex;"><span>          v
</span></span><span style="display:flex;"><span>      queued run -- transactional (tenant, agent, scope) claim
</span></span><span style="display:flex;"><span>          |
</span></span><span style="display:flex;"><span>          v
</span></span><span style="display:flex;"><span>  context -&gt; model &lt;-&gt; allowed built-in/MCP tools
</span></span><span style="display:flex;"><span>          |
</span></span><span style="display:flex;"><span>          v
</span></span><span style="display:flex;"><span> transaction: output + terminal trace + context + optional delivery
</span></span></code></pre></div><p>This separation matters because a transport and a runtime answer different
questions. Telegram knows webhook authentication, chat identifiers, message
formatting, and Telegram&rsquo;s retry behavior. The runtime knows run state, context,
capabilities, and final output. Neither component needs to absorb the other&rsquo;s
failure model.</p>
<h2 id="scope-is-both-context-ownership-and-a-concurrency-key">Scope is both context ownership and a concurrency key</h2>
<p>Every run moves through five states:</p>
<table>
	<thead>
			<tr>
					<th>State</th>
					<th>Meaning</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>queued</code></td>
					<td>Durable work exists but has not acquired its execution lane.</td>
			</tr>
			<tr>
					<td><code>running</code></td>
					<td>The run owns its <code>(tenant, agent, scope)</code> lane.</td>
			</tr>
			<tr>
					<td><code>succeeded</code></td>
					<td>Canonical output and related durable state were finalized.</td>
			</tr>
			<tr>
					<td><code>failed</code></td>
					<td>Execution ended without a successful result.</td>
			</tr>
			<tr>
					<td><code>cancelled</code></td>
					<td>Cancellation won and successful finalization is no longer allowed.</td>
			</tr>
	</tbody>
</table>
<p>The tuple <code>(tenant, agent, scope)</code> is the serialization boundary. Runs for the
same tuple execute one at a time; unrelated scopes can run concurrently. The
claim is transactional, and the database also enforces that at most one run for
a scope is <code>running</code>.</p>
<p>Using scope for both rolling context and serialization is deliberate. If two
turns can modify the same conversation history concurrently, the runtime needs
a merge policy or a clear winner. <code>agentd</code> avoids inventing one: a scope has one
active owner. A Telegram chat can use <code>tg:&lt;chat_id&gt;</code>; a game can use a match and
seat identifier; another caller can define a different stable boundary.</p>
<p>This is not distributed locking. It is single-database coordination for one
host. There is no multi-process lease protocol, failover, or replication claim.</p>
<p>A process restart also has an explicit, conservative outcome. On startup,
persisted runs that were <code>running</code> become <code>failed</code> with an <code>agentd restarted</code>
error, while durable queued work remains available to the dispatcher. The
runtime does not try to reconstruct the interrupted model/tool loop or silently
execute it again. That avoids pretending an in-flight external effect is safe to
repeat, at the cost of requiring a caller or operator to decide whether a failed
turn should be resubmitted. More sophisticated recovery would need an explicit
side-effect protocol, not just a different status update.</p>
<h2 id="submission-idempotency-is-not-replay">Submission idempotency is not replay</h2>
<p>An optional <code>request_id</code> is unique within a tenant. Repeating the same
submission returns the existing run instead of creating another one. This is
useful when an HTTP client cannot tell whether its first request succeeded.</p>
<p>But request deduplication does not make the whole agent execution replayable.
During a run, the model can call tools, an MCP server can affect another system,
and a transport can deliver a message. Those effects do not become reversible
because the initial request had an idempotency key.</p>
<p>The raw <code>run_log</code> records model, tool, output, status, and error observations.
It is an inspection trace, not a deterministic re-execution engine. There is no
side-effect ledger, rollback protocol, or replay simulator. Calling these
different properties by different names prevents a comforting but false
exactly-once story.</p>
<h2 id="the-model-chooses-the-host-constrains">The model chooses; the host constrains</h2>
<p>An agent is configuration rather than executable plugin code: persona, model,
allowed capability families, limits, temperature, token budget, and context
window. The native loop sends visible schemas to an OpenAI-compatible provider,
validates the returned tool call, executes it in host code, records the result,
and continues until the model produces final JSON or reaches a boundary.</p>
<p>The public alpha has 15 built-in capabilities across artifacts, memory,
schedules, clock, bounded public-web access, and arithmetic. It intentionally
has no generic shell, arbitrary HTTP request, hidden filesystem handle, approval
queue, or operator execute endpoint.</p>
<p>MCP extends the tool catalog without changing that ownership model. Servers
belong to a tenant, discovery is explicit, exposed names must be unique, and an
allowlist can narrow the discovered catalog. Secret configuration stores the
names of environment variables rather than their values.</p>
<p>That is a capability boundary, not a sandbox. An operator-configured stdio MCP
process runs with the <code>agentd</code> OS user&rsquo;s host and network permissions. A model
can also be persuaded by a malicious prompt or tool result to call any capability
it can see. The safe rule is therefore simple: expose only side effects that are
acceptable without human approval, and isolate untrusted MCP servers outside
the runtime.</p>
<h2 id="successful-finalization-has-one-transaction-boundary">Successful finalization has one transaction boundary</h2>
<p>The most important write path happens after the model loop has produced a
successful result. One database transaction commits:</p>
<ul>
<li>the canonical output and <code>succeeded</code> run status;</li>
<li>the terminal trace event;</li>
<li>the bounded rolling context;</li>
<li>and, when explicitly requested, one pending delivery referencing the run.</li>
</ul>
<p>If cancellation has already changed the run state, successful finalization is
rejected. A cancelled run cannot leave behind successful output, updated
context, or a delivery row. A second finalization is rejected as well.</p>
<p>This transaction does not roll back external tool effects that occurred before
it. Its guarantee is narrower: readers do not observe a successful run whose
output, terminal trace, context, and delivery intent disagree with one another.
That is the consistency boundary the runtime can actually own.</p>
<h2 id="delivery-is-durable-intent-not-a-callback-hidden-in-execution">Delivery is durable intent, not a callback hidden in execution</h2>
<p>Every successful result is pullable. Delivery exists only when the caller
provides an explicit destination such as <code>tg:42</code>; scope is never silently
treated as an address.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>Telegram -&gt; webhook -&gt; turn with explicit tg:&lt;chat_id&gt; destination
</span></span><span style="display:flex;"><span>agentd    -&gt; atomic run finalization -&gt; delivery outbox
</span></span><span style="display:flex;"><span>adapter   -&gt; claim -&gt; Telegram API -&gt; acknowledge
</span></span></code></pre></div><p>Delivery rows reference the run instead of copying its output. An adapter
claims pending work with a random token and expiry, performs the remote side
effect, and acknowledges one of <code>delivered</code>, <code>retry</code>, or <code>failed</code>. An expired
claim can be issued again; a retry updates the same row rather than inserting a
new delivery.</p>
<p>The independent
<a href="https://github.com/minifish-org/agentd-telegram-adapter"><code>agentd-telegram-adapter</code></a>
uses exactly this interface. Its webhook path submits a turn and asks for an
explicit Telegram destination. It does not send a direct reply from the webhook
handler and does not fall back to polling run output as a second delivery path.
This removes two easy sources of duplicate messages.</p>
<p>The outbox still cannot prove that a remote system performed an effect if the
adapter crashes before acknowledgement. Claim expiry and retry make recovery
possible; they do not manufacture exactly-once semantics from an external API.</p>
<h2 id="state-is-separated-by-meaning-not-by-service-count">State is separated by meaning, not by service count</h2>
<p>The runtime uses one libSQL database. The schema separates responsibilities:</p>
<ul>
<li>runs own activation, status, canonical output, and requested destination;</li>
<li><code>run_log</code> owns raw execution observations;</li>
<li>contexts own recent messages for a scope;</li>
<li>memory owns explicit durable facts plus lexical and semantic indexes;</li>
<li>artifacts own larger payloads;</li>
<li>deliveries own remote-delivery state and retry fields;</li>
<li>schedules and MCP registrations remain tenant-scoped resources.</li>
</ul>
<p>This is intentionally less infrastructure than earlier prototypes. There is no
separate object store, vector service, audit database, or replay database. The
memory implementation keeps canonical text, an FTS5 index, and a pinned
384-dimension E5 embedding together; lexical and semantic ranks are fused with
RRF.</p>
<p>The trade-off is equally explicit: this pre-1.0 runtime does not preserve schema
or HTTP compatibility. Runtime data is treated as disposable. A schema mismatch
requires <code>--reset-data</code>, not a migration. That is acceptable for the current
personal-runtime scope, but it would not be an acceptable default for a mature
multi-user platform.</p>
<h2 id="design-claims-should-point-to-executable-evidence">Design claims should point to executable evidence</h2>
<p>The repository includes a
<a href="https://github.com/minifish-org/agentd/blob/main/docs/reliability.md"><code>reliability matrix</code></a>
that maps each important property to a named test. The current suite covers
tenant-scoped request deduplication, same-scope serialization, failed-agent lane
release, atomic finalization, cancellation races, pull-only success, delivery
reclaim and acknowledgement, MCP scoping, public-web network boundaries, memory
scoping, schema mismatch, and non-loopback authentication requirements.</p>
<p>There is also a credential-free deterministic demo:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-sh" data-lang="sh"><span style="display:flex;"><span>git clone https://github.com/minifish-org/agentd.git
</span></span><span style="display:flex;"><span>cd agentd
</span></span><span style="display:flex;"><span>./scripts/demo-e2e.sh
</span></span></code></pre></div><p>It starts a loopback OpenAI-compatible fixture, starts <code>agentd</code> with a fresh
database, creates a tenant and agent, submits a turn, waits for the result,
inspects the trace, verifies pull-only behavior, and exercises artifact storage.
The first run downloads about 448 MiB of revision- and checksum-pinned embedding
assets.</p>
<p>The fixture proves the documented runtime and API path. It does not prove model
quality, real-provider tool compatibility, prompt-injection resistance,
streaming behavior, or production latency. The release workflow separately runs
the real embedding smoke test and builds and inspects the complete container
image.</p>
<h2 id="the-gaps-are-part-of-the-design-document">The gaps are part of the design document</h2>
<p>The public alpha does not claim evidence for:</p>
<ul>
<li>process-kill fault injection at every transaction boundary;</li>
<li>multi-process or multi-host coordination, failover, or replication;</li>
<li>compatibility across database schema or HTTP versions;</li>
<li>load, soak, latency, quota, or denial-of-service limits;</li>
<li>deterministic replay or rollback of external tool effects;</li>
<li>sandboxing of operator-configured MCP processes;</li>
<li>behavior against every provider, MCP server, or transport adapter;</li>
<li>model safety or factual correctness.</li>
</ul>
<p>Its bearer token is an instance-wide operator credential, not end-user
authentication. Tenants provide resource namespaces; they do not isolate
mutually distrustful users who share that token. TLS termination, rate limits,
backups, and host-level resource isolation remain deployment responsibilities.
The full boundary is documented in the
<a href="https://github.com/minifish-org/agentd/blob/main/docs/threat-model.md"><code>threat model</code></a>.</p>
<p>Publishing these gaps is useful because an experimental system is easiest to
overstate precisely where its tests end. A reliability matrix should show both
the properties under test and the empty cells.</p>
<h2 id="what-building-it-changed-for-me">What building it changed for me</h2>
<p>My distributed-database background makes me look for ownership, monotonic
boundaries, and failure states before adding features. <code>agentd</code> applies those
habits at a smaller scale:</p>
<ol>
<li>A conversation scope needs an execution owner, not just a string in a prompt.</li>
<li>Idempotent submission, deterministic replay, and external-effect recovery are
separate problems.</li>
<li>Successful output is not complete until related durable state agrees at one
transaction boundary.</li>
<li>Transport integration belongs outside the runtime, but its delivery intent
must still participate in finalization.</li>
<li>A tool catalog is a security boundary only when the host validates it and the
deployment respects what the host cannot isolate.</li>
<li>Tests and explicit omissions are stronger project documentation than a long
feature list.</li>
</ol>
<p><code>agentd</code> remains experimental. It is not a general workflow engine, an HA agent
platform, or a sandbox for untrusted code. It is a public attempt to make one
personal-agent turn durable, scoped, inspectable, and deliverable—and to state
precisely where those guarantees stop.</p>
<p>Source, release notes, and the reproducible demo are available in the
<a href="https://github.com/minifish-org/agentd"><code>minifish-org/agentd</code></a> repository under
Apache-2.0.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Canopy: Local MCP Routing for Singapore PCN Loops</title>
      <link>https://blog.minifish.org/posts/canopy-singapore-pcn-routing/</link>
      <pubDate>Tue, 09 Jun 2026 09:00:00 +0800</pubDate>
      <guid>https://blog.minifish.org/posts/canopy-singapore-pcn-routing/</guid>
      <description>A project note on Canopy, a self-hosted MCP routing service for Singapore cycling and walking route planning with GraphHopper, OneMap, GPX export, and route audits.</description>
      <content:encoded><![CDATA[<p>Canopy is a local MCP server for Singapore cycling and walking route planning. It is built for agents, not for end users. Claude, Codex, LangChain, or another MCP client can call Canopy tools; the agent remains responsible for conversation and presentation.</p>
<p>The useful distinction is that Canopy does not try to be a map app. It is a route-planning capability.</p>
<h2 id="why-this-exists">Why this exists</h2>
<p>Singapore cycling routes are not only about shortest path. A good route often means:</p>
<ul>
<li>prefer PCN-like paths</li>
<li>avoid high-car roads</li>
<li>keep loops close to a target distance</li>
<li>export a track that can be followed elsewhere</li>
<li>explain how much of the route is car-free or on-road</li>
</ul>
<p>General routing APIs are not always good at expressing those preferences. Canopy uses a self-hosted GraphHopper service with a custom bike profile that strongly prefers cycleways, PCN-like paths, and low-car links while penalizing motor roads.</p>
<p>OneMap is used for geocoding and POIs, not routing.</p>
<h2 id="tool-surface">Tool surface</h2>
<p>The MCP server exposes tools such as:</p>
<ul>
<li><code>geocode(query)</code></li>
<li><code>plan_loop(start, distance_km, direction?, prefer=&quot;pcn&quot;)</code></li>
<li><code>route(origin, destination, prefer=&quot;pcn&quot;)</code></li>
<li><code>pois_along(geometry, types=[...])</code></li>
<li><code>audit_route(geometry)</code></li>
<li><code>export_gpx(geometry, name)</code></li>
</ul>
<p>That gives an agent a clean workflow: resolve a place, plan a route, audit the result, find POIs along the corridor, and export GPX.</p>
<h2 id="honest-boundaries">Honest boundaries</h2>
<p>Canopy optimizes for low-car and away-from-traffic routing. It does not avoid pedestrians, because Singapore PCNs are shared paths.</p>
<p>Round-trip distance is also approximate in GraphHopper. Canopy tries multiple seeds and scaled requests, then returns the actual distance instead of pretending the target was exact.</p>
<p>The project also intentionally avoids building turn-by-turn navigation. A downstream app can load the generated GPX track into something like OsmAnd or CoMaps.</p>
<h2 id="what-i-learned">What I learned</h2>
<p>MCP is a good fit when the tool is specific and verifiable. Route planning should not be hidden inside a chat answer. The agent should call a tool that returns geometry, distance, audit percentages, and a GPX path.</p>
<p>For location work, the agent&rsquo;s job is orchestration. The route engine should still be a route engine.</p>
<h2 id="current-status">Current status</h2>
<p>As of September 22, 2026, <a href="https://github.com/minifish-org/canopy">Canopy is public</a> under AGPL-3.0-or-later. It remains focused on Singapore routes and includes a Docker Compose quick start, offline tests, and map-data attribution notes. Coordinate-based routing can run without OneMap credentials; operators configure their own OneMap access for address lookup and theme POIs. The MCP endpoint is intended for local or private-network use.</p>
]]></content:encoded>
    </item>
    <item>
      <title>From AI Conversations to Published Blog: The MCP-Powered Publishing Revolution</title>
      <link>https://blog.minifish.org/posts/ai-mcp-blog-publishing-workflow/</link>
      <pubDate>Mon, 19 Jan 2026 10:00:00 +0800</pubDate>
      <guid>https://blog.minifish.org/posts/ai-mcp-blog-publishing-workflow/</guid>
      <description>A practical publishing workflow that turns AI conversations into Hugo posts through MCP, GitHub Actions, and a structured blog repository.</description>
      <content:encoded><![CDATA[<h2 id="the-problem-lost-context-lost-thoughts">The Problem: Lost Context, Lost Thoughts</h2>
<p>We&rsquo;ve all been there. You&rsquo;re deep in a technical discussion with an AI assistant—analyzing code, exploring architecture, or debugging a complex issue. The conversation is rich with insights, and you think: &ldquo;This would make a great blog post.&rdquo;</p>
<p>But then reality hits: you need to switch to your blog repository, format the content, commit it, push it, and wait for the build. By the time you&rsquo;re back, the original context is gone, and the momentum is lost.</p>
<p><strong>What if you could publish directly from where you are?</strong></p>
<h2 id="building-on-existing-automation">Building on Existing Automation</h2>
<p>In <a href="/posts/how-to-automatically-publish-a-blog-using-github-actions/">my previous post about automatically publishing a blog using GitHub Actions</a>, I set up a workflow where pushing to the blog repository triggers an automatic build and deployment to GitHub Pages. This solved the build and deployment automation, but there was still one manual step remaining: creating the post file itself.</p>
<p>The workflow I described there handles:</p>
<ol>
<li>Checking out the blog repository</li>
<li>Building the Hugo site with <code>make</code></li>
<li>Deploying to <code>jackysp.github.io</code></li>
</ol>
<p>But you still needed to be in the blog repository to create the post. That&rsquo;s where MCP changes everything.</p>
<h2 id="enter-mcp-the-missing-link">Enter MCP: The Missing Link</h2>
<p>The <a href="https://modelcontextprotocol.io/">Model Context Protocol (MCP)</a> is revolutionizing how AI agents interact with external systems. Instead of treating AI as a passive tool, MCP enables agents to act as autonomous agents with direct access to your tools and workflows.</p>
<p>In my setup, I&rsquo;ve connected MCP-enabled agents (like Cursor) directly to my blog repository via GitHub MCP. This means:</p>
<ul>
<li><strong>No context switching</strong>: Stay in your current working directory, whether it&rsquo;s a random project folder or a deep codebase exploration</li>
<li><strong>Preserve conversation flow</strong>: The AI maintains the full context of your discussion</li>
<li><strong>Direct publishing</strong>: Create and publish posts without leaving your IDE</li>
</ul>
<h2 id="the-architecture-seamless-integration">The Architecture: Seamless Integration</h2>
<p>Here&rsquo;s how the complete workflow operates:</p>
<pre tabindex="0"><code>┌─────────────────────────────────────────────────────────┐
│  AI Agent (Cursor/Claude) with MCP enabled              │
│  - Context: Any code repository or discussion            │
│  - Tool: GitHub MCP Server                               │
└──────────────────┬──────────────────────────────────────┘
                   │
                   │ Creates post via GitHub MCP
                   │
                   ▼
┌─────────────────────────────────────────────────────────┐
│  Blog Repository (jackysp/blog)                         │
│  - content/posts/&lt;slug&gt;/index.md                        │
│  - Commit: &#34;Publish: [title]&#34;                           │
└──────────────────┬──────────────────────────────────────┘
                   │
                   │ Push to master branch
                   │
                   ▼
┌─────────────────────────────────────────────────────────┐
│  GitHub Actions (from previous post)                     │
│  - Build: Hugo static site generation                   │
│  - Deploy: Push to jackysp.github.io                    │
└──────────────────┬──────────────────────────────────────┘
                   │
                   │ Published
                   │
                   ▼
┌─────────────────────────────────────────────────────────┐
│  Live Site (jackysp.github.io)                          │
│  - Post is live and accessible                           │
└─────────────────────────────────────────────────────────┘
</code></pre><p>The GitHub Actions part remains exactly as described in the previous post—no changes needed there. The MCP layer adds the ability to trigger it from anywhere.</p>
<h2 id="the-workflow-in-action">The Workflow in Action</h2>
<h3 id="1-ai-powered-content-creation">1. AI-Powered Content Creation</h3>
<p>When you&rsquo;re discussing a technical topic with an AI agent, you can simply ask:</p>
<blockquote>
<p>&ldquo;Turn this discussion into a blog post and publish it.&rdquo;</p>
</blockquote>
<p>The AI agent, with access to GitHub via MCP, can:</p>
<ul>
<li>Extract key insights from your conversation</li>
<li>Format content according to Hugo front matter requirements</li>
<li>Create properly structured markdown files</li>
<li>Handle images and assets</li>
<li>Commit and push to the repository</li>
</ul>
<h3 id="2-automated-build--deploy">2. Automated Build &amp; Deploy</h3>
<p>The moment a post is pushed to the <code>master</code> branch, the same GitHub Actions workflow from the previous post kicks in:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">on</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">push</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">branches</span>: [ <span style="color:#ae81ff">master ]</span>
</span></span></code></pre></div><p>The workflow (as detailed in <a href="/posts/how-to-automatically-publish-a-blog-using-github-actions/">the previous post</a>):</p>
<ol>
<li>Checks out the blog repository with submodules</li>
<li>Builds the Hugo site using <code>make</code></li>
<li>Deploys the built artifacts to <code>jackysp.github.io</code></li>
</ol>
<p>All without manual intervention.</p>
<h3 id="3-governance-through-contracts">3. Governance Through Contracts</h3>
<p>To ensure quality and prevent accidents, I&rsquo;ve implemented an <strong>AI Publishing Contract</strong> (<code>PUBLISHING.md</code>) that defines:</p>
<ul>
<li><strong>Allowed paths</strong>: Only <code>content/**</code> and <code>static/**</code> can be modified</li>
<li><strong>Post format</strong>: Required front matter fields (title, date, tags, slug, summary)</li>
<li><strong>Image handling</strong>: Standardized location and reference format</li>
<li><strong>Commit conventions</strong>: Single commit per post with descriptive messages</li>
</ul>
<p>This contract ensures that AI agents can publish content while respecting the repository structure and quality standards.</p>
<h2 id="why-this-matters-the-developer-experience-revolution">Why This Matters: The Developer Experience Revolution</h2>
<h3 id="zero-context-switching">Zero Context Switching</h3>
<p>Traditional workflow:</p>
<ol>
<li>Copy conversation → Switch to blog repo → Format → Commit → Push → Wait</li>
<li><strong>Context lost</strong>, momentum broken</li>
</ol>
<p>New workflow:</p>
<ol>
<li>Ask AI to publish → Done</li>
<li><strong>Context preserved</strong>, workflow continuous</li>
</ol>
<h3 id="capturing-technical-insights">Capturing Technical Insights</h3>
<p>The best technical insights often emerge during active problem-solving. With this workflow, you can:</p>
<ul>
<li>Document discoveries in real-time</li>
<li>Turn debugging sessions into tutorials</li>
<li>Transform architecture discussions into deep-dives</li>
<li>Share codebase explorations as learning resources</li>
</ul>
<h3 id="scaling-knowledge-sharing">Scaling Knowledge Sharing</h3>
<p>Previously, the friction of publishing meant many valuable insights were never written down. Now, the barrier to publishing is minimal, making it easier to:</p>
<ul>
<li>Share learnings with your team</li>
<li>Build a personal knowledge base</li>
<li>Contribute to the developer community</li>
<li>Document your problem-solving journey</li>
</ul>
<h2 id="technical-implementation-details">Technical Implementation Details</h2>
<h3 id="mcp-server-configuration">MCP Server Configuration</h3>
<p>The GitHub MCP server provides the AI agent with:</p>
<ul>
<li>Repository read/write access</li>
<li>File creation and modification</li>
<li>Commit and push capabilities</li>
<li>Branch management</li>
</ul>
<h3 id="github-actions-workflow">GitHub Actions Workflow</h3>
<p>The CI/CD pipeline (as described in <a href="/posts/how-to-automatically-publish-a-blog-using-github-actions/">the previous post</a>) handles:</p>
<ul>
<li>Go environment setup (for Hugo builds)</li>
<li>Repository checkout with submodules</li>
<li>Site generation via <code>make</code></li>
<li>Deployment to GitHub Pages repository</li>
</ul>
<p>No changes needed to the existing workflow—it just gets triggered from a new entry point.</p>
<h3 id="hugo-site-configuration">Hugo Site Configuration</h3>
<p>Posts follow Hugo&rsquo;s standard structure:</p>
<ul>
<li><strong>Location</strong>: <code>content/posts/&lt;slug&gt;/index.md</code></li>
<li><strong>Format</strong>: YAML front matter + Markdown content</li>
<li><strong>Images</strong>: Stored in each post bundle and referenced with relative filenames</li>
<li><strong>Draft control</strong>: <code>draft: true/false</code> for preview/publish</li>
</ul>
<h2 id="the-future-ai-augmented-documentation">The Future: AI-Augmented Documentation</h2>
<p>This workflow represents a shift toward <strong>AI-augmented documentation</strong>. Instead of treating AI as a writing assistant, we&rsquo;re treating it as a publishing agent that can:</p>
<ul>
<li>Understand context from code discussions</li>
<li>Extract technical insights automatically</li>
<li>Format and structure content appropriately</li>
<li>Publish without breaking workflow</li>
</ul>
<p>As MCP and similar protocols mature, we&rsquo;ll see more sophisticated capabilities:</p>
<ul>
<li>Automatic code analysis and explanation</li>
<li>Multi-post series generation from extended discussions</li>
<li>Cross-referencing with existing content</li>
<li>SEO and metadata optimization</li>
</ul>
<h2 id="getting-started">Getting Started</h2>
<p>If you want to set up a similar workflow:</p>
<ol>
<li><strong>Set up automated publishing</strong> (see <a href="/posts/how-to-automatically-publish-a-blog-using-github-actions/">my previous post</a>)</li>
<li><strong>Enable MCP in your AI agent</strong> (Cursor, Claude Desktop, etc.)</li>
<li><strong>Configure GitHub MCP server</strong> with repository access</li>
<li><strong>Define publishing contracts</strong> for governance</li>
<li><strong>Start publishing</strong> from your conversations</li>
</ol>
<p>The technical details are straightforward, but the impact on productivity and knowledge capture is profound.</p>
<h2 id="conclusion">Conclusion</h2>
<p>The intersection of AI agents, MCP protocols, and automated CI/CD creates a new paradigm for technical publishing. By building on the existing GitHub Actions automation and adding MCP as the entry point, we eliminate context switching and reduce friction.</p>
<p>This isn&rsquo;t just about automating blog posts—it&rsquo;s about <strong>preserving the flow state of technical discovery</strong> and making knowledge sharing as natural as having a conversation.</p>
<p>The future of technical documentation is here, and it&rsquo;s conversational.</p>
<hr>
<p><em>This post was created and published using the exact workflow described above—from a discussion about workflow automation to a live blog post, all without leaving the conversation context.</em></p>
]]></content:encoded>
    </item>
  </channel>
</rss>
