- Notifications
You must be signed in to change notification settings - Fork4.5k
mcp : add initial MCP server example (wip)#3321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
This commit adds an suggestion for an Model Context Protocol (MCP) serverimplementation.There is a simple command line demo which uses the stdio transportprotcol (there is no http transport at this point) and its usage isdescribed in the [examples readme](examples/mcp/README.md).The readme also contains an example of configuring Claude.ai Desktop to usethis MCP server and to transcribe (please see the[Claude.ai Desktop integration section](examples/mcp/README.md#claudeai-desktop-integration)for further details and screen shots).The motivation for this was mainly that I wanted to learn more about MCPand trying to integrate whisper.cpp was a good way of learning. I'm notsure if this is something that we want to persue further, but I'd behappy to do so if there is interest. There are missing features of theprotocol and also adding http transport (which should hopefully only be amatter of implementing a mcp::Transport for http).
Wouldn't it be much simpler if the MCP logic is implemented in some high-level language like Python and it would just send HTTP requests to Implementing MCP in C++ seems like a big complication for almost no benefit. Still, if we decide to implement it, it should not deal with any specific |
The use case I had in mind was a constrained resource where making remote HTTP request might not be possible and the alternative of running a local HTTP server might not be desirable/possible. In these case, if this is in fact a valid use case, having a stdio transport might be nice and makes the usage very simple.
I agree, this is what I had in mind for the HTTP transport though I realize now that it will require some refactoring as I've only focused on the stdio transport protocol. I do feel that having the alternative of a stdio transport could be nice to have. It seems to enable simple usage as there would not be a need to run But with that said, I'm still somewhat in vacation mode and this was mostly a personal interest to read up on MCP while having some extra time, and I wanted to see if this would be something worth pursuing (with maintainability and all that taking into consideration), so I'm also happy to close/park without further work as well 👍 |
I see, I overlooked the part that this works over stdio. Looks interesting. Could you fix the link in your post so I can take a look at the examples - this does not open:https://github.com/ggml-org/whisper.cpp/compare/examples/mcp/README.md?expand=1#claudeai-desktop-integration |
danbev commentedJul 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Ah, sorry about that. Thislink should work. |
This updates the transcribe-screenshot.png image in the MCP example toinclude the transcribe tool output which is not present in the currentscreenshot.
Uh oh!
There was an error while loading.Please reload this page.
This commit adds an suggestion for an Model Context Protocol (MCP) server implementation.
There is a simple command line demo which uses the stdio transport protcol (there is no http transport at this point) and its usage is described in theexamples readme. The readme also contains an example of configuring Claude.ai Desktop to use this MCP server and to transcribe (please see theClaude.ai Desktop integration section for further details and screen shots).
The motivation for this was mainly that I wanted to learn more about MCP and trying to integrate whisper.cpp was a good way of learning. I'm not sure if this is something that we want to persue further, but I'd be happy to do so if there is interest. There are missing features of the protocol and also adding http transport (which should hopefully only be a matter of implementing a mcp::Transport for http).
This does not currently work on windows, and I've only tested on mac thus far.