Ollama-MCP Bridge WebUI

Ollama-MCP Bridge WebUI

一个将本地 Ollama LLM 连接到模型上下文协议 (MCP) 服务器的 Web 界面。它使开源模型能够使用类似于商业 AI 助手的 文件操作、网络搜索和推理工具——所有这些都在您自己的硬件上私下运行。

Rkm1999

开发者工具
访问服务器

README

Ollama-MCP 桥接 WebUI

一个 TypeScript 实现,通过 Web 界面将本地 LLM(通过 Ollama)连接到模型上下文协议 (MCP) 服务器。此桥接器允许开源模型使用与 Claude 相同的工具和功能,从而实现完全在您自己的硬件上运行的强大的本地 AI 助手。

特性

  • 多 MCP 集成:同时连接多个 MCP 服务器
  • 工具检测:根据查询自动识别要使用的工具
  • Web 界面:简洁的 UI,带有可折叠的工具描述
  • 全面的工具集:文件系统、网络搜索和推理能力

安装

自动安装

设置桥接器的最简单方法是使用包含的安装脚本:

./install.bat

此脚本将:

  1. 检查并安装 Node.js(如果需要)
  2. 检查并安装 Ollama(如果需要)
  3. 安装所有依赖项
  4. 创建工作区目录 (../workspace)
  5. 设置初始配置
  6. 构建 TypeScript 项目
  7. 下载 Ollama 的 Qwen 模型

运行脚本后,您只需要:

  1. 将您的 API 密钥添加到 .env 文件(配置中的 $VARIABLE_NAME 引用将被实际值替换)

手动安装

如果您更喜欢手动设置:

  1. ollama.com/download 安装 Ollama
  2. 拉取 Qwen 模型:ollama pull qwen2.5-coder:7b-instruct-q4_K_M
  3. 安装依赖项:npm install
  4. 创建一个工作区目录:mkdir ../workspace
  5. .env 中配置 API 密钥
  6. 构建项目:npm run build

配置

桥接器通过两个主要文件进行配置:

1. bridge_config.json

此文件定义 MCP 服务器、LLM 设置和系统提示。环境变量使用 $VARIABLE_NAME 语法引用。

示例:

{
  "mcpServers": {
    "filesystem": {
      "command": "node",
      "args": [
        "To/Your/Directory/Ollama-MCP-Bridge-WebUI/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js",
        "To/Your/Directory/Ollama-MCP-Bridge-WebUI/../workspace"
      ],
      "allowedDirectory": "To/Your/Directory/Ollama-MCP-Bridge-WebUI/../workspace"
    },
    "brave-search": {
      "command": "node",
      "args": [
        "To/Your/Directory/Ollama-MCP-Bridge-WebUI/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js"
      ],
      "env": {
        "BRAVE_API_KEY": "$BRAVE_API_KEY"
      }
    },
    "sequential-thinking": {
      "command": "node",
      "args": [
        "To/Your/Directory/Ollama-MCP-Bridge-WebUI/node_modules/@modelcontextprotocol/server-sequential-thinking/dist/index.js"
      ]
    }
  },
  "llm": {
    "model": "qwen2.5-coder:7b-instruct-q4_K_M",
    "baseUrl": "http://localhost:11434",
    "apiKey": "ollama",
    "temperature": 0.7,
    "maxTokens": 8000
  },
  "systemPrompt": "You are a helpful assistant that can use various tools to help answer questions. You have access to three main tool groups: 1) Filesystem operations - for working with files and directories, 2) Brave search - for finding information on the web, 3) Sequential thinking for complex problem-solving. When a user asks a question that requires external information, real-time data, or file manipulation, you should use a tool rather than guessing or using only your pre-trained knowledge."
}

2. .env 文件

此文件存储敏感信息,如 API 密钥:

# Brave Search API key
BRAVE_API_KEY=your_brave_key_here

桥接器将自动将配置中的 $BRAVE_API_KEY 替换为您 .env 文件中的实际值。

用法

启动桥接器

只需运行:

./start.bat

这将启动带有 Web 界面的桥接器。

Web 界面

在浏览器中打开 http://localhost:8080(或控制台中显示的端口)以访问 Web 界面。

许可证

MIT 许可证 - 有关详细信息,请参阅 LICENSE 文件

推荐服务器

Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
MCP Package Docs Server

MCP Package Docs Server

促进大型语言模型高效访问和获取 Go、Python 和 NPM 包的结构化文档,通过多语言支持和性能优化来增强软件开发。

精选
本地
TypeScript
Claude Code MCP

Claude Code MCP

一个实现了 Claude Code 作为模型上下文协议(Model Context Protocol, MCP)服务器的方案,它可以通过标准化的 MCP 接口来使用 Claude 的软件工程能力(代码生成、编辑、审查和文件操作)。

精选
本地
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

用于任务管理的模型上下文协议服务器。它允许 Claude Desktop(或任何 MCP 客户端)在基于队列的系统中管理和执行任务。

精选
本地
JavaScript
mermaid-mcp-server

mermaid-mcp-server

一个模型上下文协议 (MCP) 服务器,用于将 Mermaid 图表转换为 PNG 图像。

精选
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP 服务器向 AI 编码助手(如 Cursor)提供 Jira 工单信息。

精选
TypeScript
Linear MCP Server

Linear MCP Server

一个模型上下文协议(Model Context Protocol)服务器,它与 Linear 的问题跟踪系统集成,允许大型语言模型(LLM)通过自然语言交互来创建、更新、搜索和评论 Linear 问题。

精选
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

这个服务器通过将复杂问题分解为顺序步骤来促进结构化的问题解决,支持修订,并通过完整的 MCP 集成来实现多条解决方案路径。

精选
Python
Curri MCP Server

Curri MCP Server

通过管理文本笔记、提供笔记创建工具以及使用结构化提示生成摘要,从而实现与 Curri API 的交互。

官方
本地
JavaScript