VS Code Integration
You can use mcp-ollama-python in VS Code in two ways:
- Companion extension (recommended) — UI for start/stop, models, and logs
- MCP config only — wire the server into the editor’s MCP settings JSON
Companion extension (recommended)
Install MCP Ollama Manager:
Then:
pip install mcp-ollama-python(or use the extension’s Install Now prompt)- Command Palette → MCP Ollama: Configure Server
- MCP Ollama: Start Server
More detail: Companion VS Code Extension.
MCP Configuration (without the extension)
Add the Ollama MCP server to your VS Code / Cursor MCP settings:
{
"mcpServers": {
"ollama": {
"command": "py",
"args": ["-m", "mcp_ollama_python"],
"disabled": false
}
}
}
On Linux/macOS you may prefer "command": "python3" instead of "py".
Usage Examples
Chat with a Model
{
"tool": "ollama_chat",
"arguments": {
"model": "llama3.2:latest",
"messages": [
{ "role": "user", "content": "Explain quantum computing" }
]
}
}
Generate Embeddings
{
"tool": "ollama_embed",
"arguments": {
"model": "nomic-embed-text",
"input": ["Hello world", "Embeddings are great"]
}
}
List Available Models
Related
- Companion VS Code Extension
- Available Tools — Full list of MCP tools and their arguments
- Configuration — Environment variables and model configuration
- Extension documentation