Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Draft
danbev wants to merge2 commits intoggml-org:master
base:master
Choose a base branch
Loading
fromdanbev:mcp

Conversation

danbev
Copy link
Collaborator

@danbevdanbev commentedJul 12, 2025
edited
Loading

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.

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).
@ggerganov
Copy link
Member

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 towhisper-server?

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 specificwhisper.cpp logic (like loading models, creating contexts, etc). It should just accept requests, forward them towhisper-server and return results.

@danbev
Copy link
CollaboratorAuthor

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 towhisper-server?

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.

It should just accept requests, forward them to whisper-server and return results.

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 runwhisper-server locally (if users are concerned with privacy and not willing to use a removewhisper-server).

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 👍

@ggerganov
Copy link
Member

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
Copy link
CollaboratorAuthor

danbev commentedJul 16, 2025
edited
Loading

Could you fix the link in your post so I can take a look at the examples

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.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@danbev@ggerganov

[8]ページ先頭

©2009-2025 Movatter.jp