Skip to main content
Glama
Ri5h18
by Ri5h18

Ollama MCP Server

A local MCP server with a ChatGPT-style web interface for choosing and chatting with Ollama models.

What is included

  • server/mcp_server.py — MCP stdio server with 12 tools, three prompts, and an ollama://models resource.

  • server/web_tools.py — keyless public web search and readable webpage extraction.

  • server/api.py — small HTTP bridge used by the browser, including NDJSON chat streaming.

  • frontend/ — responsive React/Vite ChatGPT-style interface.

  • setup.ps1, run-ollama.ps1, run-backend.ps1, run-frontend.ps1 — PowerShell launchers.

Related MCP server: Local-MCP-server

Quick start

Open three PowerShell terminals:

cd C:\Users\admin\Desktop\MCP_SERVER
.\setup.ps1

If Ollama is not already running, start it in terminal 1:

cd C:\Users\admin\Desktop\MCP_SERVER
.\run-ollama.ps1

Pull at least one model, for example:

ollama pull llama3.1

Then start the backend and frontend:

# terminal 2
cd C:\Users\admin\Desktop\MCP_SERVER
.\run-backend.ps1

# terminal 3
cd C:\Users\admin\Desktop\MCP_SERVER
.\run-frontend.ps1

Open http://127.0.0.1:5173. The model selector is populated from Ollama, so every installed model can be chosen without changing code.

MCP client configuration

For an MCP client that supports stdio servers, use:

{
  "mcpServers": {
    "ollama-local": {
      "command": "C:\\Users\\admin\\Desktop\\MCP_SERVER\\.venv\\Scripts\\python.exe",
      "args": ["-m", "server.mcp_server"],
      "cwd": "C:\\Users\\admin\\Desktop\\MCP_SERVER"
    }
  }
}

Available MCP tools are list_ollama_models, chat_with_ollama, generate_with_ollama, embed_text, inspect_ollama_model, web_search, scrape_url, calculate, convert, current_time, text_stats, and pretty_print_json.

Available user-invoked MCP prompts are research_topic, solve_math_problem, and summarize_webpage. The server also exposes the read-only ollama://models resource with JSON metadata.

web_search uses DuckDuckGo's HTML endpoint and scrape_url fetches public HTML pages. Both require internet access; local/private network addresses are blocked by the scraper.

The general-purpose tools are local and deterministic: calculate supports safe arithmetic, convert supports length/mass/volume/temperature, current_time supports IANA timezones, text_stats counts text structure, and pretty_print_json validates and formats JSON.

The browser chat binds the 10 safe helper tools from server/tool_registry.py to Ollama's tool-calling API. When a compatible model requests a calculation, web search, scrape, conversion, or other helper, the backend executes it and sends the result back to the model before returning the final answer. The two model-to-model helpers (chat_with_ollama and generate_with_ollama) remain MCP-only to prevent recursive calls.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ri5h18/MCP_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server