Ollama MCP Client-Server
rofrantz/ollama-mcp-client-server
Exponha Ollama como servidor MCP para integrar LLMs locais
Ver no GitHubServidor MCP customizado que expõe Ollama (LLM local) através do Model Context Protocol, permitindo que clientes Claude acessem modelos de linguagem rodando localmente. Inclui cliente interativo, ferramentas pré-configuradas e suporte a múltiplos clientes MCP.
Instalação
npx convez-ai rofrantz/ollama-mcp-client-server1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Integrar modelos locais Ollama com Claude via MCP
- Construir aplicações que usam LLMs sem depender de APIs externas
- Desenvolver agentes e clientes customizados com acesso a modelos locais
- Testar e prototipar com múltiplos modelos Ollama simultaneamente
Veredito

Solução robusta para expor Ollama via MCP com implementação clara e bem documentada. Ideal para quem quer integrar LLMs locais em fluxos Claude sem depender de APIs remotas, mas requer familiaridade com Node.js e setup local de Ollama.
README
A tradução para o português deste README ainda está na fila.
Ollama MCP Client-Server
Node.js demo for exposing Ollama through the Model Context Protocol (MCP) and consuming those tools from a local client.
What's included
demo/server.js- MCP server that registers the Ollama tools.demo/client.js- our own interactive chat client that connects to the server over stdio.demo/utils/mcp-tools.js- tool implementations backed by Ollama.scripts/setup-prerequisites.sh- Homebrew bootstrap for local dependencies.- sample MCP client configurations for various clients
Prerequisites
- Node.js 20 or newer. The setup script installs Node 22.
- Ollama running locally. The code defaults to
http://0.0.0.0:11434; overrideOLLAMA_HOSTif you preferhttp://127.0.0.1:11434. - At least one model pulled in Ollama.
If you want the demo to work without changing defaults, pull the models used by the repo:
ollama pull llama3.2
ollama pull qwen2.5:3b
ollama pull qwen3.5:latest
See docs/prerequisites.md for the full setup flow.
Quick Start
./scripts/setup-prerequisites.sh
npm install
ollama serve
In a second terminal:
npm run mcp-client-custom
The interactive client will connect to the local MCP server, discover the available tools, and route prompts through Ollama.
Available Scripts
npm run server- start the MCP server fromdemo/server.js.npm run mcp-client-custom- start the interactive local client.npm run mcp-client-opencode- launch OpenCode.npm run mcp-client-codex- launch Codex.npm run mcp-client-ollmcp- run the Ollama MCP client wrapper.npm run list-models- list Ollama models.npm run "list-MCP's"- list MCP servers in OpenCode.
MCP Tools
The server currently exposes three tools:
ollama_generate- chat-style generation with a prompt, model, and temperature.list_models- list locally available Ollama models.run_model- run a prompt against a named Ollama model.
The tool definitions live in demo/utils/mcp-tools.js.
Config Files
- mcp-servers-config.json - MCP server configuration for clients that consume that format
- opencode.json - OpenCode configuration for the bundled MCP server
- .codex/config.toml - Codex configuration for the bundled MCP server