Token导航 LogoToken导航TokenDH.com
MCP Ollama Agent logo
开发工具stdio官方级别未说明来源级核验

MCP Ollama Agent

MCP Server

tsx

A TypeScript example showcasing the integration of Ollama with the Model Context Protocol (MCP), specifically the Filesystem MCP Server. This project provides an interactive command-line interface for an AI agent that can utilize filesystem tools.

工具数

0

提示词数

0

GitHub Stars

29

资源数

0
TypeScriptAI代理开发工具

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ausboss

提供方

ausboss

最后核验

2026/5/18 02:17

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx tsx ./src/demo.ts

详细介绍

带有Ollama集成的TypeScript MCP代理

该项目展示了 模型上下文协议(MCP) 服务器和 没有,允许AI模型通过统一的界面与各种工具进行交互。

✨ 特性

  • 支持多个MCP服务器(uvx和npx都经过测试)
  • 内置对文件系统操作和web研究的支持
  • 通过以下方式轻松配置 mcp-config.json 类似于 claude_desktop_config.json
  • 交互式聊天界面与Ollama集成,应支持任何工具
  • 独立演示模式,用于测试没有LLM的web和文件系统工具

🚀 入门指南

  1. 先决条件:

- Node.js(版本18或更高)

- Ollama已安装并正在运行

- 全局安装要使用的MCP工具:

     # For filesystem operations
     npm install -g @modelcontextprotocol/server-filesystem

     # For web research
     npm install -g @mzxrai/mcp-webresearch
  1. 克隆并安装:
   git clone https://github.com/ausboss/mcp-ollama-agent.git
   cd mcp-ollama-agent
   npm install
  1. 在中配置您的工具和工具支持的Olama模型 mcp-config.json:
   {
     "mcpServers": {
       "filesystem": {
         "command": "npx",
         "args": ["@modelcontextprotocol/server-filesystem", "./"]
       },
       "webresearch": {
         "command": "npx",
         "args": ["-y", "@mzxrai/mcp-webresearch"]
       }
     },
     "ollama": {
       "host": "http://localhost:11434",
       "model": "qwen2.5:latest"
     }
   }
  1. 运行演示以测试没有LLM的文件系统和webresearch工具:
   npx tsx ./src/demo.ts
  1. 或者启动与Ollama的聊天界面:
   npm start

⚙️ 配置

  • MCP服务器: 将任何兼容MCP的服务器添加到 mcpServers 章节
  • 没有 : 配置主机和型号(必须支持函数调用)
  • 支持Python(uvx)和Node.js(npx)MCP服务器

💡 示例用法

这个例子使用了这个模型 qwen2.5:最新

Chat started. Type "exit" to end the conversation.
You: can you use your list directory tool to see whats in test-directory then use your read file tool to read it to me?
Model is using tools to help answer...
Using tool: list_directory
With arguments: { path: 'test-directory' }
Tool result: [ { type: 'text', text: '[FILE] test.txt' } ]
Assistant:
Model is using tools to help answer...
Using tool: read_file
With arguments: { path: 'test-directory/test.txt' }
Tool result: [ { type: 'text', text: 'rosebud' } ]
Assistant: The content of the file `test.txt` in the `test-directory` is:
rosebud
You: thanks
Assistant: You're welcome! If you have any other requests or need further assistance, feel free to ask.

系统提示

一些本地模型可能需要工具选择方面的帮助。在中自定义系统提示 ChatManager.ts 以提高工具的使用率。

🤝 贡献

欢迎投稿!请随时提交问题或拉取请求。

目录标签

目录标签

TypeScriptAI代理开发工具developer-toolsagentollamaollama-toolsmcp-servermcp-clientmcp-agentAI模型交互本地部署工具集成文件系统操作网络研究

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

tsx

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP