APIs and FastAPI in plain words
GET /products returns the list, POST /products takes a new item - one endpoint, two meanings, and the method is what sets them apart. Then JSON, the response status and fetch on the page side: 404 and 500 do not throw on their own, the res.ok check is yours to write. FastAPI turns up at the end.
MCP and APIs: what the agent uses and what the app uses
The agent visited the source, worked out the format and built the map. Then the page gets opened by someone with no Claude Code at all, and the request for data has to come from somewhere else. Two separate chains, MCP only in the upper one, and a check of what still runs once the session is closed.
API keys and environment variables
The service hands you a long string and nothing says where it goes: into the chat, into a file beside the code, straight into the config? A key baked into page code at build time reaches every visitor with the JavaScript, .env or not. Then: whose environment you set up, and how to check it without printing the value.
GO TO FULL VERSION