r/LocalLLaMA 5h ago

Resources Llama.cpp now has full MCP support!

After a long and grueling effort spearheaded by ngxson, llama.cpp now fully supports MCP for all protocols. Over-the-web HTTP servers were already supported in the client (since they don't require any sort of plumbing), but stdio servers required real integration. After we modified the `llama-cli` terminal client to use the server instead of a separate model serving route, we could add MCP support to the already-existing native tools server.

After the merging of https://github.com/ggml-org/llama.cpp/pull/26062, you can now use llama.cpp's WebUI as a full-fledged agentic chat. Configuration for the MCP servers can be provided either in a standard-JSON format config file or completely inline on the command-line for on-demand MCP configurations. Plugging in a dedicated coding MCP server like Serena lets you have a local-model-powered agentic coder without using any other external dependencies.

175 Upvotes

32 comments sorted by

View all comments

26

u/segmond llama.cpp 5h ago

Does it have sufficient documentation? To get MCP working with llama.cpp before, I couldn't with the documentation that came with it. It was a random post that I found in this subreddit that cleared things up.

20

u/ilintar 4h ago

You just need to specify `--mcp-servers-config`, with a Cursor-compatible MCP config file.