# Ollama — MCP server on mcp.ai > Connect your Ollama account and use 8 tools for AI models straight from your AI agent. Connect with your own API key. Run large language models locally or in the cloud with Ollama. By: mcp.ai · official Page: https://mcp.ai/ollama ## Connect (MCP protocol) Remote MCP endpoint (HTTP, streamable): https://api.mcp.ai/p_ollama?ms=1787293560000 Add it as a custom/remote MCP connector, then authenticate when prompted. ## REST API (no MCP client required) Every tool is also a REST endpoint, authed with a workspace API key. Discover: GET https://api.mcp.ai/api/ollama/_endpoints # public; lists every endpoint Call: POST https://api.mcp.ai/api/ollama/ Authorization: Bearer sk_live_… # create one at https://mcp.ai/settings/api-keys Content-Type: application/json Body: { …args } → { "ok": true, "tool": "", "result": { … } } ## Developer docs How to use (MCP or REST), markdown: https://mcp.ai/ollama/skill.md Postman collection (v2.1): https://mcp.ai/ollama/postman.json ## Tools - ollama_chat(model: string, think?: boolean|string, tools?: object[], format?: string|object, stream?: boolean, options?: object, logprobs?: boolean, messages: object[], keep_alive?: string|integer, top_logprobs?: integer) — Tool to send a chat message with conversation history to Ollama. Use when you need to have a multi-turn conversation with an LLM model. - ollama_generate(raw?: boolean, model: string, think?: boolean|string, format?: string|object, images?: string[], prompt?: string, stream?: boolean, suffix?: string, system?: string, options?: object, logprobs?: boolean, keep_alive?: string|integer, top_logprobs?: integer) — Tool to generate text responses from Ollama models with optional raw mode. Use raw=true to bypass prompt templating when you need full control over the prompt for debugging or custom processing. Note - ollama_list_models() — Tool to list all available Ollama models and their details. Use when you need to fetch installed models with metadata including name, size, last modified timestamp, digest, and format information. - ollama_open_ai_chat_completions(n?: integer, seed?: integer, stop?: string|string[], user?: string, model: string, tools?: object[], top_p?: number, stream?: boolean, messages: object[], logit_bias?: object, max_tokens?: integer, temperature?: number, tool_choice?: string, stream_options?: object, response_format?: object, presence_penalty?: number, frequency_penalty?: number) — Tool to create OpenAI-compatible chat completions using Ollama models. Use when you need conversational AI responses with OpenAI API format compatibility. - ollama_open_ai_completions(n?: integer, echo?: boolean, seed?: integer, stop?: string|string[], user?: string, model: string, top_p?: number, prompt: string, stream?: boolean, suffix?: string, best_of?: integer, logprobs?: integer, logit_bias?: object, max_tokens?: integer, temperature?: number, stream_options?: object, presence_penalty?: number, frequency_penalty?: number) — Tool to create OpenAI-compatible text completions using Ollama models. Use when you need text generation with OpenAI API format compatibility beyond chat-based interactions. - ollama_open_ai_list_models() — Tool to list available models using OpenAI-compatible API format. Use when you need to retrieve locally available Ollama models with metadata following OpenAI's model list format. - ollama_show(model: string, verbose?: boolean) — Tool to show comprehensive information about an Ollama model. Use when you need to retrieve model details, parameters, template, license, or system prompt. - ollama_version() — Tool to get the version of Ollama running locally. Use to check which version of Ollama is currently installed. ## Example prompts - "What can I do in Ollama?" - "Show me a summary of my Ollama account" ## Links Docs: https://mcp.ai/docs/mcps/ollama Website: https://mcp.ai/mcps/ollama