Skip to content

Instantly share code, notes, and snippets.

@shaposhnikoff
Last active July 7, 2026 10:00
Show Gist options
  • Select an option

  • Save shaposhnikoff/37522dc2b3bb7d89c36513c400e112f5 to your computer and use it in GitHub Desktop.

Select an option

Save shaposhnikoff/37522dc2b3bb7d89c36513c400e112f5 to your computer and use it in GitHub Desktop.
llama-server Web UI + MCP: Quick Setup Guide

Optional: Add GitHub MCP Server

You can also add the official GitHub MCP Server.

The recommended local setup uses Docker:

ghcr.io/github/github-mcp-server

First, create a GitHub Personal Access Token.

For a safer setup, start with read-only mode unless you specifically want the model to create or modify issues, PRs, files, or workflow runs.

Export your token before starting mcp-proxy:

export GITHUB_PERSONAL_ACCESS_TOKEN="github_pat_xxx"

Then add github to your config.json:

{
  "mcpServers": {
    "time": {
      "command": "uvx",
      "args": ["mcp-server-time", "--local-timezone=Europe/Kyiv"]
    },
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    },
    "ddg-search": {
      "command": "uvx",
      "args": ["duckduckgo-mcp-server"]
    },
    "github": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "-e",
        "GITHUB_READ_ONLY=1",
        "-e",
        "GITHUB_TOOLSETS=context,repos,issues,pull_requests,actions",
        "ghcr.io/github/github-mcp-server"
      ]
    }
  }
}

Then start mcp-proxy as before:

uvx mcp-proxy \
  --named-server-config config.json \
  --allow-origin "*" \
  --port 8001 \
  --stateless

The proxy should expose a GitHub server URL similar to:

http://127.0.0.1:8001/servers/github/sse

For llama-server Web UI, replace /sse with /mcp:

http://127.0.0.1:8001/servers/github/mcp

Then add it in:

Settings → MCP → Add New Server

Use this URL:

http://127.0.0.1:8001/servers/github/mcp

Enable the server with the toggle.

If it does not work immediately, try enabling:

Use llama-server proxy

GitHub permissions and safety

The GitHub MCP server can access repositories, issues, pull requests, GitHub Actions, code scanning, Dependabot alerts, notifications, organizations, and other GitHub APIs depending on token permissions and enabled toolsets.

For a safer first run, keep:

GITHUB_READ_ONLY=1

This prevents write operations.

If you later want write access, remove this line:

"-e",
"GITHUB_READ_ONLY=1",

You can also change the enabled toolsets.

Example with more GitHub capabilities:

"-e",
"GITHUB_TOOLSETS=context,repos,issues,pull_requests,actions,code_security,dependabot,notifications"

The default GitHub MCP toolsets are:

context
repos
issues
pull_requests
users

For most local llama-server experiments, this is a reasonable starting point:

context,repos,issues,pull_requests,actions

llama-server Web UI + MCP: Quick Setup Guide

A short guide for enabling MCP servers in the llama-server Web UI using mcp-proxy.

Credits

Thanks to everyone who shared fixes, corrections, and suggestions.

Special thanks to u/No-Statistician-374 for pointing out the required --webui-mcp-proxy flag and the proxy-related MCP setting.

Intro

I recently saw that llama-server added MCP support, so I wanted to get it working in the Web UI.

I had only briefly experimented with MCP before, so it took some trial and error to figure out the setup. This guide is meant to help others get started faster and avoid wasting time on the same issues.

Requirements

You will need:

  • llama-server
  • MCP support enabled in llama-server
  • uv / uvx

Install uv using the official instructions:

https://docs.astral.sh/uv/getting-started/installation/

1. Start llama-server with MCP proxy support

Make sure you start llama-server with the following flag:

--webui-mcp-proxy

Example:

llama-server \
  --model /path/to/model.gguf \
  --webui-mcp-proxy

Without this flag, MCP servers may not work correctly from the Web UI.

2. Create an MCP server config

Create a file named config.json in any directory you like.

Example:

{
  "mcpServers": {
    "time": {
      "command": "uvx",
      "args": ["mcp-server-time", "--local-timezone=America/Chicago"]
    },
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    },
    "ddg-search": {
      "command": "uvx",
      "args": ["duckduckgo-mcp-server"]
    }
  }
}

Important: if you use the time MCP server, replace America/Chicago with your actual timezone.

For example:

"--local-timezone=Europe/Kyiv"

3. Start mcp-proxy

From the same directory where config.json is located, run:

uvx mcp-proxy \
  --named-server-config config.json \
  --allow-origin "*" \
  --port 8001 \
  --stateless

When the proxy starts, it will print URLs for each configured MCP server.

They will usually look like this:

http://127.0.0.1:8001/servers/time/sse

For llama-server Web UI, replace /sse with /mcp.

So this:

http://127.0.0.1:8001/servers/time/sse

becomes this:

http://127.0.0.1:8001/servers/time/mcp

4. Add MCP servers in the llama-server Web UI

Open the llama-server Web UI and go to:

Settings → MCP → Add New Server

Add each MCP server URL manually.

Examples:

http://127.0.0.1:8001/servers/time/mcp
http://127.0.0.1:8001/servers/fetch/mcp
http://127.0.0.1:8001/servers/ddg-search/mcp

After adding each server:

  1. Click Add
  2. Enable the server using the toggle
  3. If a server does not work, try enabling Use llama-server proxy

Some MCP servers may require the llama-server proxy option to be enabled.

5. Test it

Once the MCP servers are added and enabled, they should become available from the llama-server Web UI.

You can test them with prompts such as:

What time is it?
Fetch the contents of https://example.com
Search DuckDuckGo for recent llama.cpp MCP support.

Troubleshooting

If something does not work, check the following:

  • llama-server was started with --webui-mcp-proxy
  • mcp-proxy is still running
  • The MCP URL ends with /mcp, not /sse
  • The server is enabled in the Web UI
  • The correct timezone is configured for the time server
  • uvx can run the MCP server command manually
  • Try enabling Use llama-server proxy for the MCP server in the Web UI

Final config recap

config.json:

{
  "mcpServers": {
    "time": {
      "command": "uvx",
      "args": ["mcp-server-time", "--local-timezone=Europe/Kyiv"]
    },
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    },
    "ddg-search": {
      "command": "uvx",
      "args": ["duckduckgo-mcp-server"]
    }
  }
}

Run proxy:

uvx mcp-proxy \
  --named-server-config config.json \
  --allow-origin "*" \
  --port 8001 \
  --stateless

Add these URLs to the Web UI:

http://127.0.0.1:8001/servers/time/mcp
http://127.0.0.1:8001/servers/fetch/mcp
http://127.0.0.1:8001/servers/ddg-search/mcp

That should be enough to get MCP working in the llama-server Web UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment