ollama-mcp-bridge  by patruff

MCP bridge for local LLMs to use external tools

created 7 months ago
893 stars

Top 41.4% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a TypeScript bridge enabling local LLMs via Ollama to interact with Model Context Protocol (MCP) servers, replicating advanced tool-use capabilities found in proprietary models like Claude. It targets developers and power users seeking to equip open-source models with local filesystem access, web search, GitHub integration, email/drive management, and image generation.

How It Works

The bridge acts as an intermediary, translating LLM outputs into MCP's JSON-RPC protocol. It dynamically routes tool requests from the LLM to the appropriate MCP server based on detected intent and keywords. This architecture allows any Ollama-compatible model to leverage a suite of external tools, enhancing their utility for complex, real-world tasks.

Quick Start & Requirements

  • Install Ollama & Model: ollama pull qwen2.5-coder:7b-instruct
  • Install MCP Servers: npm install -g @modelcontextprotocol/server-filesystem @modelcontextprotocol/server-brave-search @modelcontextprotocol/server-github @modelcontextprotocol/server-memory @patruff/server-flux @patruff/server-gmail-drive
  • Configure Credentials: Set environment variables (e.g., BRAVE_API_KEY, GITHUB_PERSONAL_ACCESS_TOKEN, REPLICATE_API_TOKEN) and run Gmail/Drive MCP auth.
  • Configuration: Define MCP server details, LLM settings, and tool permissions in bridge_config.json.
  • Run Bridge: npm run start
  • Prerequisites: Node.js, npm, Ollama, specific MCP server packages, API keys for certain services.

Highlighted Details

  • Enables local LLMs to perform filesystem operations, web searches (Brave), GitHub interactions, Google Drive/Gmail management, and image generation (Flux).
  • Features smart tool detection from natural language prompts and structured output validation for tool calls.
  • Supports dynamic tool routing and robust process management for Ollama.

Maintenance & Community

The project is maintained by patruff. Links to related projects like Model Context Protocol, Claude Desktop Configuration, Ollama, and various MCP server implementations are provided.

Licensing & Compatibility

The README does not explicitly state the license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project is described as a bridge and relies on external MCP server implementations, which may have their own dependencies and setup requirements. Specific details on error recovery and parallel tool execution are listed as future improvements.

Health Check
Last commit

3 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
1
Star History
188 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Travis Fischer Travis Fischer(Founder of Agentic), and
1 more.

fastmcp by punkpeye

3.7%
2k
TypeScript framework for building MCP servers handling client sessions
created 7 months ago
updated 2 days ago
Starred by Didier Lopes Didier Lopes(Founder of OpenBB), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
2 more.

fastmcp by jlowin

2.2%
15k
Pythonic SDK for building Model Context Protocol (MCP) servers/clients
created 8 months ago
updated 13 hours ago
Feedback? Help us improve.