Skip to main content
Glama
vdesabou

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

ParametersJSON Schema
NameRequiredDescriptionDefault
commandYesCommand to get help for (e.g., 'connector restart', 'container logs')

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Get detailed help' implies a read-only operation, it doesn't specify whether this requires authentication, has rate limits, returns structured or unstructured data, or has any side effects. The description is too minimal for a mutation-free tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core purpose without unnecessary words. It's appropriately sized for a simple tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only tool with one well-documented parameter and no output schema, the description is minimally adequate but lacks important context. It doesn't explain what format the help returns (text, structured data), whether it covers all commands, or how it relates to sibling tools. The absence of annotations increases the need for more complete behavioral disclosure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents the single 'command' parameter. The description doesn't add any additional meaning about parameter usage beyond what's in the schema (e.g., examples of valid commands beyond those shown). Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('detailed help for playground commands'), making it immediately understandable. However, it doesn't explicitly differentiate this from its sibling tools (playground_command_suggest and playground_command_validate), which would be needed for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (suggest and validate) or any alternative approaches. It simply states what the tool does without context about appropriate usage scenarios or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

playground_command_suggestB

Get command suggestions and completions for the Kafka Docker Playground CLI

ParametersJSON Schema
NameRequiredDescriptionDefault
partial_commandYesPartial playground command to complete
contextNoAdditional context about what you're trying to do

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe how it behaves: no information about response format, error handling, rate limits, authentication needs, or whether it's read-only or mutative. For a tool with zero annotation coverage, this leaves significant gaps in understanding its operational characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a simple tool and front-loads the essential information. Every word earns its place in this concise formulation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but doesn't provide enough context about when to use it versus siblings, what the response looks like, or behavioral characteristics. Without annotations or output schema, the description should do more to compensate, but it only meets the minimum viable threshold.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description doesn't add any additional meaning about parameters beyond what's in the schema. It mentions 'partial playground command to complete' which aligns with the schema but provides no extra context about format, examples, or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get command suggestions and completions for the Kafka Docker Playground CLI'. It specifies the verb ('Get'), resource ('command suggestions and completions'), and target system ('Kafka Docker Playground CLI'). However, it doesn't explicitly differentiate from its siblings (playground_command_help, playground_command_validate), which would be needed for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (playground_command_help, playground_command_validate). It doesn't mention prerequisites, alternatives, or exclusions. The only implied usage is when you have a partial command to complete, but this is insufficient for effective tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

playground_command_validateC

Validate a complete playground command and suggest corrections

ParametersJSON Schema
NameRequiredDescriptionDefault
commandYesComplete playground command to validate

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool validates and suggests corrections, but doesn't describe what validation entails (e.g., syntax checks, semantic analysis), how suggestions are formatted, whether it's read-only or has side effects, or any error handling. This leaves significant gaps for a tool that likely involves complex processing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core purpose ('Validate a complete playground command') and adds value with the secondary action ('and suggest corrections'). Every part of the sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and likely complex validation logic, the description is insufficient. It doesn't explain what constitutes a 'complete' command, what types of corrections are suggested, or the format of the response. The agent lacks critical context to use this tool effectively beyond the basic parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'command' parameter documented as 'Complete playground command to validate.' The description doesn't add any additional meaning beyond this, such as examples of valid commands or formatting requirements. Given the high schema coverage, a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Validate a complete playground command and suggest corrections.' It specifies the verb ('validate') and resource ('playground command'), and indicates it provides suggestions. However, it doesn't explicitly differentiate from sibling tools like 'playground_command_help' or 'playground_command_suggest'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings ('playground_command_help' and 'playground_command_suggest'). It doesn't mention prerequisites, alternatives, or exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 3 tool updates
    • First observedplayground_command_help
    • First observedplayground_command_suggest
    • First observedplayground_command_validate

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

ActivityMaintained
ResponsivenessNo issues

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
    B
    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
    33 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