ollama-python icon indicating copy to clipboard operation
ollama-python copied to clipboard

Is interaction with MCP tool possible?

Open andreamoro opened this issue 4 months ago • 1 comments

Feature Request: Currently, the Ollama Python client does not seem to support consuming remote tools from Model Context Protocol (MCP) servers directly. For workflows requiring LLM tool calling functionality via the MCP protocol (e.g., running tool servers remotely, using MCP stdio or http), users have to rely on external adapters or other community projects rather than native support in this client.

Expected Behavior: It would be very helpful if the ollama-python library could natively connect to remote MCP servers, discover and invoke tools provided via the MCP protocol, and incorporate those results into LLM responses, similar to how some community adapters do.

andreamoro avatar Aug 13 '25 16:08 andreamoro

In the meantime this is getting integrated, I've built a wrapper that is available here https://github.com/andreamoro/ollama-fastmcp-wrapper

andreamoro avatar Aug 24 '25 08:08 andreamoro