This repository provides a TypeScript bridge connecting local LLMs via Ollama to Model Context Protocol servers, enabling open-source models to utilize tools like filesystem operations, web search, and more.
This TypeScript project connects local LLMs (via Ollama) to Model Context Protocol (MCP) servers, enabling open-source models to leverage tools and capabilities similar to Claude.
The bridge facilitates communication between local LLMs and MCP servers, providing functionalities like filesystem operations, web search, GitHub interactions, Google Drive & Gmail integration, memory/storage, and image generation. It translates LLM outputs into the MCP's JSON-RPC protocol, allowing any Ollama-compatible model to utilize these tools.
The core components include a Bridge for tool management, an LLM Client for Ollama interaction, an MCP Client for server communication, and a Tool Router.
Multi-MCP support, structured output validation, automatic tool detection, robust process management, and detailed logging.
The bridge detects tools based on user input and processes responses through stages: LLM generates tool calls, the bridge validates and routes to the appropriate MCP, the MCP executes the operation, and the bridge formats the response for the user.
patruff/ollama-mcp-bridge
December 12, 2024
March 28, 2025
TypeScript