Add Mcp to Llamacpp by Fastmcp
Install python FastMCP package
create an MCP server
See Quick start
Notice
- Add the allowed urls in the fastMCP class initializing line to limit the allowed urls.*
Start the MCP server
python mcp.py
Start Llama.cpp with the MCP command argument
Llama.cpp -m model -ui-mcp-proxy
Finally in the web ui, add the map url that shows in the command line with “/sse” added to the url end and toggle the button of ‘using mcp proxy’ in the web ui.