Skip to main content
Glama
MCP Playground Server

MCP Playground Server

by vdesabou

kafka-docker-playground MCP server

An MCP server that exposes the live state of a local kafka-docker-playground to an AI coding agent: what is running, which connectors are broken and why, what the container logs actually say, and which of the ~2500 example scripts matches what you are trying to reproduce.

It deliberately does not re-serve the playground CLI's command syntax. An agent working in the repo already has scripts/cli/playground.json, scripts/cli/src/bashly.yml and playground --help; a second, lossy copy of that is worse than none. Everything here needs a running Docker daemon, a Connect REST endpoint or a filesystem scan — things a static reference cannot provide.

Tools

Tool

What it answers

playground_status

Is Docker up? Which example was last run, in which environment, with which connector type? Which containers are up, healthy, or dead, on which ports? What were the last playground run commands?

playground_connectors

What is every connector's state, and for FAILED tasks, what is the root cause (deepest Caused by:) rather than a 200-frame trace? Works against the running Connect worker or the Confluent Cloud Connect API, picked automatically.

playground_logs

What went wrong in a container, without pulling 10 000 lines into context? De-duplicates repeated errors with occurrence counts and collapses stack traces to the exception chain. Also does raw tail and regex search.

playground_find_example

Which example script demonstrates this? Searches connector class, script path, README title and script body across connect/, ccloud/, ksqldb/, flink/, reproduction-models/ and the rest. Returns the exact playground run -f … command.

playground_example_details

Everything about one example in one call: script source, the connector payloads it posts, default environment, compose override files, sibling variants, credential handlers, and the environment variables you must export.

Why these are worth a tool call

On a real 918 KB / 10 645-line connect.log, playground_logs returns 4.5 KB containing the full Caused by: chain — a ~200× reduction with the diagnostic content intact. playground_find_example indexes 2558 scripts in under a second and answers "s3 sink proxy" with connect/connect-aws-s3-sink/s3-sink-proxy.sh. 95% of those scripts are indexed with their connector class; the rest are the client, ksqlDB, Flink and environment examples, which have no connector.

Related MCP server: Kafka MCP Server

Secrets

playground.ini stores Confluent Cloud API keys in cleartext, connector configs carry passwords, and logs leak JAAS strings. Every response passes through a redaction layer that masks secret-looking config keys, JAAS/JDBC inline passwords, key:secret pairs, credentials in URLs and Authorization headers. Shell variable references ($AWS_SECRET_ACCESS_KEY) and ordinary settings (key.converter) are left readable.

All tools are read-only. Nothing here starts, stops, or reconfigures anything.

Installation

Claude Code, from the playground repository

Nothing to install. kafka-docker-playground ships a .mcp.json at its root that declares this server, so running claude from the checkout offers it — accept it once. playground ai accepts it for you.

Any MCP client

{
  "mcpServers": {
    "mcp-playground": {
      "command": "npx",
      "args": ["-y", "github:vdesabou/kafka-docker-playground-mcp-server"]
    }
  }
}

No path is needed when the client starts the server inside the playground checkout: the repo root is found by walking up from the working directory. When it does not — Claude desktop, for instance — add "env": { "PLAYGROUND_REPO_ROOT": "/path/to/kafka-docker-playground" }.

A local clone, for working on the server itself

A local scope server shadows the one from .mcp.json, so point it at your build and the playground repository keeps working unchanged:

npm install && npm run build
claude mcp add mcp-playground -- node /path/to/kafka-docker-playground-mcp-server/dist/index.js

Configuration

Variable

Purpose

PLAYGROUND_REPO_ROOT

Absolute path to the playground checkout. Optional — the server also walks up from its working directory and checks ~/kafka-docker-playground. Set it explicitly if the server starts anywhere else.

KAFKA_DOCKER_PLAYGROUND_DIR

Accepted as an alias for the above.

CONFLUENT_CLOUD_API_KEY / CONFLUENT_CLOUD_API_SECRET

Required only by playground_connectors when the current run uses a fully managed or custom connector.

The server needs the docker CLI on its PATH and a reachable daemon — it inspects the playground's containers, so it runs on the host rather than in a container of its own.

Development

npm run dev              # run from source with tsx
npm run watch            # reload on change
npm run fastmcp:inspect  # web inspector
src/
├── index.ts      # tool definitions
├── config.ts     # repo root resolution
├── state.ts      # playground.ini + run history
├── docker.ts     # docker CLI wrapper
├── connect.ts    # Connect REST (on-prem + Confluent Cloud) endpoint resolution
├── logs.ts       # error extraction, de-duplication, stack-trace collapsing
├── examples.ts   # example index, search and detail extraction
├── http.ts       # request helper with client-certificate support
├── redact.ts     # secret redaction
└── exec.ts       # shell-free subprocess helper

For modifying the playground CLI (bashly conventions, regeneration, where helpers go), use the playground-cli skill in kafka-docker-playground/.claude/skills/playground-cli/ instead. The two do not overlap: the skill covers authoring the CLI, this server covers observing a running environment.

Built with FastMCP.

Available Tools

3 tools
playground_command_helpB

Get detailed help for playground commands

Inputs: command (required).

playground_command_suggestB

Get command suggestions and completions for the Kafka Docker Playground CLI

Inputs: partial_command (required), context.

playground_command_validateC

Validate a complete playground command and suggest corrections

Inputs: command (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: help provides detailed information, suggest offers completions, and validate checks correctness with corrections. There is no overlap in functionality, making it easy for an agent to select the right tool.

    Naming Consistency5/5

    All tool names follow a consistent 'playground_command_' prefix with a descriptive suffix (help, suggest, validate), using snake_case uniformly. This pattern is predictable and enhances readability.

    Tool Count5/5

    With 3 tools, the server is well-scoped for its purpose of assisting with playground commands. Each tool serves a specific role (help, suggestion, validation), and there are no unnecessary or missing tools for this focused domain.

    Completeness5/5

    The tool set provides complete coverage for the domain of playground command assistance: help for understanding, suggestions for building commands, and validation for correctness. There are no obvious gaps, and agents can handle typical workflows without dead ends.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language management of Docker containers, images, networks, and volumes with support for both local and remote Docker engines. Features automated container composition, debugging capabilities, and persistent data management through an intuitive conversational interface.
      GPL 3.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to interact with Apache Kafka through natural language, supporting operations like producing/consuming messages, managing topics, and querying brokers, partitions, and consumer group offsets.
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Integrates GitHub Copilot with MCP-compatible tools to provide AI-powered code assistance, including chat, code explanation, and reviews. It leverages existing GitHub CLI authentication to support multiple models like GPT-4o and Claude 3.5 Sonnet.
      4
      32 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with Kafka clusters via MCP, supporting topic management (list, create, delete, inspect), connection initialization, and more through natural language.
      1
      Apache 2.0