Hacker News new | ask | show | jobs
by didip 31 days ago
I never quite understand why /mcp endpoint is needed.

You can still keep using Rest API with swagger docs and tell the AI to read the swagger docs. It's the same thing. The entire Rest API specification is a lot more flexible than the JSON RPC format /mcp uses.

2 comments

MCP is fine for exposing tools that don't have APIs, but wrapping an API is an MCP is fine if you like consistency.

Personally, for just tools, I wire up tool calls with context captured via system prompt.

rest api with swagger docs requires one extra hop to pull the details necessary to interact with the api, and it pollutes context in a similar way as mcp.

ideally what you would have is skills + scripts that the agent can load progressively to interact with the api

or even better: a single cli tool the agent is aware of, and which combines `--help` output with `tldr` tips, when the command is incomplete, and prints out helpful error messages when the incantation is wrong