mcplex

mcplex

An MCP server that bridges local Ollama models and ChromaDB vector memory to MCP clients like Claude Code. It enables local text generation, vision-based image analysis, and semantic memory storage without requiring external API keys.

Category
访问服务器

README

mcplex

MCP server for local AI models -- expose Ollama, embeddings, vision, and vector memory to Claude Code and other MCP clients.

License: MIT Python 3.10+ MCP


What is this?

mcplex is a Model Context Protocol server that bridges your local AI models to any MCP client. It gives Claude Code (or any MCP-compatible tool) direct access to:

  • Ollama models -- generate text, chat, and list available models
  • Embeddings -- generate vector embeddings via local embedding models
  • Vision -- analyze images and extract text using local vision models (LLaVA, etc.)
  • Vector memory -- store and semantically search text using ChromaDB

Everything runs locally. No API keys needed. No data leaves your machine.

Features

Category Tools Description
Text Generation generate One-shot text generation with any Ollama model
Chat chat Multi-turn conversation with message history
Embeddings embed Generate vector embeddings for text
Model Management list_models List all available Ollama models
Vision analyze_image Describe/analyze images with a vision model
OCR ocr_image Extract text from images
Memory Store memory_store Store text + metadata in ChromaDB
Memory Search memory_search Semantic search over stored memories
Memory List memory_list_collections List all memory collections

Requirements

  • Python 3.10+
  • Ollama running locally (default: http://localhost:11434)
  • At least one Ollama model pulled (e.g., ollama pull qwen3:8b)

Installation

# From PyPI (when published)
pip install mcplex

# With vector memory support
pip install mcplex[memory]

# From source
git clone https://github.com/dbhavery/mcplex.git
cd mcplex
pip install -e ".[memory,dev]"

Claude Code Integration

Add mcplex to your Claude Code MCP configuration:

{
  "mcpServers": {
    "mcplex": {
      "command": "mcplex",
      "args": []
    }
  }
}

Or if running from source:

{
  "mcpServers": {
    "mcplex": {
      "command": "python",
      "args": ["-m", "mcplex.server"]
    }
  }
}

Once configured, Claude Code can use your local models directly:

"Use the generate tool to summarize this file with qwen3:8b"

"Embed these three paragraphs and store them in the 'research' collection"

"Analyze this screenshot and extract all visible text"

Tool Reference

generate

Send a prompt to a local Ollama model.

Parameter Type Default Description
prompt str required The text prompt
model str qwen3:8b Ollama model name
temperature float 0.7 Sampling temperature (0.0-2.0)
max_tokens int 2048 Maximum tokens to generate

chat

Multi-turn chat with message history.

Parameter Type Default Description
messages list[{role, content}] required Message history
model str qwen3:8b Ollama model name
temperature float 0.7 Sampling temperature
max_tokens int 2048 Maximum tokens

embed

Generate vector embeddings.

Parameter Type Default Description
text str | list[str] required Text to embed
model str nomic-embed-text Embedding model

list_models

List all available Ollama models. No parameters.

analyze_image

Analyze an image with a local vision model.

Parameter Type Default Description
image_path str required Path to image file
prompt str "Describe this image in detail." Question/instruction
model str llava Vision model name

ocr_image

Extract text from an image.

Parameter Type Default Description
image_path str required Path to image file
model str llava Vision model name

memory_store

Store text in vector memory.

Parameter Type Default Description
text str required Text to store
metadata dict None Optional key-value metadata
collection str "default" ChromaDB collection name

memory_search

Semantic search over stored memories.

Parameter Type Default Description
query str required Search query
n_results int 5 Max results to return
collection str "default" ChromaDB collection name

memory_list_collections

List all ChromaDB collections. No parameters.

Configuration

All configuration is via environment variables (or a .env file):

Variable Default Description
MCPLEX_OLLAMA_URL http://localhost:11434 Ollama server URL
MCPLEX_DEFAULT_MODEL qwen3:8b Default text model
MCPLEX_EMBED_MODEL nomic-embed-text Default embedding model
MCPLEX_VISION_MODEL llava Default vision model
MCPLEX_CHROMA_PATH ./mcplex_data/chroma ChromaDB storage path
MCPLEX_DEFAULT_TEMPERATURE 0.7 Default sampling temperature
MCPLEX_DEFAULT_MAX_TOKENS 2048 Default max tokens

Architecture

MCP Client (Claude Code, etc.)
    |
    | stdio (JSON-RPC)
    |
mcplex server (FastMCP)
    |
    +-- ollama_tools -----> Ollama API (HTTP)
    |                        localhost:11434
    +-- vision_tools -----> Ollama API (with images)
    |
    +-- memory_tools -----> ChromaDB (local persistent)
  • Transport: stdio (standard for CLI-based MCP clients)
  • Ollama communication: async HTTP via httpx
  • Vector storage: ChromaDB with persistent client (lazy-loaded)
  • No API keys required -- everything runs locally

Development

git clone https://github.com/dbhavery/mcplex.git
cd mcplex
pip install -e ".[memory,dev]"

# Run tests
python -m pytest tests/ -v

# Run the server
mcplex
# or
python -m mcplex.server

License

MIT -- Copyright (c) 2026 Donald Havery

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选