Ollama MCP Bridge

v1.0.0Data Science & MLstable

Extend the Ollama API with dynamic AI tool integration from multiple MCP (Model Context Protocol) servers. Fully compatible, transparent, and developer-friendly, ideal for building powerful local LLM applications, AI agents, and custom chatbots

aiai-agentsapibridgefastapi
Share:
973
Stars
0
Downloads
0
Weekly
0/5

What is Ollama MCP Bridge?

Ollama MCP Bridge is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to extend the ollama api with dynamic ai tool integration from multiple mcp (model context protocol) servers. fully compatible, transparent, and developer-friendly, ideal for building powerful local llm ...

Extend the Ollama API with dynamic AI tool integration from multiple MCP (Model Context Protocol) servers. Fully compatible, transparent, and developer-friendly, ideal for building powerful local LLM applications, AI agents, and custom chatbots

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Extend the Ollama API with dynamic AI tool integration from

Use Cases

Extend Ollama with MCP tool integration
Local LLM application and agent building
patruff

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx ollama-mcp-bridge

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Ollama MCP Bridge

Ollama MCP Bridge extends the Ollama API with dynamic AI tool integration by acting as a transparent proxy between Ollama-powered local LLMs and any number of MCP servers. Instead of Ollama models only having access to their built-in capabilities, the bridge fetches available tools from configured MCP servers at runtime and injects them into the Ollama chat API, enabling fully local LLM applications to use file system access, web search, GitHub integration, email, and image generation as first-class tools. Developers building local AI agents or custom chatbots with Ollama gain MCP compatibility without requiring a cloud-based LLM or modifying Ollama itself.

Prerequisites

  • Ollama installed and running locally with at least one model pulled (e.g. llama3)
  • Node.js 18+ for running the bridge
  • One or more MCP servers to connect (e.g. filesystem, brave-search, github)
  • API keys for any external MCP servers you want to use (e.g. BRAVE_API_KEY, GITHUB_PERSONAL_ACCESS_TOKEN)
  • Optional: REPLICATE_API_TOKEN for image generation via Flux
1

Clone the Ollama MCP Bridge repository

Clone the bridge repository from GitHub to get the source code and default configuration.

git clone https://github.com/patruff/ollama-mcp-bridge.git
cd ollama-mcp-bridge
2

Install dependencies

Install the required MCP server packages and bridge dependencies.

npm install -g @modelcontextprotocol/server-filesystem
npm install -g @modelcontextprotocol/server-brave-search
npm install -g @modelcontextprotocol/server-github
npm install -g @modelcontextprotocol/server-memory
npm install
3

Configure environment variables

Set the API keys required by the MCP servers you plan to use. The bridge reads these from the environment and passes them to the individual MCP server processes.

export BRAVE_API_KEY=your_brave_api_key
export GITHUB_PERSONAL_ACCESS_TOKEN=your_github_token
export REPLICATE_API_TOKEN=your_replicate_token
4

Start the bridge

Launch the Ollama MCP Bridge. It starts a local server that proxies the Ollama API while dynamically loading tools from all configured MCP servers.

npm run start
5

Connect via the extended Ollama API

Use the bridge's API endpoint in place of the standard Ollama endpoint. Your local LLM can now call MCP tools transparently. Use 'list-tools' to see available tools.

# List available tools
curl http://localhost:3000/list-tools

# Chat with tool access
curl http://localhost:3000/api/chat -d '{"model":"llama3","messages":[{"role":"user","content":"Search the web for latest Node.js features"}]}'  

Ollama MCP Bridge Examples

Client configuration

MCP configuration for using the Ollama MCP Bridge as an MCP server within Claude Desktop.

{
  "mcpServers": {
    "ollama-mcp-bridge": {
      "command": "npx",
      "args": ["ollama-mcp-bridge"],
      "env": {
        "BRAVE_API_KEY": "your_brave_key",
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_token"
      }
    }
  }
}

Prompts to try

Example prompts and commands demonstrating what the Ollama MCP Bridge enables local LLMs to do through tool integration.

- "Search the web for the latest TypeScript 5.0 features"
- "Create a new folder called project-docs in my home directory"
- "Look up the open issues in the patruff/ollama-mcp-bridge GitHub repo"
- "Remember that my project deadline is June 30th"
- "Generate an image of a futuristic robot assistant"

Troubleshooting Ollama MCP Bridge

Bridge starts but tools are not available in LLM responses

Run 'curl http://localhost:3000/list-tools' to verify MCP servers are loaded. Ensure each MCP server package is globally installed and accessible on your PATH.

Ollama model not found or connection refused

Verify Ollama is running with 'ollama serve' and that you have pulled the model you are using with 'ollama pull llama3'. The bridge defaults to connecting to Ollama at http://localhost:11434.

Web search MCP tool fails with authentication error

Ensure BRAVE_API_KEY is exported in the same shell session where the bridge runs. Get a free Brave Search API key at https://brave.com/search/api/.

Frequently Asked Questions about Ollama MCP Bridge

What is Ollama MCP Bridge?

Ollama MCP Bridge is a Model Context Protocol (MCP) server that extend the ollama api with dynamic ai tool integration from multiple mcp (model context protocol) servers. fully compatible, transparent, and developer-friendly, ideal for building powerful local llm applications, ai agents, and custom chatbots It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Ollama MCP Bridge?

Follow the installation instructions on the Ollama MCP Bridge GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Ollama MCP Bridge?

Ollama MCP Bridge works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Ollama MCP Bridge free to use?

Yes, Ollama MCP Bridge is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "ollama-mcp-bridge": { "command": "npx", "args": ["-y", "ollama-mcp-bridge"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Ollama MCP Bridge?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides