The Powerduck Blog

API engineering, from the spec out

Product updates, engineering notes, and guides for designing, debugging, testing, mocking, and serving MCP tools from one OpenAPI spec.

Browse the guides
mcp 3 min read

MCP Tools vs Resources vs Prompts: What to Expose to an AI Agent

Most teams expose everything as MCP tools and end up with a catalog the model cannot navigate. The protocol defines three primitives for a reason: tools act, resources are readable context, and prompts package reusable workflows. Here is how to decide, with examples from an API platform.

Read article
mcp 4 min read

Versioning MCP Tools Without Breaking the Agents That Call Them

Agents discover MCP tools at runtime and learn names and parameters from descriptions, so a renamed tool is a silent production break. Here is how to evolve a tool catalog: additive changes, deprecation windows, versioned names as a last resort, and CI diffs from the source spec.

Read article
mcp 4 min read

MCP stdio vs Remote Transports: Run It Locally or Host It?

The same MCP server can run over stdio on a laptop or Streamable HTTP behind a domain, and the choice changes auth, state, latency, and who can use it. Here is a decision framework with the actual launch commands and client config for each transport.

Read article
mcp 4 min read

MCP Authentication Explained: OAuth 2.1 for Remote MCP Servers

Local stdio MCP servers inherit your CLI credentials, so nobody notices auth until they host one. Remote MCP servers require OAuth 2.1 with PKCE, metadata discovery, and short-lived tokens. Here is the full flow and the mistakes that get servers rejected by clients.

Read article
mcp 4 min read

Connect Cursor and Claude Code to your internal API over MCP (step by step)

Stop pasting internal API docs into every agent session. Serve the OpenAPI spec as a local or hosted MCP endpoint, register it once in Cursor and Claude Code, and let the agent call typed tools. Here is the full setup, auth scoping, and the verification checklist.

Read article
testing 3 min read

From a scanned spec to mocks, scenario tests, and an MCP server

A scanned document is only worth something if the team exercises it. Start a mock for blocked consumers, chain real scenario tests against staging, and serve the spec as an MCP server for internal agents.

Read article
AI Agents 4 min read

Generate code from the spec, not the spec from the code

Agents guess field names when they never see the contract. Serve the spec over MCP, generate one verified vertical slice at a time, run scenarios against localhost, and rescan to catch drift.

Read article
API Design 3 min read

Designing an API before the first line of code

Behavior first, routes second. AI drafts the OpenAPI contract as reviewable diffs, the team settles money, idempotency, and error envelopes up front, and mocks plus scenarios define done before implementation starts.

Read article