3 ms·
MCP is not REST. In your comparison, its more that MCP is a protocol for discovering REST endpoints at runtime and letting users configure what REST endpoints s
by Jonovono 1y ago
MCP is not REST. In your comparison, its more that MCP is a protocol for discovering REST endpoints at runtime and letting users configure what REST endpoints should be used at runtime.
Say i'm building a app and I want my users to be able to play spotify songs. Yea, i'll hit the spotify api. But now, say i've launched my app, and I want my users to be able to play a song from sonofm when they hit play. Alright, now I gotta open up the code and do some if statements hard code the sonofm api and ship a new version, show some update messages.
MCP is literally just a way to make this extensible so instead of hardcoding this in, it can be configured at runtime
- nikolayasdf123 1y agoso... is this OpenAPI then?
- lobsterthief 1y agoBasically, yes. But with much more enthusiasm!
- doug_durham 1y agoOpenAPI doesn't have a baked in discoverability mechanism. It isn't compatible with LLMs out of the box. It is a lower level abstraction. I don't want to write a blob of code that talks to an Open API service every time I want to do something with an LLM.
- falcor84 1y ago>OpenAPI doesn't have a baked in discoverability mechanism. Well, Swagger was there from the start, and there's nothing stopping an LLM from connecting to an openapi.json/swagger.yaml endpoint, perhaps meditated by a small xslt-like filter that would make it more concise.
- smohare 1y ago[dead]
- layer8 1y agoHATEOAS was supposed to be that. https://en.wikipedia.org/wiki/HATEOAS https://en.wikipedia.org/wiki/HATEOAS
- Jonovono 1y agoheh, there was a good convo about HATEOAS and MCP on HN awhile back: * https://news.ycombinator.com/item?id=43307225 https://news.ycombinator.com/item?id=43307225 * https://www.ondr.sh/blog/ai-web https://www.ondr.sh/blog/ai-web
- mort96 1y agoWait was it? HATEOAS is all about hypermedia, which means there must be a human in the loop being presented the rendered hypermedia. MCP seems like it's meant to be for machine<->machine communication, not human<->machine
- layer8 1y agoI agree that HATEOAS never made sense without a human in the loop, although I also have never seen it be described as such. IMO that’s an important reason why it never gained useful traction. There is a confused history where Roy Fielding described REST, then people applied some of that to JSON HTTP APIs, designating those as REST APIs, then Roy Fielding said “no you have to do HATEOAS to achieve what I meant by REST”, then some people tried to make their REST APIs conform to HATEOAS, all the while that change was of no use to REST clients. But now with AI it actually can make sense, because the AI is able to dynamically interpret the hypermedia content similar to a human.
- NomDePlum 1y agoMy understanding was that the discoverable part of HATEAOS was meant for machine to machine. Actually all of REST is machine to machine except in very trivial situations. Not sure I'm understanding your point in hypermedia means there is human in the loop. Can you expand?
- renerick 1y ago
- deleted 1y ago[deleted]
- jaredsohn 1y agoFeels like segment.com but for calling APIs rather than adding libraries to the frontend.
- Jonovono 1y agoNow make the segment for MCPs ;p
- gavinray 1y agoMCP is a JSON RPC implementation of OpenAPI, or, get this, XML and WSDL/SOAP.
- causal 1y agoWSDL triggered me ha. I'm afraid you're right
- deleted 1y ago[deleted]
- emporas 1y ago>Alright, now I gotta open up the code and do some if statements hard code the sonofm api and ship a new version, show some update messages. You will need to do that anyway. Easier discovery of the API doesn't say much. The user might want a complicated functionality, which combines several API calls, and more code for filtering/sorting/searching of that information locally. If you let the LLM to write the code by itself, it might take 20 minutes and millions of wasted tokens of the LLM going back and forth in the code to implement the functionality. No user is going to find that acceptable.
- navigate8310 1y agoCan't you just build a simple REST that takes this abstraction of plugging in different song providers away?
- Too 1y agoThat only works if you let the LLM do the interpretation of the MCP descriptions, in the case of TFA the idea was to use MCP without LLM, which is essentially same as any old API.
- Jonovono 1y agoYou can use MCP to dynamically call different services, without ever having to use an LLM to decide. With an LLM it would go List MCP Tools -> Get User prompt -> Feed both into LLM -> LLM tells you what tools to call You could skip the LLM aspect completely and get all tools and let the user at runtime pick the tool that "playsSong" for example