12 ms·
MCP vs. API Explained
- smallnix 2y agoSo it's an indirection layer to the actual APIs. The value of MCP then depends on it's adoption. If I need to write an MCP adapter for everything, it's value is little. If everyone (API owners, OS, Clouds, ...) puts in the work to have an MCP compatible interface it's valuable. In a world where I need to build my own X-to-USB dongle for every device myself, I wouldn't use USB, to stay with the articles analogy.
- redm 2y agoWhat the article doesn't say (well, there's a lot it doesn't say) is that this protocol was created by Anthropic but is being adopted more widely. MCP reminds me of a new platform opportunity akin to the Apple App Store. It's rapidly adopted, with offerings from GitHub, Stripe, Slack, Google Maps, AirTable, etc. Many more non-official integrations are already out there. I expect this will only gain adoption over the coming year.
- fallinditch 2y agoYes. The article comes across as a response from an LLM chat. I think that it's OK to write blog posts with AI assistance, and I like the logical and simple writing style that these models output. But with MCP there's not a whole lot of information out there for LLMs to digest and so perhaps for that reason the article is not particularly insightful. Thank you HN for bringing the insights!
- norsak 2y agoAuthor here, good point! I should have mentioned that MCP was created by Anthropic but is seeing wider adoption. Appreciate the feedback - brb I'll update the post to include this!
- jameslk 2y agoIf the goal is to build AI agents, I’d think the maximum utility from them would come from building agents that can use the UI that humans use. Or at the very least, the lesser available API. MCP is yet another interface to services when there’s already at least two out there available to use
- paulgb 2y agoOne thing I like about MCP's decision _not_ to just use HTTP APIs is that it makes it possible to build and distribute tools that people can use without having to set up a server for them. This goes a long way for enabling open-source and locally-running tools.
- ozten 2y agoA sample MCP example with data would be helpful.
- norsak 2y agoAuthor here - yeah that makes sense. A real example would def make it clearer - I'll add one. Thanks for the suggestion!
- 1116574 2y agoThe article has the same usb-c photo three times, but doesn't actually explain what it is, or how it works.
- doug_durham 2y agoThe usb-c metaphor along with most of the text are lifted from the Anthropic documentation without attribution. I'm not impressed with the author.
- SamBam 2y agoNot only that, but the whole section on "Consider these scenarios" simply described the same thing as an API each time, but added words like "smoothly" and "richer" to make it sound different. I honestly think most of the article was written by an LLM.
- crabmusket 2y agoThe structure seems very LLM-ish. And the details are blurry: > Two-way communication: MCP supports persistent, real-time two-way communication - similar to WebSockets. The AI model can both retrieve information and trigger actions dynamically". This is not what two-way communication means.
- swyx 2y agounfortunately it is indistinguishable from what a reasonable human high on mcp copium might write
- norsak 2y agoAuthor here – fair point! I can def see how it could've used more explanation. I'll update the post - appreciate the heads-up!
- rwoerz 2y agoHow many R's are in "strawberry"? ;)
- starik36 2y agoIt seems like MCP is a pretty cool protocol, but has anyone seen any actually useful integrations? I've played a lot with the FileSystem MCP server but couldn't get it to do something useful that I can't already do faster on my own. For instance, asking it how many files have word "main" in it. It returns 267, but in reality there are 12k. Looks promising, but I am still looking for useful ways to integrate it into my workflow.
- gsibble 2y agoSo far I have not found anything useful.
- nsonha 2y agohttps://x.com/thdxr/status/1897369381195092197 https://x.com/thdxr/status/1897369381195092197
- cloudking 2y agoI've found BrowserTools MCP useful in my development workflow: https://browsertools.agentdesk.ai/installation https://browsertools.agentdesk.ai/installation In Cursor for example, it gives the agent the ability to connect to the browser to gather console logs, network logs and take screenshots. The agent will often invoke the tools automatically when it is debugging or verifying it's work, without being explicitly prompted to do so. It's a little bit of a set up process, as it requires a browser extension on top of the MCP configuration.
- jjfoooo4 2y agoI’ve used it to connect my open source memory application to Roo Code: https://github.com/elroy-bot/elroy https://github.com/elroy-bot/elroy So, now when Roo Code does tasks for me, it takes notes and searches memory. It’s good as a means to get a quick POC running, for dev oriented use cases. I have seen very few implementations that use anything but the tools capabilities though. The complete lack of auth consideration and the weird orchestration (really the “client” manages its own “server” processes), make me doubt it’s going to get serious adoption in prod. It’s not something I’d have a lot of confidence in supporting for non dev users.
- 2y ago
- campbel 2y agoThe most important thing for developers to understand when it comes to MCP: MCP is a protocol for dynamically loading additional capabilities into an AI application, e.g. Claude Desktop, Cursor, Highlight.ai etc... If you are building your own applications, you can simply use "Tools APIs" provided by the LLM directly (e,.g. https://platform.openai.com/docs/assistants/tools https://platform.openai.com/docs/assistants/tools). MCP is not something most people need to bother with unless you are building an application that needs extension or you are trying to extend an application (like those I listed above). Under the hood the MCP is just an interface into the tools API.
- gsibble 2y agoAbsolutely correct. You can also use tools everywhere while clients have to be MCP compatible. MCP is not all it's cracked up to be.
- nsonha 2y agoIt's crack up to be because tools need to be hard-coded. MCP is not. When computer use was demoed it seems like a big deal. However, with MCP, any one can create and MCP server and run it on their computer and hook it up to an MCP compatible client, regardless of the model.
- mirekrusin 2y agoNobody says that your tools declaration must be hardcoded – you can resolve them at runtime. MCP simply describes convention on how to do it. The benefit is that you can write your own provider this way and if you follow this convention anybody can use it easily similarly to how people can use published packages (npm, python package etc.) that follow their publish/consume conventions. Their config manifest is like package.json's dependencies. Their init is like import resolution. Jsonrpc methods are like exported functions in package. Json schema declarations are like type declarations (ie. .d.ts) files. In your config manifest you specify "imports" that llm can use and it handles populating tools - it's like npm for llm sessions.
- 2y ago
- ondrsh 2y agoIt's much simpler: MCP allows tools to be added at runtime instead of design-time. That's it. And because this can happen at runtime, the user (NOT the developer) can add arbitrary functionality to the LLM application (while the application is running — hence, runtime). One could make the argument that LLM applications with MCP support are conceptually similar to browsers — both let users connect to arbitrary MCP/HTTP servers at runtime. But the comparison with HTTP is not a very good one, because MCP is stateful and complex. MCP is actually much more similar to FTP than it is to HTTP. I wrote 2 short blog posts about this in case anyone is curious: https://www.ondr.sh/blog/thoughts-on-mcp https://www.ondr.sh/blog/thoughts-on-mcp
- phillipcarter 2y agoYeah, maybe it's because I spent too much time working on another open standard (otel), but this seems pretty obvious (and much simpler -- for now). MCP standardizes how LLMs can call tools at runtime, and how tools can call LLMs at runtime. It's great!
- ImPostingOnHN 2y agoIt sounds like pushing the logic of API calling into one of the many "mcp servers", with the user still needing to go through the manual step of creating accounts on third party services, generating a bunch of different tokens, and dealing with them all. In essence it seems like an additional shim that removes all the security of API tokens while still leaving the user to deal with them. Side note, has Tron taught us nothing about avoiding AI MCPs?
- phillipcarter 2y agoYes, although this is not a consumer play. This is an enterprise play. At my workplace, I'm already signed in to my document portal, debugging tools, slack, and other tools for my work through Okta SSO. I imagine some future agent I use to sift through various things will have similar access privileges.
- imtringued 2y ago
- saurik 2y ago1) Ok, so you are reinventing SOAP or WSDL or whatever... did that ever go well? How and why is this different from every prior attempt to create the one true API layer? 2) Is this meaningfully different from just having every API provide a JavaScript SDK to access it, and then having the model write code? That's how humans solve this stuff. 3) If the AI is actually as smart at doing tasks like writing clients for APIs as people like to claim, why does it need this to be made machine readable in the first place?
- no_wizard 2y agoQuestion three is what hits the nail on the head about how this “AI revolution” isn’t as robust as often claimed. If it was truly intelligent it could reason about things like API specifications without any precursors or shared structure, but it can’t. Are LLMs powerful? Yes. Is current “AI” simply a re-brand of machine learning? IMO, also yes
- zombiwoof 2y agoExactly Any junior developer can reason about API and integrate But LLm will replace them?
- james_marks 2y agoMy impression, and perhaps this is wildly off, is that MCP could be useful to whitelist safe usage of tools by LLMs. I say this out loud so someone can correct me if I’m mistaken!
- immibis 2y agoThen it's a useless concept, because people who use LLMs don't want to be bounded by a whitelist.
- james_marks 2y agoStrong disagree. I want absolutely control over what tools my agent can access on my computer.
- johnjungles 2y agoI built https://skeet.build https://skeet.build where anyone can try out mcp for cursor and dev tools without a lot of setup Mostly for workflows I like: - start a PR with a summary of what I just did - slack or comment to linear/Jira with a summary of what I pushed - pull this issue from sentry and fix it - pull this linear issue and do a first pass - pull in this Notion doc with a PRD then create an API reference for it based on this codebase, then create a new Notion page with the reference MCP tools are what the LLM uses and initiates MCP prompts are user initated workflows MCP resources is the data that the APIs provide and structure of that data (because porting APIs to MCPs are not as straight forward) Anyways please give me feedback!
- cloudking 2y agoWhat is unique about your solution? Are you essentially handling auth tokens for the user to interface MCPs with external APIs?
- johnjungles 2y agoSo there’s a lot of noise about MCP but it’s just a tool - we found that we’re solving for developer workflows (where there’s pain). People want to get shit done but after coding to update JIRA tickets just kills momentum. We just make it a highly reliable, easy to use, after committing - add a comment with a summary to that Jira/linear issue. Start a PR in GitHub and assign x, update the slack channel with an update. In order to get this it wasn’t about porting APIs to mcp. It was thoughtfully designing and optimizing for these workflows. Also quality and polish where the calls are highly reliable - required lower level networking optimizations, sessions, etc to make to work smoothly. But yes, also part of the frictionless experience was, just oauth.
- rsp1984 2y agoTo be honest I don't understand why this is needed. All the leading AI models can already write code that interfaces perfectly with well-known APIs, and for the niche-APIs I can supply the docs of that API and the model will understand. So all that's needed are API docs. Or what am I missing?
- muzani 2y agoWriting code for interfaces is an extra "cognitive layer" for the AI, just like it would be for a human. Let's say you want to add or delete Jira tickets. A MCP is like a big labeled button for the AI to do this, and it doesn't come with the token cost of reading an API or the possibility of making a mistake while accessing it.
- nsonha 2y agoSorry but I'm extremelly annoyed with this idiotic take that many people seem to have. Is it that easy to prompt AI to write code and call an API predictably?
- saurik 2y agoThis is like the simplest task you can give a software developer, as it is nigh-unto merely a document "translation" task, without much real thought required. If an LLM is failing to do this task, why do we hope whatever chain of reasoning it is about to embark on would work?
- nsonha 2y agohttps://news.ycombinator.com/item?id=43304457 https://news.ycombinator.com/item?id=43304457 Also > ...if an LLM is failing to do this task... It CURRENTLY fails to do so, PREDITABLY and securely. What are you gonna do about that? Keep throwing more data into it and hope to start building stuff on top, one day?
- saurik 2y agoI don't understand your response as it feels like it is also my point, and something I would say to you? :( If the LLM cannot do basic tasks such as this, what are you going to do? Keep throwing more "tools" at it and hope to start building stuff on top of it? People are trying to get these things to do complex multi-step reasoning tasks, including making changes to their codebase (?!), automating behaviors as "agents" that need to predictably and secure function... but, somehow, as part of the same explanation, it can't even translate API documentation, one of the most trivial code tasks a human does? There are reports that OpenAI is planning to sell "mid-tier agents for software development costing possibly $10,000 a month" (to quote The Information)... and yet, here we are, claiming it isn't up to writing API boilerplate? Help me make this make sense :(.
- chrislloyd 2y agoMCP strikes me as roughly equivalent to HTML. Headline features like dynamic “tool” discovery (and more!) are solved well with HTML. MCP is probably easier for clients to implement but suffers from poor standardization, immaturity and non-human readability. It clearly scratches an itch but I think it’s a local-minimum that requires a tremendous amount of work to implement.
- nsonha 2y agoMCP is not that hard to understand why does it keep getting the wackiest comparison?
- chrislloyd 2y agoMCPs goal is to standardize the transfer of application context and tool definitions to a client (let’s ignore prompts for the moment). That’s the same goal as Hypertext. In HTML, context is <p>, <img/> etc. and “tools” are <form>, <a> and <button>s. Instead of separating the two (like in MCP) - it’s all included in the same document. I’ve used MCP quite a bit but perhaps I’m misunderstanding something? Happy to hear why you think it’s “wacky”.
- nsonha 2y agoStop calling HTML hypertext, it has been unstructured content for as long as I write code.
- codr7 2y agoSo it's yet another one API to rule them all? The only thing that idea ever lead to was more (complicated) APIs.
- bibryam 2y agohttps://x.com/bibryam/status/1892332097999626634/photo/1 https://x.com/bibryam/status/1892332097999626634/photo/1
- risyachka 2y agoSo how does MCP differ from a regular library like aisuite or vercel ai sdk? Regular SDK lib: - Integration Effort: just like MCP - Real-Time Communication - Sure - Dynamic Discovery - obviously. just call refresh or whatever - Scalability - infinite, it is a library - Security & Control - just like mcp i trully don't get it
- StressedDev 2y agoI suspect that an MCP is just a rebranded API. We have also seen these sorts of extensibility mechanisms before. Browser extensions, Object Linking and Embedding, Dynamic Data Exchange, and Visual Studio Code extensions are all examples of having a standard API which allows lots of different things to plug into it.
- k2so 2y agoBeyond the developer, the user massively benefits from MCP. Like you said, using any other SDK to build is a very valid approach but then you are tied down to a single client that you have built on that SDK. If you would like to switch clients, then you have build it yourself. MCP solves this very well since, any MCP supported client can use the same tools/resources that you have built.
- modestygrime 2y ago> MCP allows AI models to dynamically discover and interact with available tools without hard-coded knowledge of each integration Did they just now discover abstract base classes?
- zombiwoof 2y agoErlang
- dpflan 2y agoDo you mind elaborating?
- speakbrightly 2y agoI don't really get how MCP is materially different from a standardized API interface. It will be interesting to see if the other big model providers decide to standardize on MCP or push their own competing standards.
- frabjoused 2y agoIronic this post is written in repetitive SEO spam format.
- emrah 2y agoEvery API is different/custom whereas MCP is supposed to be universal. Is that it? Ok but why would every app and website implement this new protocol for the benefit of LLMs/agents?
- punkpeye 2y agoRandom: I tried posting this as ShowHN, but I am guessing I don't have enough reputation, because it was hidden. So if you are here for MCP, I will use the opportunity to share what I've been working on the last few months. I've hand curated hundreds of MCP servers, which people can access and browse via https://glama.ai/mcp/servers https://glama.ai/mcp/servers and made those servers available via API https://glama.ai/mcp/reference https://glama.ai/mcp/reference The API allows to search for MCP servers, identify their capabilities via API attributes, and even access user hosted MCP servers. However, you can also try these servers using an inspector (available under every server) and also in the chat (https://glama.ai/chat https://glama.ai/chat) This is all part of a bigger ambition to create an all encompassing platform for authoring, discovering and hosting MCP servers. I am also the author of https://github.com/punkpeye/fastmcp https://github.com/punkpeye/fastmcp framework and several other supporting open-source tools, like https://github.com/punkpeye/mcp-proxy https://github.com/punkpeye/mcp-proxy If you are also interested in MCP and want to chat about the future of this technology, drop me a message.
- mirekrusin 2y agoTangential but it's a shame people are often missing the opportunity to align jsonrpc with programming language semantics 1) name methods so they can be methods in programming langugage (no "/" in names like MCP does) 2) use arity based calling convention (no named params, use array instead because that's what your programming language does when you define functions or methods; if you want named params, just use object as first argument). Following those two principles means your implementation ends up as simple class, with simple methods, with simple params - possibly using decorators to expose it as rpc and perform runtime type assertion for params (exposing rpc, server side) and result (using rpc, client side) – consuming jsonrpc now looks like using any ordinary library/package that happens to have async methods (this is important, there is no special dialect of communication, it's all ordinary semantics everybody is already used to, your code on client and server side doesn't jump between mapping to/from language and jsonrpc, there is a lot of complexity that's collapsed, code looks minimal, it's small, natural to read etc). Notifications also map naturally to well established pattern (ie. event emitter in nodejs). And yes, that's my main criticism of MCP – you're making standard for communication meant to be used from different languages, why adding this silly, unnecessary complexity by using "/" in method names? It frankly feels like amateur mistake by somebody who thinks it should be a bit like REST where method is URL path. Another tangent – this declaration of available enpoints is unnecessarily complicated – you can just use url: file://.. scheme to start process on that executable with stdin/stdout as communication channels (this idea is great btw, good job!), ws:// or wss:// for websocket comms to existing service and http:// http:// or https:// https:// for jsonrpc over http (no notifications).
- whazor 2y agoThe MCP protocol is very similar to Language Server Protocol (LSP) in design. LSP has the same requests, responses, and notifications setup. Also the initialization with what capabilities the server has it the same. Normally, LSP when running on a remote server, you would use a continuous (web)socket instead of API requests. This helps with the parsing overhead and provides faster response for small requests. Also requests have cancellation tokens, which makes it possible to cancel a request when it became unnecessary.
- flowerthoughts 2y agoHere's the spec: https://spec.modelcontextprotocol.io/specification/2024-11-05/ https://spec.modelcontextprotocol.io/specification/2024-11-0...
- lma21 2y agoI missed an update. How did MCPs come into this world?
- evacchi 2y agoshameless plug: we're building a registry and tooling for multi-platform MCP-based tools check it out https://www.mcp.run/ https://www.mcp.run/
- shan-chang 2y agoI'd like to recommend another protocol—ANP (AgentNetworkProtocol). While similar to MCP, ANP is significantly different. ANP is specifically designed for agents, addressing communication issues encountered by intelligent agents. It enables identity authentication and collaboration between any two agents. Key differences include: ANP uses a P2P architecture, whereas MCP follows a client-server model. ANP relies on W3C DID for decentralized identity authentication, while MCP utilizes OAuth. ANP organizes information using Semantic Web and Linked Data principles, whereas MCP employs JSON-RPC. MCP might excel at providing additional information and tools to models and connecting models to the existing web. In contrast, ANP is particularly effective for collaboration and communication between agents. Here is a detailed comparison of ANP and MCP (including the GitHub repository): https://github.com/agent-network-protocol/AgentNetworkProtocol/blob/main/blogs/Comparison-of-MCP-and-ANP-What-Kind-of-Communication-Protocol-Do-Agents-Need.md https://github.com/agent-network-protocol/AgentNetworkProtoc...