freeplay-mcp
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@freeplay-mcp analyze production logs for errors in the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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-mcpSet 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:
Clone and build:
git clone https://github.com/freeplayai/freeplay-mcp.git cd freeplay-mcp docker build -t freeplay-mcp .Set your environment variables (in .env, then source it).
export FREEPLAY_API_KEY="your-api-key" export FREEPLAY_BASE_URL="https://app.freeplay.ai"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.
Start Claude Code and run
/mcpto check installation.
Authentication
API key passed via environment variable
FREEPLAY_API_KEYAll 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 checkUsing 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
Docs: https://docs.freeplay.ai
Security: security@freeplay.ai
Available Tools
9 toolscreate_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
searchA
Search observability data in a Freeplay project. This is a read-only operation.
Returns sessions, traces, or completions matching the given filters.
Sessions are top-level containers that group related traces and completions, representing a complete user interaction, conversation, or agent run.
Traces group related completions and tool calls within a session, representing a functional unit of work such as a single agent run or workflow step.
Completions are individual LLM calls with their inputs, outputs, and metadata.
Filter syntax
The filters parameter accepts a JSON string. A single filter has the form:
{"field": "", "op": "", "value": }
Operators
eq Equals
lt Less than
gt Greater than
lte Less than or equal
gte Greater than or equal
contains Contains substring
between Within numeric rangeAvailable fields
Numeric fields (support eq, lt, gt, lte, gte): cost e.g. 0.003 latency e.g. 8 (seconds) start_time e.g. "2024-06-01 00:00:00"
Equality fields (support eq): environment e.g. "staging" prompt_template e.g. "my-prompt" prompt_template_id e.g. "uuid..." completion_id e.g. "uuid..." session_id e.g. "uuid..." model e.g. "gpt-4o" provider e.g. "openai" review_status e.g. "review_complete" agent_name e.g. "support-agent" trace_agent_name e.g. "my-agent" api_key e.g. "production-key" assignee e.g. "user@example.com" insight_name e.g. "Response Quality Issues"
Text search fields (support contains): completion_output e.g. "weather"
Nested JSON fields (field.* syntax, support contains): completion_inputs.* e.g. field="completion_inputs.topic", value="weather" completion_feedback.* e.g. field="completion_feedback.rating", value="positive" session_custom_metadata.* e.g. field="session_custom_metadata.user_type", value="premium" trace_custom_metadata.* e.g. field="trace_custom_metadata.workflow", value="onboarding" trace_input.* e.g. field="trace_input.query", value="weather" trace_output.* e.g. field="trace_output.response", value="sunny" trace_feedback.* e.g. field="trace_feedback.rating", value="positive"
Evaluation result fields (nested JSON, field.* syntax): completion_evaluation_results.* supports eq. e.g. field="completion_evaluation_results.Response Quality", value="4" completion_client_evaluation_results.* supports eq. e.g. field="completion_client_evaluation_results.score", value="85" trace_evaluation_results.* supports eq, gt, lt, gte, lte, contains. e.g. field="trace_evaluation_results.Quality Score", value=5 trace_client_eval_results.* supports eq, contains. e.g. field="trace_client_eval_results.confidence_score", value=0.95
Evaluation notes fields: evaluation_notes.content supports contains. e.g. "needs review" evaluation_notes.author supports eq. e.g. "user@example.com" evaluation_notes.created_at supports gt, lt, gte, lte. e.g. "2024-06-01 00:00:00"
Compound filters
Combine filters with "and", "or", "not" (nestable to any depth): {"and": [, , ...]} All conditions must match {"or": [, , ...]} At least one must match {"not": } Negates a condition
Example - expensive GPT-4o or Claude completions outside production: {"and": [{"field": "cost", "op": "gte", "value": 0.001}, {"or": [{"field": "model", "op": "eq", "value": "gpt-4o"}, {"field": "model", "op": "eq", "value": "claude-3-opus"}]}, {"not": {"field": "environment", "op": "eq", "value": "prod"}}]}
Args: project_id: The Freeplay project ID result_type: What to search for: "sessions", "traces", or "completions" filters: Optional JSON string with filter expression. Examples: Simple: '{"field": "environment", "op": "eq", "value": "production"}' Compound: '{"and": [{"field": "cost", "op": "gte", "value": 0.01}, {"field": "model", "op": "eq", "value": "gpt-4o"}]}' limit: Maximum number of results to return (default: 20) offset: Number of results to skip for pagination (default: 0)
Inputs: project_id (required), result_type (required), limit, offset, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
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.
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.
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.
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
Related MCP Connectors
Query your AI agent traces, root-cause verdicts and issues, and run investigations, from your agent.
AI agent observability for production traces, natural-language insights, and improvement loops.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Autonomous and governed SRE & MLOps control plane for AI agent platforms.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceConnect AI agents to your test results, insights, and targets. Query test runs, failures, flaky tests, and regressions across frameworks including Playwright, Jest, Pytest, Cypress and more.33 npmMIT- AlicenseAqualityDmaintenanceLets AI agents query, manage, and operate their LLM observability data directly from the conversation. Provides 87 tools for cost analysis, alerting, anomaly detection, and runtime control gates.87260 npmMIT
- FlicenseNot gradedqualityFmaintenanceEnables AI agents to browse, create, and manage apps on the FreeAppStore platform, including provisioning repositories, writing code, and deploying live.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access observability and evaluation data, including run history, span traces, LLM-as-judge evaluation results, and regression reports.MIT