npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reaatech/media-pipeline-mcp-ollama

v0.3.0

Published

Ollama provider — local LLM text completion, embeddings, and image description via Ollama API

Readme

@reaatech/media-pipeline-mcp-ollama

npm version License: MIT CI

Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.

Local Ollama provider for the media pipeline framework. Supports text completion, embedding generation, and image description via any Ollama model at zero API cost. Ideal as an LLM-judge backend for variant evaluation in quality gates.

Installation

npm install @reaatech/media-pipeline-mcp-ollama
# or
pnpm add @reaatech/media-pipeline-mcp-ollama

Feature Overview

  • Zero API cost — all inference runs on your own hardware
  • Text completion — generate text with any Ollama model using /api/generate
  • Embedding generation — produce vector embeddings via /api/embeddings
  • Image description — describe images using multimodal models (e.g. LLaVA, llama3.2-vision)
  • Auto-pull — optionally pull missing models automatically before first use
  • Streaming support — operations declare streaming capability for progress tracking
  • Configurable timeout — adjustable request timeout per operation

Quick Start

import { OllamaProvider } from "@reaatech/media-pipeline-mcp-ollama";

const provider = new OllamaProvider({
  baseUrl: "http://localhost:11434",
  defaultModel: "llama3.2",
});

// Text completion
const textResult = await provider.execute({
  operation: "text.complete",
  params: {
    prompt: "Write a haiku about cherry blossoms",
    temperature: 0.7,
    max_tokens: 100,
  },
  config: {},
});

console.log(textResult.data.toString()); // The generated haiku
console.log(textResult.metadata.model); // "llama3.2"

// Embedding generation
const embedResult = await provider.execute({
  operation: "embedding.generate",
  params: {
    input: "What is the meaning of life?",
    model: "nomic-embed-text",
  },
  config: {},
});

const embedding = JSON.parse(embedResult.data.toString());
console.log(embedResult.metadata.dimensions); // e.g. 768

// Image description (requires multimodal model)
const descResult = await provider.execute({
  operation: "image.describe",
  params: {
    artifact_data: imageBuffer,
    model: "llama3.2-vision",
    prompt: "Describe this image in detail.",
  },
  config: {},
});

console.log(descResult.data.toString()); // Image description

With auto-pull enabled:

const provider = new OllamaProvider({
  baseUrl: "http://localhost:11434",
  autoPull: true,     // Pull models automatically if not present
  defaultModel: "llama3.2",
});

Supported Operations

| Operation | Ollama API Endpoint | Description | |-----------|-------------------|-------------| | text.complete | /api/generate | Text generation with prompt, system message, temperature, and max token control | | embedding.generate | /api/embeddings | Generate vector embeddings for text input | | image.describe | /api/generate | Describe images using multimodal vision models |

Configuration

interface OllamaConfig {
  baseUrl?: string;        // Default: "http://localhost:11434"
  defaultModel?: string;   // Default: "llama3.2"
  timeoutMs?: number;      // Default: 120000 (2 min)
  headers?: Record<string, string>;  // Custom HTTP headers
  autoPull?: boolean;      // Default: false — auto-pull missing models
}

API Reference

OllamaProvider

Main provider class extending MediaProvider.

| Member | Type | Description | |--------|------|-------------| | supportedOperations | string[] | ['text.complete', 'embedding.generate', 'image.describe'] | | supportsStreaming | Set<string> | {'text.complete', 'embedding.generate'} | | supportsWebhooks | boolean | false — Ollama has no outbound webhooks | | healthCheck() | Promise<ProviderHealth> | Checks /api/tags endpoint | | estimateCost() | Promise<CostEstimate> | Always returns { costUsd: 0 } | | execute(input) | Promise<ProviderOutput> | Routes to textComplete, embeddingGenerate, or imageDescribe |

createOllamaProvider(config?)

Factory function that returns a new OllamaProvider instance.

OllamaConfig

Configuration interface (see Configuration section above).

Text Completion Parameters

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | prompt | string | — | Input text prompt (required) | | model | string | Provider default | Model name to use | | system | string | — | System prompt | | temperature | number | — | Sampling temperature | | max_tokens | number | — | Maximum output tokens | | stream | boolean | false | Streaming mode (use supportsStreaming metadata) |

Embedding Parameters

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | input | string | — | Text to embed (required) | | model | string | Provider default | Embedding model name |

Image Description Parameters

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | artifact_data | Buffer | — | Image data buffer (required) | | model | string | "llama3.2-vision" | Multimodal model name | | prompt | string | "Describe this image in detail." | Custom description prompt | | detail | string | "detailed" | Detail level metadata |

Cost Estimation

| Operation | Estimated Cost | |-----------|---------------| | text.complete | $0.00 (local) | | embedding.generate | $0.00 (local) | | image.describe | $0.00 (local) |

Related Packages

License

MIT