Skip to main content
Glama

Freeplay MCP Server

An MCP (Model Context Protocol) server that enables AI agents to interact with Freeplay, the ops platform for AI engineering teams.

Use it to analyze production logs, identify quality issues, iterate on prompts and agents using real data, and run experiments to validate changes before deploying.

⚠️ EXPERIMENTAL

This MCP server is an experimental release and will change. Use at your own risk and keep an eye on what your agents are doing.

Current limitations:

  • Does not support deployment operations or destructive deletion actions — use the Freeplay UI

  • Uses your regular Freeplay API key (not specially scoped to limit access for agents)

Security warning: Because this uses your full API key, an agent could extract the key and formulate its own API calls outside the scope of the tools included with this MCP server, including destructive actions against your Freeplay account.

Additionally, all MCP servers share a security context within the host, enabling data exfiltration, prompt injection across tools, and cross-server data access.

Only use this with agents and MCP servers you fully trust.


Related MCP server: @argosvix/mcp-server

Installation

Claude Code

If using Claude Code, it is recommended to use the freeplay-plugin, which includes skills and this MCP server: https://github.com/freeplayai/freeplay-plugin.

The simplest way to install only the Freeplay MCP server is via uvx:

claude mcp add freeplay -- uvx freeplay-mcp

Set your API key in your MCP client process:

export FREEPLAY_API_KEY="your-api-key"
export FREEPLAY_BASE_URL="https://app.freeplay.ai"

Start Claude Code and run /mcp to check installation.

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
   "mcpServers": {
      "freeplay": {
         "command": "uvx",
         "args": [
            "freeplay-mcp"
         ],
         "env": {
            "FREEPLAY_API_KEY": "your-api-key",
            "FREEPLAY_BASE_URL": "https://app.freeplay.ai"
         }
      }
   }
}

Docker

For containerized deployments:

  1. Clone and build:

    git clone https://github.com/freeplayai/freeplay-mcp.git
    cd freeplay-mcp
    docker build -t freeplay-mcp .
  2. Set your environment variables (in .env, then source it).

    export FREEPLAY_API_KEY="your-api-key"
    export FREEPLAY_BASE_URL="https://app.freeplay.ai"
  3. Add to Claude Code:

    claude mcp add --transport stdio freeplay-mcp -- docker run -i --rm -e FREEPLAY_API_KEY=$FREEPLAY_API_KEY -e FREEPLAY_BASE_URL=$FREEPLAY_BASE_URL freeplay-mcp

For production deployments, consider using a hardened base image such as Chainguard or Distroless.

  1. Start Claude Code and run /mcp to check installation.

Authentication

  • API key passed via environment variable FREEPLAY_API_KEY

  • All requests use Bearer token authentication

  • Base URL configurable via FREEPLAY_BASE_URL (default: https://app.freeplay.ai)

Development

# Clone and install
git clone https://github.com/freeplayai/freeplay-mcp.git
cd freeplay-mcp
uv sync --group dev

# Lint (with auto-fix)
make lint

# Type check
make type-check

# Run both
make check

Using Docker

{
  "mcpServers": {
    "freeplay": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "FREEPLAY_API_KEY",
        "-e",
        "FREEPLAY_BASE_URL",
        "freeplay-mcp"
      ],
      "env": {
        "FREEPLAY_API_KEY": "your-api-key",
        "FREEPLAY_BASE_URL": "https://app.freeplay.ai"
      }
    }
  }
}

Support

Available Tools

9 tools
create_prompt_versionA

Create a new version of a prompt template. This is a write operation. Always confirm with the user before calling — describe which prompt template will be modified, the model and provider, and whether a new template will be created.

If the template doesn't exist and create_if_not_exists is True, the template will be created automatically.

Note: Deployment is not supported via MCP at this time to reduce risk of unintentional changes. Use the Freeplay UI to deploy versions to environments.

Args: project_id: The Freeplay project ID (required) template_name: Name of the prompt template (required) prompt_messages: JSON string of template messages array, e.g. '[{"role": "system", "content": "You are helpful."}]' (required) model: The model name, e.g. "gpt-4", "claude-3-opus" (required) provider: The provider name, e.g. "openai", "anthropic" (required) version_name: Optional name for this version version_description: Optional description for this version llm_parameters: Optional LLM parameters object, e.g. {"temperature": 0.7, "max_tokens": 1000} tool_schema: Optional tool definitions array for function calling output_schema: Optional output schema for structured outputs create_if_not_exists: If true, creates the template if it doesn't exist (default: true)

Inputs: model (required), provider (required), project_id (required), template_name (required), +7 more. Returns: result

