MCP ExplorerExplorer

Ollama Mcp Client Ts

@8LWXpgon 9 months ago
1 MIT
FreeCommunity
AI Systems
TypeScript client for connecting Ollama models to Model Context Protocol.

Overview

What is Ollama Mcp Client Ts

ollama-mcp-client-ts is a TypeScript client designed to connect Ollama to the Model Context Protocol (MCP). It serves as a bridge between Ollama’s API and the MCP standard, enabling seamless integration of Ollama models into applications that support MCP.

Use cases

Use cases for ollama-mcp-client-ts include developing web applications that leverage Ollama’s machine learning models, creating data processing pipelines that utilize model predictions, and integrating Ollama’s functionalities into existing software systems that support MCP.

How to use

To use ollama-mcp-client-ts, clone the repository from GitHub, install the necessary dependencies using npm, and build the project. You can also run the project in watch mode for development purposes. Debugging can be done using VSCode by opening the project and pressing F5.

Key features

Key features include compatibility with Node.js (v18+), the ability to connect to Ollama models via MCP, easy installation and setup, and built-in debugging support for development.

Where to use

ollama-mcp-client-ts can be used in various fields that require integration of machine learning models, such as web applications, data analysis tools, and any software that can benefit from utilizing Ollama’s capabilities through the MCP.

Content

Ollama MCP Client

A TypeScript client for connecting Ollama to Model Context Protocol (MCP).

Prerequisites

  • Node.js
  • Ollama server

Running

Edit example config

{
  "sse": {
    "server-name": {
      "url": "http://localhost:3001/sse"
    }
  },
  "stdio": {
    "server-name": {
      "command": "command",
      "args": [
        "args"
      ]
    }
  }
}

Check config_container.ts for more detail.

In short, it’s basically the following type:

{
    stdio: Map<string, StdioServerParameters>
    sse: Map<string, SSEServerParameters>
}

Edit Ollama Host Address

edit host address in cli.ts

Run Example CLI

npm i
npm run cli

TODO

Support Streamable HTTP and deprecate SSE.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers