{"slug": "how-we-built-a-remote-10-tool-streamable-http-mcp-server-and-13-3-kib-link-in-in", "title": "How We Built a Remote 10-Tool Streamable HTTP MCP Server and 13.3 KiB Link-in-Bio in Go", "summary": "A developer built Linq.es, a link-in-bio platform whose public pages ship 13.3 KiB of gzipped first-party CSS and JS with no SPA framework, alongside a remote MCP server at https://linq.es/mcp that exposes 10 tools over Streamable HTTP (JSON-RPC 2.0, MCP spec 2025-03-26) with bearer-token auth and no local npx or stdio wrapper. The writeup details two Go/Gin implementation lessons: returning 202 Accepted with an empty body for JSON-RPC notifications that omit the id field, and running storage and CDN cache purges inside a sync.WaitGroup before responding to tools/call so serverless CPU throttling doesn't leave stale pages.", "body_md": "Public link-in-bio pages are structurally simple documents: an avatar, a name, a contact bar, and 5 to 20 links. Yet most commercial bio-link platforms render them as client-heavy Single-Page Applications that download hundreds of kilobytes of framework JavaScript inside Instagram, TikTok, or WhatsApp in-app WebViews before painting a button.\n\nWhen we built [Linq.es](https://linq.es) and its [Official Remote MCP Server (`https://linq.es/mcp`)](https://linq.es/integrations/mcp), we took the opposite path on both the public frontend and the AI agent layer:\n\n`html/template`)` 5.1 KiB` of gzipped async CSS, `8.2 KiB` of gzipped `defer` vanilla JS, and zero React, Next.js, or Vue runtime (`13.3 KiB` total gzipped first-party CSS + JS).`https://linq.es/mcp` over Streamable HTTP (`JSON-RPC 2.0`, MCP spec `2025-03-26`)` lnq_live_...`), without installing a local `npx` or Python `stdio` wrapper.\nBelow are the main architectural lessons we learned building both layers in Go.\n\nMost link-in-bio clicks happen inside constrained mobile WebViews (Instagram, TikTok, LinkedIn, X, and WhatsApp) over variable cellular connections. Every extra script tag, font round-trip, and client hydration pass delays First Contentful Paint and increases bounce rates before a visitor taps a `wa.me` button or downloads a `.vcf` contact card.\n\nOn Linq.es, public profiles render complete semantic HTML in the European Union behind a multi-tier cache (in-memory L1, persistent object storage L2, and Cloudflare Edge CDN):\n\n```\nAsync stylesheet:     ~5.1 KiB gzipped (loaded non-blocking)\nDeferred vanilla JS:  ~8.2 KiB gzipped (loaded with defer)\nTotal external CSS+JS: 13.3 KiB gzipped (zero client SPA framework)\n```\n\nNo third-party ad pixels (Meta, TikTok, or GA4) are injected on public pages unless a Pro profile owner explicitly configures their own measurement IDs.\n\nMany early MCP integrations wrap an existing REST API inside a local Node.js `stdio` package that users run via `npx -y @vendor/mcp-server`. That introduces three recurring friction points:\n\nWith the `2025-03-26` Streamable HTTP specification, an MCP server runs as a standard HTTPS JSON-RPC 2.0 endpoint:\n\n`GET https://linq.es/mcp` serves human-readable discovery metadata (`name: \"linqes-mcp\"`, `protocolVersion: \"2025-03-26\"`, `transport: \"streamable-http\"`).` POST https://linq.es/mcp` handles `initialize`, `notifications/initialized`, `ping`, `tools/list`, and authenticated `tools/call` executions.`202 Accepted` with an empty body\nDuring the MCP handshake, right after `initialize` succeeds, strict clients send a JSON-RPC notification (`{\"jsonrpc\": \"2.0\", \"method\": \"notifications/initialized\"}`) that omits the `id` field. If your HTTP router wraps every return path in a `200 OK` JSON-RPC envelope with `\"id\": null`, strict clients treat the unexpected body as a protocol error.\n\nIn Go + Gin, handling JSON-RPC notifications before dispatching methods keeps the handshake clean:\n\n```\n// JSON-RPC notifications omit \"id\" and must not return a JSON-RPC response body.\nif strings.HasPrefix(req.Method, \"notifications/\") || len(req.ID) == 0 {\n    c.Status(http.StatusAccepted)\n    return\n}\n```\n\nOn serverless container platforms, CPU allocation drops as soon as the HTTP response finishes writing. If an AI agent calls `add_profile_link` or `update_profile_link` and you trigger CDN cache purges in detached background goroutines, the container can be throttled before the outbound purge completes, leaving visitors looking at stale HTML when the agent reports the link is live.\n\nRunning storage and CDN cache invalidations concurrently inside a `sync.WaitGroup` before returning the `tools/call` response guarantees that by the time Claude or Cursor replies `\"Done, live at https://linq.es/handle\"`, public visitors already see the updated page:\n\n``` js\nvar wg sync.WaitGroup\nwg.Add(2)\ngo func() {\n    defer wg.Done()\n    purgeObjectCache(ctx, profileHandle)\n}()\ngo func() {\n    defer wg.Done()\n    purgeEdgeCDN(ctx, profileHandle)\n}()\nwg.Wait()\n```\n\nWhen exposing read, write, and delete operations side by side, tool descriptions alone should not force an LLM host to guess which calls are safe to auto-approve and which require human confirmation.\n\nAdding standard MCP `annotations` (`readOnlyHint`, `destructiveHint`, `idempotentHint`, and `openWorldHint`) using explicit boolean pointers in Go ensures `false` values serialize cleanly instead of being dropped by `omitempty`:\n\n```\ntype MCPToolAnnotations struct {\n    Title           string `json:\"title,omitempty\"`\n    ReadOnlyHint    *bool  `json:\"readOnlyHint,omitempty\"`\n    DestructiveHint *bool  `json:\"destructiveHint,omitempty\"`\n    IdempotentHint  *bool  `json:\"idempotentHint,omitempty\"`\n    OpenWorldHint   *bool  `json:\"openWorldHint,omitempty\"`\n}\n```\n\nCombined with `\"additionalProperties\": false` on every tool's `inputSchema` and clear prerequisite notes (e.g., calling `list_profiles` to discover handles and `list_profile_links` before `update_profile_link` or `delete_profile_link`), agents avoid hallucinating parameters or accidentally deleting links when a user only asked to hide one (`active: false`).\n\nOnce you generate a Personal API Key in Account Settings, you can connect Cursor (`~/.cursor/mcp.json`), Claude Desktop, Windsurf, or Gemini CLI (`~/.gemini/settings.json`) directly over HTTPS:\n\n```\n{\n  \"mcpServers\": {\n    \"linqes\": {\n      \"url\": \"https://linq.es/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer lnq_live_YOUR_PERSONAL_API_KEY\"\n      }\n    }\n  }\n}\n```\n\nFrom there, your agent can use all 10 tools across up to 5 profiles and 500 `/s/` shortlinks:\n\n`list_profiles`: List owned profiles, themes, public URLs, and cumulative view counts.`get_profile_analytics`: Pull 1-to-90-day views, clicks, CTR percentage, referrers, countries, devices, and daily time series.`list_profile_links`: Inspect every link's `key`, `url`, active state, click count, and iOS/Android overrides.` add_profile_link`: Publish a link or social icon with optional `badgeText`, `iosUrl`, `androidUrl`, `scheduleStart`/` scheduleEnd` (`RFC3339`), live countdown, or click badge.` update_profile_link` & `delete_profile_link`: Edit, toggle (` active: false`), or permanently remove links with immediate cache invalidation.`import_bio_links`: Migrate public links from an existing Linktree, Beacons, or Bio.link URL in one call.`list_shortlinks` & `create_shortlink`: Create and audit `https://linq.es/s/:code` shortlinks with custom `3-50` character slugs, iOS/Android routing, and `utm_source` through `utm_content` tags.`list_leads`: Retrieve recent Name, Email, and WhatsApp contacts captured via your profile's Lead Magnet form.\nYou can inspect the live discovery metadata anytime with `curl -s https://linq.es/mcp | jq .`, try the free `.vcf`, WhatsApp, and UTM generators without an account at [https://linq.es/tools](https://linq.es/tools), or read the full MCP setup docs at [https://linq.es/integrations/mcp](https://linq.es/integrations/mcp).", "url": "https://wpnews.pro/news/how-we-built-a-remote-10-tool-streamable-http-mcp-server-and-13-3-kib-link-in-in", "canonical_source": "https://dev.to/giulianobr/how-we-built-a-remote-10-tool-streamable-http-mcp-server-and-133-kib-link-in-bio-in-go-2icp", "published_at": "2026-11-16 15:11:20+00:00", "updated_at": "2026-11-16 15:22:06.645812+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "developer-tools", "ai-tools"], "entities": ["Linq.es", "MCP", "Go", "Gin", "Cloudflare", "Claude", "Cursor"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/how-we-built-a-remote-10-tool-streamable-http-mcp-server-and-13-3-kib-link-in-in", "markdown": "https://wpnews.pro/news/how-we-built-a-remote-10-tool-streamable-http-mcp-server-and-13-3-kib-link-in-in.md", "text": "https://wpnews.pro/news/how-we-built-a-remote-10-tool-streamable-http-mcp-server-and-13-3-kib-link-in-in.txt", "jsonld": "https://wpnews.pro/news/how-we-built-a-remote-10-tool-streamable-http-mcp-server-and-13-3-kib-link-in-in.jsonld"}}