cd /news/developer-tools/using-ui-mcp-proxy-in-llama-cpp · home topics developer-tools article
[ARTICLE · art-74333] src=dotnetperls.com ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Using ui-mcp-proxy in Llama-cpp

A developer created a simple MCP server for local LLMs to call Rust-coded tools, but encountered CORS errors. The llama-cpp feature ui-mcp-proxy, passed as an argument to llama-server, sets up a proxy that eliminates CORS errors by placing the MCP server on the same server as llama-cpp, simplifying code by removing CORS middleware.

read1 min views1 publishedJul 26, 2026

Yesterday I developed a simple MCP server, which allows local LLMs to call tools that I have written in Rust code. This worked well, but I ran into CORS errors—CORS is a security feature on web browsers. I found that llama-cpp

has a special feature to avoid these issues.

With ui-mcp-proxy , passed as an argument to llama-server

, a proxy server is set up so that the MCP server is on the same server as llama-cpp

. This eliminates the CORS errors altogether.

I was able to remove the middleware logic that set up CORS headers—it wasn't a huge win, but anything that simplifies code is a benefit. After all, code is a burden and having the minimal amount of necessary code will make life easier.

According to the Model Context Protocol specification, JSON-encoded messages must be used, so there will always be some complexity due to decoding and encoding messages. That is essential complexity here.

── more in #developer-tools 4 stories · sorted by recency
── more on @llama-cpp 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/using-ui-mcp-proxy-i…] indexed:0 read:1min 2026-07-26 ·