find_logging_issuesA

Analyze recent completions for a prompt template and identify missing logged fields. This is a read-only analysis operation.

Fetches recent completions and checks which important fields are not being logged. Returns a list of missing fields with explanations and fix suggestions. Use this to identify gaps in your observability instrumentation.

Args: project_id: The Freeplay project ID template_name: Optional prompt template name to filter by. If not provided, analyzes all completions and checks for missing prompt template associations. environment: Optional environment filter (e.g., "prod", "dev", "local") limit: Number of recent completions to analyze (default: 50)

Inputs: project_id (required), limit, environment, template_name. Returns: result

get_deployed_prompt_versionsA

Get deployment status for a prompt template showing which versions are deployed to each environment. This is a read-only operation.

Returns which prompt template versions are currently deployed to all environments (dev, staging, production, and any custom environments).

Args: project_id: The Freeplay project ID (required) template_name: The name of the prompt template (required)

Inputs: project_id (required), template_name (required). Returns: result

get_prompt_versionA

Get the full contents of a prompt template version. This is a read-only operation.

Returns the complete prompt template configuration including messages, model, provider, and LLM parameters. Use this to inspect a version before making changes.

Args: project_id: The Freeplay project ID template_id: The prompt template ID version_id: The version ID to retrieve

Inputs: project_id (required), version_id (required), template_id (required). Returns: result

list_insightsA

List insights for a Freeplay project. This is a read-only operation.

Retrieve a paginated list of insights. Insights are automatically generated observations about patterns in your production data, surfacing actionable themes from auto-evaluation scores on logs and from human annotations. Filter by prompt template or agent to see specific insights for each component.

Args: project_id: The Freeplay project ID (required) page: Page number for pagination (default: 1) page_size: Number of insights per page (default: 30) prompt_template_id: Filter insights by prompt template UUID (optional) agent_id: Filter insights by agent UUID (optional)

Inputs: project_id (required), page, agent_id, page_size, +1 more. Returns: result

list_projectsA

List all Freeplay projects accessible to the authenticated user. This is a read-only operation.

Returns a formatted list of projects with their IDs and names. Start here for most workflows. Use a project ID from this list to scope most other Freeplay operations.

Inputs: no named parameters. Returns: result

list_prompt_templatesA

List all prompt templates in a Freeplay project. This is a read-only operation.

Returns a list of prompt templates with their IDs, names, and latest version info. Use the template name or ID when creating new versions.

Args: project_id: The Freeplay project ID (required) limit: Maximum number of results to return (default: 50) offset: Number of results to skip for pagination (default: 0)

Inputs: project_id (required), limit, offset. Returns: result

optimize_promptA

Optimize a prompt template version using AI-powered analysis and automated experimentation. This is a write operation that creates a new prompt template version. Always confirm with the user before calling this tool — describe which prompt template will be optimized, the dataset being used, and that this may incur LLM costs.

Analyzes the prompt template version against scored examples from production logs and generates an improved version with guidance from the user on where to focus. The optimization considers human evaluation labels, customer feedback, and best practices based on the flags provided.

This is a long-running operation that may take several minutes. When run_test_after_optimization is True (the default), the job will also run baseline and optimized test runs and create a comparison, which incurs additional LLM costs.

Args: project_id: The Freeplay project ID prompt_template_version_id: The prompt template version ID to optimize dataset_id: The dataset ID containing examples to analyze user_instructions: Optional specific instructions for the optimization (e.g., "focus on reducing hallucinations") use_best_practices: Whether to apply general prompt engineering best practices (default: True) use_labels: Whether to use human evaluation labels from the dataset in analysis (default: True) use_customer_feedback: Whether to incorporate customer feedback data (default: True) run_test_after_optimization: Whether to run a comparison test after optimization (default: True)

Inputs: dataset_id (required), project_id (required), prompt_template_version_id (required), use_labels, +4 more. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: creating prompt versions, analyzing logging issues, retrieving deployment info, fetching specific versions, listing insights, projects, and templates, optimizing prompts, and searching observability data. No overlap in functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., create_prompt_version, list_projects, search). Verbs like 'get', 'list', 'find', 'create', and 'search' are used consistently, and the naming is predictable and readable.

    Tool Count5/5

    Nine tools is an appropriate scope for a prompt management and observability server. It covers the core workflows without being too sparse or overwhelmingly large.

    Completeness4/5

    The tool set covers essential CRUD-like operations (create, read) and search/analysis, but lacks delete operations for versions or templates. The missing delete is a minor gap, as most workflows are supported.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers