Being a programmer, Swagger/OpenAPI is the first choice in order to have system functionality accessible by something else than (web) UI .
So the first thinking was –let’s automatically generate MCP tools from Swagger / OpenAPI definition.
However, I realized that the OpenAPI is way too fine grained – and MCP is more directed towards humans, that have not such context.
A simple example: Let’s suppose you want to perform the same operation ( Screenshot) on different OS ( Linux, Mac,Windows, Android, iPhone ….)
As a Swagger for programmers we have something like
public byte[] TakeScreenshot_Windows(string uniqueIdOfDevice) public byte[] TakeScreenshot_Android(string uniqueIdOfDevice) public byte[] TakeScreenshot_iPhone(string uniqueIdOfDevice)
or maybe more concise
public byte[] TakeScreenshot(int DeviceOS, string uniqueIdOfDevice)
It is the programmer job to figure what is the device OS ( Linux, Mac, Windows, Android, iPhone …) and call the adequate function with adequate parameter
For MCP
How it will look an AI conversation from human ? “ Please take screenshots of those Devices MyId1, MyId20, and organize an HTML page to look at it”
So how it will be the MCP organized ?
public byte[] TakeScreenshot(string uniqueIdOfDevice)
The user will not bother specifying the type of the device – and AI cannot easy guess the type .
side note: How this MCP will function ? Well, if we have the function for each type of device, it can call all ( on separate tasks/ threads) and return the first result
Conclusion
So MCP could be different from Swagger – and cannot be inferred from Swagger.
But the Swagger functions could be generated from MCP ! And this is the point of https://www.nuget.org/packages/RSCG_MCP2OpenAPI