Extends Model Context Protocol (MCP) to local LLMs via Ollama, enabling Claude-like tool use (files, web, email, GitHub, AI images) while keeping data private. Modular Python servers for on-prem AI. #LocalAI #MCP #Ollama
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add ollama -- uv run client.py ../file_system/file_system.py~/.codex/config.toml
[mcp_servers.ollama]
command = "uv"
args = ["run", "client.py", "../file_system/file_system.py"]
# codex mcp add ollama -- uv run client.py ../file_system/file_system.py~/.cursor/mcp.json
{
"mcpServers": {
"ollama": {
"command": "uv",
"args": [
"run",
"client.py",
"../file_system/file_system.py"
]
}
}
}.vscode/mcp.json
{
"servers": {
"ollama": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"client.py",
"../file_system/file_system.py"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"ollama": {
"command": "uv",
"args": [
"run",
"client.py",
"../file_system/file_system.py"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"ollama": {
"command": "uv",
"args": [
"run",
"client.py",
"../file_system/file_system.py"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"ollama": {
"command": "uv",
"args": [
"run",
"client.py",
"../file_system/file_system.py"
]
}
}
}