MCP Ollama
Provides tools for listing downloaded models, viewing model details, and asking questions to models via Ollama.
Click on "Install 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., "@MCP OllamaAsk llama3.2 'What is the capital of France?'"
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.
MCP Ollama
A Model Context Protocol (MCP) server for integrating Ollama with Claude Desktop or other MCP clients.
Requirements
Python 3.10 or higher
Ollama installed and running (https://ollama.com/download)
At least one model pulled with Ollama (e.g.,
ollama pull llama2)
Configure Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"ollama": {
"command": "uvx",
"args": [
"mcp-ollama"
]
}
}
}Development
Install in development mode:
git clone https://github.com/yourusername/mcp-ollama.git
cd mcp-ollama
uv syncTest with MCP Inspector:
mcp dev src/mcp_ollama/server.pyRelated MCP server: Ollama MCP Server
Features
The server provides four main tools:
list_models- List all downloaded Ollama modelsshow_model- Get detailed information about a specific modelask_model- Ask a question to a specified model
License
MIT
Available Tools
3 toolsask_modelA
Ask a question to a specific Ollama model
Args:
model: Name of the model to use (e.g., 'llama2')
question: The question to ask the model
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| question | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full behavioral transparency burden. It only states the intent ('Ask a question') without disclosing return format, streaming behavior, error handling, permissions, or side effects, forcing the agent to guess.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with a clear, front-loaded purpose statement followed by a compact Args list. It contains no filler or redundancy, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool, the description and Args are mostly adequate, but the absence of any mention of the return value (e.g., the model's generated response) is notable because there is no output schema. It also lacks error or availability information, leaving some ambiguity for the agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although the schema has no descriptions, the description includes an Args block that clearly explains both parameters: 'model' is the model name with an example ('llama2'), and 'question' is the prompt to ask. This fully compensates for the schema gap and adds meaningful semantic detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific action ('Ask a question') and a resource ('specific Ollama model'), making the tool's purpose immediately clear. It also naturally distinguishes itself from sibling tools like list_models and show_model, which are about listing and viewing models rather than interacting with them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit guidance on when to use this tool versus list_models or show_model. There are no conditions, prerequisites, or exclusions, leaving the agent to infer usage solely from the tool name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_modelsA
List all downloaded Ollama models
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It conveys a read-only list operation, but adds no details about output format, ordering, performance, or side effects. For a simple list tool this is minimally adequate, but it does not go beyond the literal action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence that is front-loaded with the key action and resource. Every word contributes meaning, with no redundant content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (no parameters, no output schema), the description fully states what the tool does. It does not explain return value format, but for a list operation, the implied return is the collection of models, which is sufficient in this context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, and the schema is empty with 100% coverage. Per the rubric, the baseline for 0 params is 4. The description does not need to explain any input semantics since none exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description "List all downloaded Ollama models" uses a specific verb ("list"), identifies the resource ("downloaded Ollama models"), and specifies the scope ("all"). This clearly distinguishes it from sibling tools like show_model (which likely displays a single model) and ask_model (which likely queries a model).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies its use case—simply list all downloaded models—but provides no explicit guidance on when to choose this over alternatives. It does not mention show_model or ask_model as alternatives or exclusions, leaving the decision to the agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
show_modelA
Get detailed information about a specific model
Args:
name: Name of the model to show information about
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral disclosure burden. It conveys that this is a read-only operation ('Get') and scoped to a single model, but it does not mention what 'detailed information' includes, response format, errors, or permissions. This is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded, consisting of a single clear sentence plus a minimal Args block. Every word earns its place, with no redundant filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple single-parameter read tool, the description is mostly sufficient, but it lacks detail about the return value or what specific information is provided. Since there is no output schema, the description should have compensated by describing the output, which it does not.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the parameter. The only parameter 'name' is described as 'Name of the model to show information about', which adds little beyond the schema's title 'Name'. It does not specify allowed values, formats, or examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get detailed information about a specific model' clearly states the action (get) and the resource (specific model), which distinguishes it from sibling tools like list_models (enumerating models) and ask_model (interactive querying). It is specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is used when you need details about one particular model, but it does not explicitly state when to use it over alternatives or provide any exclusions. No when-not guidance is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: listing models, showing model details, and asking a model a question. No overlap or ambiguity between them.
All tool names follow a consistent verb_noun pattern using snake_case: list_models, show_model, ask_model. This is predictable and easy to remember.
With 3 tools, the server is well-scoped for its purpose of interacting with Ollama models. Each tool earns its place, and the count falls within the typical 3-15 range.
The tools cover the core workflow of listing, inspecting, and querying models. Missing pull/delete operations are minor gaps since the server focuses on using existing models rather than managing the full model lifecycle.
Maintenance
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
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Connect MCP clients to 2,000+ AI models without managing provider API keys.
MCP server for AI dialogue using various LLM models via AceDataCloud
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP Ollama server integrates Ollama models with MCP clients, allowing users to list models, get detailed information, and interact with them through questions.334MIT
- AlicenseAqualityDmaintenanceEnables seamless integration between Ollama's local LLM models and MCP-compatible applications, supporting model management and chat interactions.131,144170AGPL 3.0
- AlicenseBqualityFmaintenanceA bridge that enables seamless integration of Ollama's local LLM capabilities into MCP-powered applications, allowing users to manage and run AI models locally with full API coverage.101,14474AGPL 3.0
- AlicenseCqualityDmaintenanceA bridge that integrates Ollama's local LLM capabilities into MCP-powered applications, enabling users to run, manage, and interact with AI models locally with full control and privacy.94885MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/fastmcp-me/mcp-ollama'
If you have feedback or need assistance with the MCP directory API, please join our Discord server