π¦ ollama-mcpo-adapter
About
Adapter to expose MCPO, the MCP-to-OpenAPI proxy server, tools in Ollama-compatible format
Details
- License
- MIT
Explore
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-mcpo-adapterCommand (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
pip install ollama-mcpo-adapter
Assuming you have MCPO running like this:
uvx mcpo --port 5090 --config /path/to/mcp_config.json
You can get all available functions in Ollama ToolCall format with the adapter:
from ollama_mcpo_adapter import OllamaMCPOAdapter
adapter = OllamaMCPOAdapter(host="localhost", port=5090, config_path="/path/to/mcp_config.json")
You can start a MCPO service with this extension:
pythonfrom ollama_mcpo_adapter import MCPOService
mcp_config = {
"mcpServers": {
"time": {"command": "uvx", "args": ["mcp-server-time", "--local-timezone=Europe/Berlin"]}
}
}
mcpo = MCPOService("127.0.0.1", 4090, config=mcp_config,
config_path="path/to/mcp_config.json")
pytest
---
tools = adapter.list_tools_ollama()
You can omit the config path. But discovery of MCP server names is more reliable with a provided config.
Otherwise, the server names will be read from the automatically generated OpenAPI docs MCPO provides which might change in the future.
---
client = Client(host="http://127.0.0.1:11434")
response = client.chat(
model="qwen2.5-coder:14b-instruct-q4_K_M",
messages=[{"role": "user", "content": "Write a file..."}],
tools=tools,
)
And finally call the tools:
if response.message.tool_calls:
adapter.call_tools_from_response(response.message.tool_calls)
---
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"\ud83e\udd99 ollama-mcpo-adapter": {
"ollama-mcpo-adapter": {
"command": "uvx",
"args": [
"mcpo",
"--port",
"5090",
"--config",
"/path/to/mcp_config.json"
]
}
}
}
}
McpServers
{
"ollama-mcpo-adapter": {
"command": "uvx",
"args": [
"mcpo",
"--port",
"5090",
"--config",
"/path/to/mcp_config.json"
]
}
}
Expose MCPO, the MCP-to-OpenAPI proxy server, tools as Ollama-compatible functions using a simple Python adapter and optional runtime service.
---
β¨ Features
- π Connect to a MCPO instance
- βοΈ Launch your own MCPO server programmatically via MCPOService
- π List MCP tools exposed via OpenAPI as Ollama-compatible tool functions
---
π Quickstart
1. Install
pip install ollama-mcpo-adapter
Usage with Existing MCPO Instance
Assuming you have MCPO running like this:uvx mcpo --port 5090 --config /path/to/mcp_config.json
You can get all available functions in Ollama ToolCall format with the adapter:
```python
from ollama_mcpo_adapter import OllamaMCPOAdapter
adapter = OllamaMCPOAdapter(host="localhost", port=5090, config_path="/path/to/mcp_config.json")
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



