MCPInstall
mcp_client_ollama logo

mcp_client_ollama

by georgi-terziyski 3 stars georgi-terziyski/mcp_client_ollama

MCP client for Ollama supporting multiple language models with streaming responses.

READMEmain

Ollama MCP Client

A Model Context Protocol (MCP) client for language models served through Ollama.

Features

  • Multiple Model Support: Works with Qwen, Llama 3, Mistral, and Gemini models served via Ollama
  • Streaming Responses: Real-time streaming of LLM responses
  • Database Operations: Seamless integration with the Database MCP Server
  • Natural Language Interface: Interact with databases using natural language

Installation

# Clone the repository
git clone <repository-url>

# Install the package
pip install -e .

Quick Start

# Basic usage
mcp-ollama --model llama3 --server http://localhost:8000 "List all tables in my database"

# Specify a different Ollama server
mcp-ollama --model qwen --ollama-api http://localhost:11434 --server http://localhost:8000 "Show me the schema for the users table"

Configuration

The client can be configured using command line arguments or a configuration file:

Command Line Arguments

  • --model: The Ollama model to use (e.g., llama3, qwen, mistral, gemini)
  • --server: URL of the Database MCP server
  • --ollama-api: URL of the Ollama API server (default: http://localhost:11434)
  • --stream: Enable/disable streaming responses (default: true)
  • --config: Path to configuration file

Configuration File

Create a config.json file in your home directory:

{
  "model": "llama3",
  "server": "http://localhost:8000",
  "ollama_api": "http://localhost:11434",
  "stream": true
}

Example Usage

Natural Language Database Queries

# List tables
mcp-ollama "What tables do I have in my database?"

# Query data
mcp-ollama "Show me all users who registered in the last month"

# Create a table
mcp-ollama "Create a new table called products with columns for id, name, price, and description"

License

MIT

More AI Chatbot MCP servers

Similar servers from the same category.

Jentic

jentic

Enables AI assistants to discover and execute external APIs and workflows through a Python SDK that leverages the Open Agentic Knowledge repository for standardized API access and execution.

AI Chatbot

Provides a bridge to the Flyworks AI lipsync service, enabling creation of digital avatar videos synchronized with audio inputs through a simple API.

git

Official JavaScript implementation that integrates with MiniMax's multimodal capabilities for image generation, video creation, text-to-speech, and voice cloning across multiple transport modes.

APIVideo+7

Provides a bridge to Mureka.ai's music generation capabilities, enabling on-demand creation of lyrics, complete songs, and instrumental tracks without requiring specialized music production knowledge.

AI Chatbot