Ollama MCP Server logo

Ollama MCP Server

by angrysky56

A Model Context Protocol (MCP) server that enables Claude to run Ollama models asynchronously, with outputs stored for later retrieval. It also integrates with fast-agent for multi-agent workflows.

View on GitHub

Last updated: N/A

What is Ollama MCP Server?

The Ollama MCP Server is a server that allows Claude to use local Ollama models asynchronously. It also integrates with fast-agent to enable multi-agent workflows, allowing for complex tasks to be broken down and executed by multiple agents.

How to use Ollama MCP Server?

  1. Configure fastagent.config.yaml with your MCP servers and local models.
  2. Edit basic_agent.py to add the MCP servers you want the agent to use.
  3. Activate a virtual environment with uv venv and install dependencies with uv pip install -r requirements.txt.
  4. Run the server and the fast-agent scripts.

Key features of Ollama MCP Server

  • Run Ollama models asynchronously

  • Save and manage script templates with variable substitution

  • Execute bash commands and multi-step workflows

  • All outputs saved to a dedicated directory

  • Simple configuration for Claude Desktop integration

  • Integration with fast-agent for multi-agent workflows

  • Support for tool calling with models like Llama 3, Qwen2, and Phi3

Use cases of Ollama MCP Server

  • Running Ollama models with Claude Desktop

  • Creating multi-agent workflows for complex tasks

  • Automating tasks using script templates

  • Integrating local LLMs with external tools and APIs

  • Building a multi-agent research assistant

FAQ from Ollama MCP Server

How do I configure the server to use a specific Ollama model?

Edit the fastagent.config.yaml file and set the default_model to the desired model name (e.g., default_model: "generic.qwen3:30b-a3b").

How do I integrate the server with Claude Desktop?

Copy the content of claude_desktop_config.json to your Claude Desktop configuration, adjusting the file paths to match your system.

What are the prerequisites for running the server?

You need to have Ollama installed and running, and you need to have a virtual environment set up with the required dependencies installed.

How do I run a fast-agent script?

Navigate to the root directory of the repository and run uv run src/fast-agent-scripts/your_script.py.

What models support tool calling?

Models like Llama 3, Qwen2, and Phi3 are known to support tool calling.