MCP Directory
Back

ollama-mcp-csharp

by strabu · C# · ★ 4

Simple Examples in C# (using Microsoft.Extensions.AI) that demonstrate how to use Tool-calling or MCP (using ModelContextProtocol csharp-sdk) with open/local LLMs running on Ollama (using OllamaSharp).

Install

git clone https://github.com/strabu/ollama-mcp-csharp.git

Claude Desktop config

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "ollama-mcp-csharp": {
      "command": "npx",
      "args": [
        "-y",
        "github:strabu/ollama-mcp-csharp"
      ]
    }
  }
}

From the README

Simple Examples in C# (using [Microsoft.Extensions.AI](https://github.com/dotnet/extensions/tree/main/src/Libraries/Microsoft.Extensions.AI)) that demonstrate how to use - Tool-calling - or MCP (using [ModelContextProtocol csharp-sdk](https://github.com/modelcontextprotocol/csharp-sdk)) - with open/local LLMs running on Ollama (using [OllamaSharp](https://github.com/awaescher/OllamaSharp)). | Topic | Model | Link | | --- | --- | --- | | Ask "What time is it?" and get an aswer from the model. | qwen3:8b | [src/OllamaToolCallingExample](./src/OllamaToolCallingExample/) | | Open a website and…
Read full README on GitHub →

💡 Need a managed MCP host?

Try Claude Pro for the smoothest MCP experience, or browse our cloud-hosted servers.

Related developer tools servers