Skip to content

VS Code Integration

MCP Configuration

Add the Ollama MCP server to your VS Code MCP settings:

{
  "mcpServers": {
    "ollama": {
      "command": "py",
      "args": ["-m", "mcp_ollama_python"],
      "disabled": false
    }
  }
}

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

{
  "tool": "ollama_list",
  "arguments": {
    "format": "markdown"
  }
}