Ollama Hive MCP Server
About
# Ollama Hive MCP Server A TypeScript-based Model Context Protocol (MCP) server that integrates with Ollama models using LangChain. This server provides tools and resources for querying local language models through a standardized MCP interface, with model-specific MCP server configurations. ## Features - **Model…
Explore
- Model Management: Configure and manage multiple Ollama models
- Model-Specific MCPs: Each model can have its own set of MCP servers
- Session Management: Conversation sessions for context continuity across multiple queries
- Environment Variable Support: Override endpoints and configuration via environment variables
- LangChain Integration: Leverage LangChain for model interactions
- Environment-based Configuration: Load configuration from MCP_CONFIG_PATH
- MCP Tools: Query models, test connectivity, and list available models
- MCP Resources: Access model configurations and metadata
- Stdio Transport: Standard input/output communication for seamless integration
- Pre-configured Models: Define models with their specific endpoints and settings
- Model Pre-loading: All models are loaded at startup for quick responses
- Performance Monitoring: Built-in response time tracking and status monitoring
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Ollama Hive MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
- Node.js 18+
- Ollama running locally (default: http://localhost:11434)
- TypeScript knowledge for customization
Run the server directly with npx (no installation required):
npx ollama-hive-mcp-server
MCP_CONFIG_PATH=./my-config.json npx ollama-hive-mcp-server
OLLAMA_ENDPOINT=http://localhost:11434 MCP_CONFIG_PATH=./config.json npx ollama-hive-mcp-server
{
"tool": "query_model",
"arguments": {
"prompt": "Hello, world!"
}
}
{
"tool": "query_model",
"arguments": {
"model": "llama3.2",
"prompt": "Write a Python function to calculate fibonacci"
}
}
{
"tool": "query_model",
"arguments": {
"prompt": "Explain quantum computing",
"createSession": true
}
}
Set the following environment variables to configure the server:
export MCP_CONFIG_PATH=/path/to/your/mcp-config.json
export NODE_ENV=production
Create a JSON configuration file with the following structure:
{
"globalEndpoint": "http://localhost:11434",
"models": [
{
"name": "llama3.2",
"endpoint": "http://custom-endpoint:11434",
"model": "llama3.2:latest",
"temperature": 0.7,
"maxTokens": 2048,
"description": "Llama 3.2 model for general purpose tasks",
"mcps": [
{
"name": "filesystem-server",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/allowed/path"],
"description": "Filesystem access MCP server",
"env": {
"NODE_ENV": "production"
}
}
]
}
],
"defaultModel": "llama3.2"
}
Global Configuration:
- globalEndpoint: Default endpoint for all models (optional)
- defaultModel: Name of the default model to use (optional)
Model Configuration:
- name: Unique identifier for the model (required)
- endpoint: Model-specific endpoint override (optional)
- model: Ollama model name (required, e.g., llama3.2:latest)
- temperature: Response generation temperature 0.0-2.0 (optional, default: 0.7)
- maxTokens: Maximum tokens to generate (optional)
- description: Human-readable description (optional)
- mcps: Array of MCP servers for this model (optional, default: [])
MCP Server Configuration:
- name: Unique identifier for the MCP server (required)
- command: Command to execute the server (required)
- args: Command line arguments (optional)
- env: Environment variables for the server (optional)
- description: Human-readable description (optional)
See config/example-mcp-config.json for a complete example with multiple models and their associated MCP servers.
export MCP_CONFIG_PATH=./config/example-mcp-config.json
Get configuration summary including environment overrides.
Parameters: None
Returns configuration summary with environment overrides.
Returns current environment configuration.
Create a .env file in your project root:
MCP_CONFIG_PATH=./config/example-mcp-config.json
OLLAMA_ENDPOINT=http://localhost:11434
DEBUG=false
NODE_ENV=development
query_model
Query pre-configured models with optional session context
test_model
Test model connectivity
get_model_info
Get model details and MCP info
list_models
List all configured models
get_config_summary
Configuration overview
get_loading_status
Model loading status
create_session
Create conversation sessions for context continuity
list_sessions
List all active conversation sessions
get_session
Get detailed session information and message history
delete_session
Delete specific conversation sessions
clear_sessions
Clear all conversation sessions
- query_model - Query pre-configured models with optional session context
- test_model - Test model connectivity
- get_model_info - Get model details and MCP info
- list_models - List all configured models
- get_config_summary - Configuration overview
- get_loading_status - Model loading status
- create_session - Create conversation sessions for context continuity
- list_sessions - List all active conversation sessions
- get_session - Get detailed session information and message history
- delete_session - Delete specific conversation sessions
- clear_sessions - Clear all conversation sessions
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"ollama hive mcp server": {
"ollama-hive-mcp-server": {
"command": "npx",
"args": [
"ollama-hive-mcp-server"
]
}
}
}
}
McpServers
{
"ollama-hive-mcp-server": {
"command": "npx",
"args": [
"ollama-hive-mcp-server"
]
}
}
A TypeScript-based Model Context Protocol (MCP) server that integrates with Ollama models using LangChain. This server provides tools and resources for querying local language models through a standardized MCP interface, with model-specific MCP server configurations.
Features
- Model Management: Configure and manage multiple Ollama models
- Model-Specific MCPs: Each model can have its own set of MCP servers
- Session Management: Conversation sessions for context continuity across multiple queries
- Environment Variable Support: Override endpoints and configuration via environment variables
- LangChain Integration: Leverage LangChain for model interactions
- Environment-based Configuration: Load configuration from MCP_CONFIG_PATH
- MCP Tools: Query models, test connectivity, and list available models
- MCP Resources: Access model configurations and metadata
- Stdio Transport: Standard input/output communication for seamless integration
- Pre-configured Models: Define models with their specific endpoints and settings
- Model Pre-loading: All models are loaded at startup for quick responses
- Performance Monitoring: Built-in response time tracking and status monitoring
Quick Start with NPX
Run the server directly with npx (no installation required):
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



