llama-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@llama-mcp ask the local llama model to explain recursion in one sentence"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
llama-mcp
An MCP server that exposes a llama.cpp server (llama-server) as tools, so an MCP host such as Claude Code can hand work to a local model.
Tools
Tool | llama-server endpoint | Purpose |
|
| Prompt (plus optional system prompt, earlier turns in |
|
| Raw text continuation, no chat template |
|
| Text → token ids |
|
| Model ids and whether each is loaded |
|
|
|
Related MCP server: mcp-file-system-lmstudio
Usage
Start llama-server, then register the MCP server with Claude Code:
llama-server -m model.gguf --port 8080
claude mcp add llama -- uv run --project ~/Projects/llama-mcp llama-mcp --url http://localhost:8080Configuration:
--url/LLAMA_URL: llama-server base URL (defaulthttp://localhost:8080)--model/LLAMA_MODEL: model id to use when a tool call names none. Required when llama-server runs in router mode (started without-m/-hf, offering several models);chat,completeandtokenizealso take a per-callmodelargument.LLAMA_API_KEY: sent as a bearer token, for a llama-server started with--api-key--timeout: request timeout in seconds (default 300)--http PORT: serve streamable HTTP athttp://127.0.0.1:PORT/mcpinstead of stdio, for testing with MCP Inspector orclaude mcp add --transport http
Development
uv sync
uv run pytest
uv run ruff check && uv run ruff format --check
uv run pyrefly checkAvailable Tools
5 toolschatC
Send a prompt to the local model through its chat template and return the reply.
Leave `temperature` unset to use llama-server's own sampling settings.
Inputs: prompt (required), model, system, max_tokens, +1 more. Returns: result
completeB
Continue raw text with the local model, with no chat template applied.
Leave `temperature` unset to use llama-server's own sampling settings.
Inputs: prompt (required), model, n_predict, temperature. Returns: result
healthA
Report whether llama-server is up and has a model loaded.
Inputs: no named parameters. Returns: result
modelsA
List the models llama-server offers, with their status.
A single-model llama-server always reports `loaded`. In router mode a model is `unloaded` until
a request names it, and the first such request waits while it loads.
Inputs: no named parameters. Returns: result
tokenizeC
Return the model's token ids for text.
Inputs: text (required), model. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
chat and complete both send text to the model and return output, so their boundary rests entirely on the chat-template distinction, which the descriptions do clarify. tokenize, models, and health are each clearly distinct from that pair and from each other.
All names are single lowercase words in a consistent casing style, which keeps them readable. However, the set mixes bare verbs (chat, complete, tokenize) with bare nouns (models, health) with no predictable verb_noun pattern.
Five tools is well-scoped for a thin wrapper over a local llama-server: two generation modes, tokenizer access, model listing, and a health probe. Each tool earns its place with no obvious redundancy.
Core inference and diagnostics are covered, but common llama-server capabilities are absent: embeddings, explicit model selection/load-unload for router mode, and detokenization. Agents can still work around these gaps but will hit dead ends for embedding workflows.
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceBridges LM Studio local models to Claude Code as MCP tools, enabling private and free AI-assisted subtasks. Includes respond and models tools with automatic model selection and structured output.1MIT
- AlicenseNot gradedqualityDmaintenanceExposes local LM Studio language models as MCP tools, enabling chat completions and model listing through a local OpenAI-compatible API without requiring API keys.MIT

LocalAiMCPofficial
AlicenseNot gradedqualityDmaintenanceEnables natural-language control of a LocalAI server, exposing its full API as MCP tools for model management, inference, monitoring, media processing, and advanced system operations.MIT- AlicenseNot gradedqualityBmaintenanceExposes local Ollama as an MCP server so Claude can delegate drafting, summarization, translation, code review, error explanation, model listing, health checks, and file reading to local models via stdio or HTTP.1Apache 2.0