Live API specs for coding agents

2026年8月30日2 次浏览来源:Dev.to阅读原文

Live API specs for coding agents An agent writing frontend code has to know the backend's API.

It has three options.

It can read the backend source and work out from scratch what the service already publishes.

It can ask you, which promotes you to API documentation.

Or it can swallow the entire OpenAPI document in order to use one route out of it.

Then it does the same thing again tomorrow, against a stale you exported last week. takes the spec straight from the running service, caches it, and serves it one operation at a time.

The config That is the whole setup.

One operation, not the whole spec The agent lists the definitions in , picks the one it needs, and fetches that.

For an OpenAPI document the path operations are exposed as definitions named , so it can also search by keyword.

A few hundred tokens for the operation it is writing against, instead of the entire document.

That keeps working as the service grows, which a pasted spec does not.

The backend does not have to be running Every call is answered from the cached spec, never from the network.

The fetch happens on startup and then in the background while you work, so an endpoint you added 20 seconds ago is already visible.

Start the backend once, shut it down, and keep building the frontend.

The agent still has real routes and real payload shapes.

If the service is down, or answers with something that is not a spec, the last known-good copy keeps being served.

Code and issues: github.com/jgauffin/dev-docs-mcp.

On npm as .

分享
Baike.dev

baike.dev helps you discover great languages, frameworks, databases, DevOps and cloud-native tools.

Quick links

About

Contribute

Found a great developer tool? Share it with the community.

Submit a tool
© 2026 baike.dev Developer EncyclopediaUpdated daily · Discover great developer tools