Ollama MCP Server
Ollama MCP 服务器
Ollama 的 MCP(模型上下文协议)服务器,可实现 Ollama 本地 LLM 模型与 Claude Desktop 等 MCP 兼容应用程序之间的无缝集成。
特征
列出可用的 Ollama 型号
从 Ollama 提取新模型
使用 Ollama 的聊天 API 与模特聊天
获取详细模型信息
自动端口管理
环境变量配置
Related MCP server: Ollama MCP Server
先决条件
Node.js(v16 或更高版本)
npm
Ollama 已在本地安装并运行
安装
手动安装
通过 npm 全局安装:
npm install -g @rawveg/ollama-mcp在其他 MCP 应用程序中安装
要在其他 MCP 兼容应用程序(如 Cline 或 Claude Desktop)中安装 Ollama MCP 服务器,请将以下配置添加到应用程序的 MCP 设置文件中:
{
"mcpServers": {
"@rawveg/ollama-mcp": {
"command": "npx",
"args": [
"-y",
"@rawveg/ollama-mcp"
]
}
}
}设置文件位置因应用程序而异:
Claude 桌面:Claude 应用数据目录中的
claude_desktop_config.jsonCline:VS Code 全局存储中的
cline_mcp_settings.json
用法
启动服务器
只需运行:
ollama-mcp服务器默认在 3456 端口启动。你可以使用 PORT 环境变量指定其他端口:
PORT=3457 ollama-mcp环境变量
PORT:服务器端口(默认值:3456)。可以直接运行时使用:# When running directly PORT=3457 ollama-mcpOLLAMA_API:Ollama API 端点(默认: http://localhost:11434 )
API 端点
GET /models- 列出可用模型POST /models/pull- 拉取新模型POST /chat- 与模特聊天GET /models/:name- 获取模型详细信息
发展
克隆存储库:
git clone https://github.com/rawveg/ollama-mcp.git
cd ollama-mcp安装依赖项:
npm install构建项目:
npm run build启动服务器:
npm start贡献
欢迎贡献代码!欢迎提交 Pull 请求。
然而,这并不意味着未经事先讨论和同意,即可将该项目纳入第三方服务或商业平台。虽然我之前接受了贡献(例如 Dockerfile 和相关的 README 更新)以支持与Smithery等服务的集成,但类似服务Glama最近的举动要求我重新评估此政策。
Glama 未经通知或同意,就选择将开源 MCP 项目纳入其商业产品,并随后创建了问题请求,要求维护人员进行无偿工作,以确保与其平台的兼容性。这种行为——利用社区劳动牟利,却不进行对话或提供报酬——不仅缺乏考虑,而且在道德上存在问题。
因此,为了保护本项目及其贡献者的完整性,许可证已更新为GNU Affero 通用公共许可证 v3.0 (AGPL-3.0) 。此变更确保任何软件的使用——尤其是在商业或基于服务的平台上——必须完全遵守 AGPL 的条款并获得单独的商业许可证。如果项目正在积极盈利,仅仅提供原始来源链接是不够的。如果您希望将此项目纳入商业产品,请先联系我们,讨论许可条款。
执照
AGPL v3.0
有关的
该项目之前采用 MIT 许可证。自 2025 年 4 月 20 日起,该项目现采用 AGPL-3.0 许可证,以防止未经授权的商业利用。如果您在此变更之前使用此项目,请参阅相关的 Git 标签或提交以了解适用的许可证。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceA bridge that enables seamless integration of Ollama's local LLM capabilities into MCP-powered applications, allowing users to manage and run AI models locally with full API coverage.101,20974AGPL 3.0
- AlicenseCqualityDmaintenanceA bridge that integrates Ollama's local LLM capabilities into MCP-powered applications, enabling users to run, manage, and interact with AI models locally with full control and privacy.92945MIT
- AlicenseAqualityCmaintenanceEnables consulting with local Ollama models for reasoning from alternative viewpoints. Supports sending prompts to Ollama models and listing available models on your local Ollama instance.51MIT
- AlicenseAqualityDmaintenanceIntegrates Ollama's local AI models with MCP clients, enabling listing models, viewing model details, and asking questions to models.3MIT
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/rawveg/ollama-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server