<?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>Api-Integration | Roy Gabriel</title><link>https://roygabriel.dev/tags/api-integration/</link><description>Roy Gabriel: DevOps Architect &amp; Applied AI Engineer. Technical blog on Go, MCP servers, Kubernetes, and production AI systems.</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Fri, 27 Feb 2026 03:18:04 +0000</lastBuildDate><atom:link href="https://roygabriel.dev/tags/api-integration/index.xml" rel="self" type="application/rss+xml"/><item><title>Go MCP Server Ecosystem</title><link>https://roygabriel.dev/projects/mcp-servers/</link><pubDate>Sun, 01 Sep 2024 00:00:00 +0000</pubDate><guid>https://roygabriel.dev/projects/mcp-servers/</guid><description>Production-grade MCP servers in Go that expose iCloud, Todoist, and Notion as safe, typed tools for LLM agents.</description><content:encoded>&lt;h2 id="summary"&gt;Summary&lt;/h2&gt;
&lt;p&gt;This project is a growing ecosystem of &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; servers written in &lt;strong&gt;Go&lt;/strong&gt;. Each server wraps a real service (calendar, email, task management, knowledge base, etc.) and exposes it as a &lt;strong&gt;typed, tool-based interface&lt;/strong&gt; for MCP clients (e.g., Claude Desktop / Claude Code). [1][2]&lt;/p&gt;
&lt;p&gt;The theme is simple: &lt;strong&gt;agents are only as useful as the tools they can call&lt;/strong&gt;, and &amp;ldquo;tooling&amp;rdquo; needs the same production bar as any other integration layer: security boundaries, backpressure, observability, and predictable failure modes.&lt;/p&gt;
&lt;h3 id="open-source-mcp-servers"&gt;Open-source MCP servers&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;iCloud Calendar MCP Server (CalDAV):&lt;/strong&gt; list calendars, search events, create/update/delete events; includes recurring event expansion, multi-account support, rate limiting, retries, audit logs, and Prometheus/health endpoints. [4]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;iCloud Email MCP Server (IMAP/SMTP):&lt;/strong&gt; search and read mail, send/reply, manage folders, handle attachments, and apply safety annotations (read-only vs destructive) with strict input validation. [5]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Todoist MCP Server (REST API v2 + Sync batching):&lt;/strong&gt; manage tasks/projects/labels/comments; supports bulk operations with rate-limit-aware batching and Todoist filter syntax. [6]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Notion MCP Server (Notion REST API):&lt;/strong&gt; pages, databases, blocks, comments, users; includes templates, exports (Markdown/CSV), smart queries, and built-in throttling/retries. [7]&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="private--not-yet-open-sourced-connectors"&gt;Private / not-yet-open-sourced connectors&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;ve also built MCP connectors for enterprise systems that aren&amp;rsquo;t ready to open-source yet (either due to org-specific assumptions, credentials, or hard-coded domain models):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Kubernetes&lt;/li&gt;
&lt;li&gt;Argo CD&lt;/li&gt;
&lt;li&gt;SonarQube&lt;/li&gt;
&lt;li&gt;GitHub&lt;/li&gt;
&lt;li&gt;Temporal&lt;/li&gt;
&lt;li&gt;OpenText Octane&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(These follow the same design patterns described below.)&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;Agents need to interact with real systems: calendars, email, task systems, and internal developer platforms. Without a standard interface, every tool integration becomes a one-off, and reliability/guardrails drift between projects.&lt;/p&gt;
&lt;p&gt;MCP solves the &amp;ldquo;standard interface&amp;rdquo; problem by defining how a host/client can discover and call server-exposed tools over a consistent protocol. [1][2]
This ecosystem focuses on solving the remaining hard part: &lt;strong&gt;making those integrations production-grade&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="constraints"&gt;Constraints&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Local-first security boundary&lt;/strong&gt;: credentials live on the host where the server runs (env vars, secret mounts, keychain tooling); the server talks directly to the upstream service with no proxy SaaS. [4][5]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Safety by design&lt;/strong&gt;: explicit tool schemas, input validation, and tool classification (read-only vs mutating) so clients can apply guardrails. [4][5]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fast &amp;amp; predictable&lt;/strong&gt;: low startup time and bounded tool-call latency (timeouts + backpressure). [4][5][7]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Operable like a real service&lt;/strong&gt;: logs that correlate per request, rate limiting, retries/backoff where appropriate, and health/metrics where it matters. [4][6][7]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Portable distribution&lt;/strong&gt;: ship as single Go binaries (and containers where useful), so the &amp;ldquo;tool layer&amp;rdquo; is easy to deploy alongside agents. [4][5]&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="architecture"&gt;Architecture&lt;/h2&gt;
&lt;p&gt;At a high level, every server follows the same pattern:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;MCP client (hosted by Claude / an agent runtime)&lt;/strong&gt; communicates with the server (typically over stdio transport).&lt;/li&gt;
&lt;li&gt;The server validates inputs, applies middleware (timeouts, logging, rate limits), and calls the upstream API/protocol.&lt;/li&gt;
&lt;li&gt;Results are mapped into safe, typed tool outputs (and errors are normalized for the client).&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;┌───────────────────────────┐ MCP (tools) ┌────────────────────────────┐
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ Claude Desktop / Code │ ───────────────────────────▶ │ mcp-&amp;lt;service&amp;gt; (Go binary) │
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ (MCP host + client) │ ◀─────────────────────────── │ - tool schemas + handlers │
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;└───────────────────────────┘ JSON-RPC/session │ - auth + validation │
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; │ - rate limit + retries │
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; └───────────┬────────────────┘
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; │
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; │ service protocol / API
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ▼
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ┌──────────────────────────────┐
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; │ iCloud / Todoist / Notion ... │
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; └──────────────────────────────┘
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="cross-cutting-production-traits"&gt;Cross-cutting &amp;ldquo;production traits&amp;rdquo;&lt;/h3&gt;
&lt;p&gt;Instead of building one-off scripts, these servers implement common production patterns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Timeout middleware&lt;/strong&gt; on every tool call (so agents don&amp;rsquo;t hang forever). [4][5][7]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Request correlation IDs&lt;/strong&gt; and structured logs (debuggable across multi-step agent runs). [4][5]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rate limiting + backoff&lt;/strong&gt; when upstream services throttle (e.g., iCloud and Notion). [4][7]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bulk operation strategies&lt;/strong&gt; that reduce API calls (e.g., Todoist Sync API batching for bulk changes). [6]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Health + metrics endpoints&lt;/strong&gt; where running in containers makes sense (notably the iCloud Calendar server). [4]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automated CI&lt;/strong&gt; (race detector, linting, vulnerability checks) to keep &amp;ldquo;tool servers&amp;rdquo; from becoming unreviewed glue. [4][5]&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="key-decisions"&gt;Key decisions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Go for tool servers&lt;/strong&gt;: predictable concurrency, easy cross-platform builds, and the &amp;ldquo;single static-ish binary&amp;rdquo; deployment model fits MCP servers well, especially when they&amp;rsquo;re launched per-session or run as small sidecars. [4][5]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Independent binaries per integration&lt;/strong&gt;: calendar ≠ email ≠ tasks. Separate processes isolate failures, limit blast radius, and make upgrades/rollbacks straightforward.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local-first auth&lt;/strong&gt;: app-specific passwords (iCloud), API tokens (Todoist), integration tokens (Notion). The servers are designed so secrets stay on your machine / in your cluster secrets manager, not copied into prompts. [4][5][6][7]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use an MCP SDK, focus on semantics&lt;/strong&gt;: the implementations use the Go MCP SDK (&lt;code&gt;mark3labs/mcp-go&lt;/code&gt;) so most effort goes into tool behavior, validation, and safety. [8][9]&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="outcome"&gt;Outcome&lt;/h2&gt;
&lt;p&gt;This ecosystem has produced multiple MCP servers that are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;useful&lt;/strong&gt; (real workflows: schedule management, inbox operations, task execution, knowledge base automation),&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;operationally hardened&lt;/strong&gt; (timeouts, retries, rate limits, observability),&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;portable&lt;/strong&gt; (binaries + releases for easy distribution),&lt;/li&gt;
&lt;li&gt;and &lt;strong&gt;structured enough to be safe&lt;/strong&gt; (typed schemas, validation, tool annotations).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Concrete examples from the current repos:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;iCloud Calendar server&lt;/strong&gt; exposes &lt;strong&gt;5 tools&lt;/strong&gt;, supports &lt;strong&gt;multi-account&lt;/strong&gt;, and includes &lt;strong&gt;health + Prometheus metrics&lt;/strong&gt;, &lt;strong&gt;audit logging without PII&lt;/strong&gt;, retries/backoff, and rate limiting. [4]&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;iCloud Email server&lt;/strong&gt; exposes &lt;strong&gt;14 tools&lt;/strong&gt; and includes &lt;strong&gt;thread-safe IMAP access&lt;/strong&gt;, request correlation IDs, strict validation, and &amp;ldquo;read-only vs destructive&amp;rdquo; tool annotations. [5]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tagged releases&lt;/strong&gt; exist across the servers (e.g., iCloud Calendar &lt;code&gt;v1.1.0&lt;/code&gt;, iCloud Email &lt;code&gt;v0.6.0&lt;/code&gt;, Todoist &lt;code&gt;v1.0.0&lt;/code&gt;, Notion &lt;code&gt;v0.8.0&lt;/code&gt; published on Feb 7, 2026). [4][5][6][7]&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="stack"&gt;Stack&lt;/h2&gt;
&lt;p&gt;Go, MCP, &lt;code&gt;mark3labs/mcp-go&lt;/code&gt;, CalDAV, IMAP/SMTP, REST APIs (Todoist/Notion), Docker (distroless where applicable), Prometheus metrics (where applicable).&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="references"&gt;References&lt;/h2&gt;
&lt;p&gt;[1] Model Context Protocol (MCP): Specification (Protocol Revision 2025-11-25). &lt;a href="https://modelcontextprotocol.io/specification/2025-11-25" target="_blank" rel="noopener noreferrer"&gt;https://modelcontextprotocol.io/specification/2025-11-25&lt;/a&gt;
[2] Model Context Protocol (MCP): Architecture (Protocol Revision 2025-06-18). &lt;a href="https://modelcontextprotocol.io/specification/2025-06-18/architecture" target="_blank" rel="noopener noreferrer"&gt;https://modelcontextprotocol.io/specification/2025-06-18/architecture&lt;/a&gt;
[3] Roy Gabriel: &amp;ldquo;Go MCP Server Ecosystem&amp;rdquo; (original portfolio page). &lt;a href="https://www.roygabriel.dev/projects/mcp-servers/" target="_blank" rel="noopener noreferrer"&gt;https://www.roygabriel.dev/projects/mcp-servers/&lt;/a&gt;
[4] GitHub: roygabriel/mcp-icloud-calendar. &lt;a href="https://github.com/roygabriel/mcp-icloud-calendar" target="_blank" rel="noopener noreferrer"&gt;https://github.com/roygabriel/mcp-icloud-calendar&lt;/a&gt;
[5] GitHub: roygabriel/mcp-icloud-email. &lt;a href="https://github.com/roygabriel/mcp-icloud-email" target="_blank" rel="noopener noreferrer"&gt;https://github.com/roygabriel/mcp-icloud-email&lt;/a&gt;
[6] GitHub: roygabriel/mcp-todoist. &lt;a href="https://github.com/roygabriel/mcp-todoist" target="_blank" rel="noopener noreferrer"&gt;https://github.com/roygabriel/mcp-todoist&lt;/a&gt;
[7] GitHub: roygabriel/mcp-notion. &lt;a href="https://github.com/roygabriel/mcp-notion" target="_blank" rel="noopener noreferrer"&gt;https://github.com/roygabriel/mcp-notion&lt;/a&gt;
[8] GitHub: mark3labs/mcp-go. &lt;a href="https://github.com/mark3labs/mcp-go" target="_blank" rel="noopener noreferrer"&gt;https://github.com/mark3labs/mcp-go&lt;/a&gt;
[9] go.mod (module dependencies) for the MCP servers (e.g., &lt;code&gt;mark3labs/mcp-go&lt;/code&gt; used in this ecosystem).
- &lt;a href="https://raw.githubusercontent.com/roygabriel/mcp-icloud-calendar/main/go.mod" target="_blank" rel="noopener noreferrer"&gt;https://raw.githubusercontent.com/roygabriel/mcp-icloud-calendar/main/go.mod&lt;/a&gt;
- &lt;a href="https://raw.githubusercontent.com/roygabriel/mcp-icloud-email/main/go.mod" target="_blank" rel="noopener noreferrer"&gt;https://raw.githubusercontent.com/roygabriel/mcp-icloud-email/main/go.mod&lt;/a&gt;
- &lt;a href="https://raw.githubusercontent.com/roygabriel/mcp-todoist/main/go.mod" target="_blank" rel="noopener noreferrer"&gt;https://raw.githubusercontent.com/roygabriel/mcp-todoist/main/go.mod&lt;/a&gt;
- &lt;a href="https://raw.githubusercontent.com/roygabriel/mcp-notion/main/go.mod" target="_blank" rel="noopener noreferrer"&gt;https://raw.githubusercontent.com/roygabriel/mcp-notion/main/go.mod&lt;/a&gt;
&lt;/p&gt;</content:encoded></item></channel></rss>