How AI Agents Should Connect: MCP, REST API or CLI?
AI summary
A Reddit user described building an application with three interfaces: an MCP server, a REST API and a CLI. Based on personal research, the author recommends prioritizing MCP for most applications, while sharing the same codebase with a REST API and adding a CLI only when users need one.
In-depth insight
The post offers developers a practical interface-selection pattern for making applications usable by AI agents while retaining conventional programmatic access.
| I wanted AI agents to be able to use my apps well, so I did a ton of research and created one with an MCP, an API, and a CLI based on the current industry best-practices. Based on everything I learned, I came to the conclusion that for probably 99% of apps, you should put most of your focus on the MCP server. But, at the same time, you should still build a good REST API on the same code and only add a CLI if your users really need it. There's a smart approach to this that makes it easy and I outlined it all in the article. submitted by /u/hottown [link] [comments] |