---
title: "Run, Test, and Evaluate Models and MCP Locally with Docker + Promptfoo"
description: "Promptfoo, Docker Model Runner and Docker MCP Toolkit can be combined to evaluate LLM apps entirely on a dev machine."
url: "https://swe.quest/articles/run-test-and-evaluate-models-and-mcp-locally-with-docker-promptfoo-ad1578ad40c09850"
canonical: "https://www.docker.com/blog/evaluate-models-and-mcp-with-promptfoo-docker/"
source: "Docker"
published: "2025-09-25"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["evals","ai-agents","llms","ai-safety","containers"]
---

# Run, Test, and Evaluate Models and MCP Locally with Docker + Promptfoo

A post on [Docker](https://swe.quest/sources/docker.md), published 2025-09-25, 7 min read, How-to. Original: [https://www.docker.com/blog/evaluate-models-and-mcp-with-promptfoo-docker/](https://www.docker.com/blog/evaluate-models-and-mcp-with-promptfoo-docker/)

## Summary

Promptfoo, Docker Model Runner and Docker MCP Toolkit can be combined to evaluate LLM apps entirely on a dev machine. Three worked configs are shown. The first compares local Gemma3 against Claude Opus 4.1 using llm-rubric and similarity assertions, graded by local smollm3 and mxbai embeddings instead of OpenAI. The second tests MCP tools directly (GitHub, Fetch, Playwright, YouTube transcript) through the MCP gateway. The third red-teams a GitHub-summarizer agent with MCP, PII, BOLA and BFLA plugins plus jailbreak and prompt-injection strategies, which exposed a tool-discovery vulnerability that was fixed with a prompt guideline.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [AI safety](https://swe.quest/tags/ai-safety.md) (AI & ML)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)

## Prerequisites

- Docker Desktop ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- LLM prompting basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- Model Context Protocol

## Keywords

Promptfoo, Docker Model Runner, Docker MCP Toolkit, MCP, Gemma3, Claude Opus 4.1, SmolLM3

## Related posts

- [Tool Calling with Local LLMs: A Practical Evaluation](https://swe.quest/articles/tool-calling-with-local-llms-a-practical-evaluation-935878d43dd4eb76.md): Docker · 2025-06-30 · Medium · 8 min read · Evaluation, LLMs, AI agents, Inference & serving
  Docker benchmarked 21 local and hosted LLMs on tool calling using model-test, a harness that runs shopping-cart scenarios with multiple acceptable tool-call sequences inside a 5-round agent loop and scores invocation, tool selection and parameter accuracy as an F1 score.
- [We got local models to triage the OpenClaw repo for FREE!\*](https://swe.quest/articles/we-got-local-models-to-triage-the-openclaw-repo-for-free-60bcac27d80eddae.md): Hugging Face · 2026-06-22 · Medium · 13 min read · AI agents, Inference & serving, Evaluation, LLMs, Open source
  Local open-weight models running in an agent harness on an NVIDIA GB10 (DGX Spark) can triage OpenClaw's GitHub issues and PRs in real time, routing only relevant topics to a maintainer via Discord.
- [Getting Started with the Labs AI Tools for Devs Docker Desktop Extension](https://swe.quest/articles/getting-started-with-the-labs-ai-tools-for-devs-docker-desktop-extension-82e61806b7468ca8.md): Docker · 2024-09-09 · Medium · 4 min read · AI agents, LLMs, Containers, Developer tools
  The Labs AI Tools for Devs Docker Desktop extension runs LLM prompts against local projects.
- [Breaking Free From AI Vendor Lock-in: Integrating GitHub Models with Docker cagent](https://swe.quest/articles/breaking-free-from-ai-vendor-lock-in-integrating-github-models-with-docker-8fc971be1201fa24.md): Docker · 2025-12-11 · Medium · 7 min read · AI agents, LLMs, Containers
  Docker cagent, an open-source multi-agent runtime driven by declarative YAML, can use GitHub Models as a custom OpenAI-compatible provider.
- [Run Gemma 3 with Docker Model Runner: Fully Local GenAI Developer Experience](https://swe.quest/articles/run-gemma-3-with-docker-model-runner-fully-local-genai-developer-experience-c005339b3915484f.md): Docker · 2025-04-09 · Medium · 7 min read · LLMs, Inference & serving, Containers, JavaScript
  Docker Model Runner (in Docker Desktop for macOS 4.40.0+) exposes an OpenAI-compatible API on localhost, so Gemma 3 can be pulled with \`docker model pull ai/gemma3\` and called through the standard OpenAI SDK by pointing baseURL at http://localhost:12434/engines/v1.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
