Ambient Code Platform MCP Server
The Ambient Code Platform (ACP) MCP Server lets you manage AI coding sessions (AgenticSessions) on an ACP cluster directly from your MCP client.
Session Management
List and filter sessions by status (running/stopped/creating/failed), age, with sorting and limits
Get detailed information about a specific session
Create sessions with a custom prompt, optional repos, model selection, and display name
Create sessions from predefined templates:
triage,bugfix,feature, orexplorationDelete, restart, clone, or update (rename/timeout) sessions
All mutating operations support
dry_runmode for safe previewing
Observability
Retrieve container logs for a session (configurable tail lines)
Get conversation transcripts in JSON or Markdown format
View usage metrics: tokens, duration, and tool calls
Labels
Add or remove key-value labels on sessions for organization
Filter/list sessions by label selectors
Bulk add or remove labels across up to 3 sessions at once
Bulk Operations
Delete, stop, or restart up to 3 sessions at once by name or label selector
All bulk destructive operations require
confirm=trueand supportdry_run
Cluster Management
List configured cluster aliases, check authentication/configuration status, switch between cluster contexts, and authenticate with Bearer tokens
Enables delegation of AI tasks to Kubernetes-hosted Claude agents running on OpenShift, with tools for managing agentic sessions, checking authentication status, listing projects/namespaces, and controlling session lifecycle.
Click 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., "@Ambient Code Platform MCP Server create a session to analyze my codebase for security vulnerabilities"
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.
MCP ACP Server
A Model Context Protocol (MCP) server for managing Ambient Code Platform (ACP) sessions via the public-api gateway.
Table of Contents
Related MCP server: Streamable Pod Shell MCP Server
Quick Start
# Install
git clone https://github.com/ambient-code/mcp
cd mcp
pip install . # installs the 'mcp-acp' command
# Configure
mkdir -p ~/.config/acp
cat > ~/.config/acp/clusters.yaml <<EOF
clusters:
my-cluster:
server: https://public-api-ambient.apps.your-cluster.example.com
token: your-bearer-token-here
default_project: my-workspace
default_cluster: my-cluster
EOF
chmod 600 ~/.config/acp/clusters.yamlThen add to your MCP client (Claude Desktop, Claude Code, or uvx) and try:
List my ACP sessionsFeatures
Session Management
Tool | Description |
| List/filter sessions by status, age, with sorting and limits |
| Get detailed session information by ID |
| Create sessions with custom prompts, repos, model selection, and timeout |
| Create sessions from predefined templates (triage/bugfix/feature/exploration) |
| Delete sessions with dry-run preview |
| Restart a stopped session |
| Clone an existing session's configuration into a new session |
| Update session metadata (display name, timeout) |
Observability
Tool | Description |
| Retrieve container logs for a session |
| Retrieve conversation history (JSON or Markdown) |
| Get usage statistics (tokens, duration, tool calls) |
Labels
Tool | Description |
| Add labels to a session for organizing and filtering |
| Remove labels from a session by key |
| List sessions matching label selectors |
| Add labels to multiple sessions (max 3) |
| Remove labels from multiple sessions (max 3) |
Bulk Operations
Tool | Description |
| Delete multiple sessions (max 3) with confirmation and dry-run |
| Stop multiple running sessions (max 3) |
| Restart multiple stopped sessions (max 3) |
| Delete sessions matching label selectors (max 3 matches) |
| Stop sessions matching label selectors (max 3 matches) |
| Restart sessions matching label selectors (max 3 matches) |
Cluster Management
Tool | Description |
| List configured cluster aliases |
| Check current configuration and authentication status |
| Switch between configured clusters |
| Authenticate to a cluster with a Bearer token |
Safety Features:
Dry-Run Mode — All mutating operations support
dry_runfor safe preview before executingBulk Operation Limits — Maximum 3 items per bulk operation with confirmation requirement
Label Validation — Labels must be 1-63 alphanumeric characters, dashes, dots, or underscores
Installation
From Source (end users)
git clone https://github.com/ambient-code/mcp
cd mcp
pip install . # installs the 'mcp-acp' commandFrom Wheel
Requires make to be installed.
# "make install" sets up the dev environment (.venv + dependencies),
# which "make build" then uses to produce the wheel in dist/
make install
make build
pip install dist/mcp_acp-*.whlDevelopment Install (contributors)
git clone https://github.com/ambient-code/mcp
cd mcp
uv venv
uv pip install -e ".[dev]"Virtual Environment Install
On some Linux distributions (Debian, Ubuntu, Fedora 38+), PEP 668
prevents pip install into the system Python. If you get an "externally-managed-environment" error,
install into a virtual environment instead:
git clone https://github.com/ambient-code/mcp
cd mcp
python3 -m venv .venv
source .venv/bin/activate
pip install .Note that the mcp-acp command will only be available inside the venv. To use it
from an MCP client like Claude Code, reference the full path:
claude mcp add mcp-acp -t stdio /full/path/to/mcp/.venv/bin/mcp-acpRequirements:
Python 3.12+
Bearer token for the ACP public-api gateway
Access to an ACP cluster
Configuration
Cluster Config
Create ~/.config/acp/clusters.yaml:
clusters:
vteam-stage:
server: https://public-api-ambient.apps.vteam-stage.example.com
token: your-bearer-token-here
description: "V-Team Staging Environment"
default_project: my-workspace
vteam-prod:
server: https://public-api-ambient.apps.vteam-prod.example.com
token: your-bearer-token-here
description: "V-Team Production"
default_project: my-workspace
default_cluster: vteam-stageThen secure the file:
chmod 600 ~/.config/acp/clusters.yamlAuthentication
Add your Bearer token to each cluster entry under the token field, or set the ACP_TOKEN environment variable:
export ACP_TOKEN=your-bearer-token-hereGet your token from the ACP platform administrator or the gateway's authentication endpoint.
Claude Desktop
Edit your configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"acp": {
"command": "mcp-acp",
"args": [],
"env": {
"ACP_CLUSTER_CONFIG": "${HOME}/.config/acp/clusters.yaml"
}
}
}
}After editing, completely quit and restart Claude Desktop (not just close the window).
Claude Code (CLI)
claude mcp add mcp-acp -t stdio mcp-acpUsing uvx
uvx provides zero-install execution — no global Python pollution, auto-caching, and fast startup.
# Install uv (if needed)
curl -LsSf https://astral.sh/uv/install.sh | shClaude Desktop config for uvx:
{
"mcpServers": {
"acp": {
"command": "uvx",
"args": ["mcp-acp"]
}
}
}For a local wheel (before PyPI publish):
{
"mcpServers": {
"acp": {
"command": "uvx",
"args": ["--from", "/full/path/to/dist/mcp_acp-0.3.0-py3-none-any.whl", "mcp-acp"]
}
}
}Usage
Examples
# List sessions
List my ACP sessions
Show running sessions in my-workspace
List sessions older than 7 days in my-workspace
List sessions sorted by creation date, limit 20
# Session details
Get details for ACP session session-name
Show AgenticSession session-name in my-workspace
# Create a session
Create a new ACP session with prompt "Run all unit tests and report results"
# Create from template
Create an ACP session from the bugfix template called "fix-auth-issue"
# Restart / clone
Restart ACP session my-stopped-session
Clone ACP session my-session as "my-session-v2"
# Update session metadata
Update ACP session my-session display name to "Production Test Runner"
# Observability
Show logs for ACP session my-session
Get transcript for ACP session my-session in markdown format
Show metrics for ACP session my-session
# Labels
Label ACP session my-session with env=staging and team=platform
Remove label env from ACP session my-session
List ACP sessions with label team=platform
# Delete with dry-run (safe!)
Delete test-session from my-workspace in dry-run mode
# Actually delete
Delete test-session from my-workspace
# Bulk operations (dry-run first)
Delete these sessions: session-1, session-2, session-3 from my-workspace (dry-run first)
Stop all sessions with label env=test
Restart sessions with label team=platform
# Cluster operations
Check my ACP authentication
List my ACP clusters
Switch to ACP cluster vteam-prod
Login to ACP cluster vteam-stage with tokenTrigger Keywords
Include one of these keywords so your MCP client routes the request to ACP: ACP, ambient, AgenticSession, or use tool names directly (e.g., acp_list_sessions, acp_whoami). Without a keyword, generic phrases like "list sessions" may not trigger the server.
Quick Reference
Task | Command Pattern |
Check auth |
|
List all |
|
Filter status |
|
Filter age |
|
Get details |
|
Create |
|
Create from template |
|
Restart |
|
Clone |
|
Update |
|
View logs |
|
View transcript |
|
View metrics |
|
Add labels |
|
Remove labels |
|
Filter by label |
|
Delete (dry) |
|
Delete (real) |
|
Bulk delete |
|
Bulk by label |
|
List clusters |
|
Login |
|
Tool Reference
For complete API specifications including input schemas, output formats, and behavior details, see API_REFERENCE.md.
Category | Tool | Description |
Session |
| List/filter sessions |
| Get session details | |
| Create session with prompt | |
| Create from template | |
| Delete with dry-run support | |
| Restart stopped session | |
| Clone session configuration | |
| Update display name or timeout | |
Observability |
| Retrieve container logs |
| Get conversation history | |
| Get usage statistics | |
Labels |
| Add labels to session |
| Remove labels by key | |
| Filter sessions by labels | |
| Bulk add labels (max 3) | |
| Bulk remove labels (max 3) | |
Bulk |
| Delete multiple sessions (max 3) |
| Stop multiple sessions (max 3) | |
| Restart multiple sessions (max 3) | |
| Delete by label (max 3) | |
| Stop by label (max 3) | |
| Restart by label (max 3) | |
Cluster |
| List configured clusters |
| Check authentication status | |
| Switch cluster context | |
| Authenticate with Bearer token |
Troubleshooting
"No authentication token available"
Your token is not configured. Either:
Add
token: your-token-hereto your cluster in~/.config/acp/clusters.yamlSet the
ACP_TOKENenvironment variable
"HTTP 401: Unauthorized"
Your token is expired or invalid. Get a new token from the ACP platform administrator.
"HTTP 403: Forbidden"
You don't have permission for this operation. Contact your ACP platform administrator.
"Direct Kubernetes API URLs (port 6443) are not supported"
You're using a direct K8s API URL. Use the public-api gateway URL instead:
Wrong:
https://api.cluster.example.com:6443Correct:
https://public-api-ambient.apps.cluster.example.com
"mcp-acp: command not found"
Add Python user bin to PATH:
macOS:
export PATH="$HOME/Library/Python/3.*/bin:$PATH"Linux:
export PATH="$HOME/.local/bin:$PATH"
Then restart your shell.
MCP Tools Not Showing in Claude
Check Claude Desktop logs: Help → View Logs
Verify config file syntax is valid JSON
Make sure
mcp-acpis in PATHRestart Claude Desktop completely (quit, not just close)
"Permission denied" on clusters.yaml
chmod 600 ~/.config/acp/clusters.yaml
chmod 700 ~/.config/acpArchitecture
MCP SDK — Standard MCP protocol implementation (stdio transport)
httpx — Async HTTP REST client for the public-api gateway
Pydantic — Settings management and input validation
Three-layer design — Server (tool dispatch) → Client (HTTP + validation) → Formatters (output)
See CLAUDE.md for complete system design.
Security
Input Validation — DNS-1123 format validation for all resource names
Gateway URL Enforcement — Direct K8s API URLs (port 6443) rejected
Bearer Token Security — Tokens filtered from logs, sourced from config or environment
Resource Limits — Bulk operations limited to 3 items with confirmation
See SECURITY.md for complete security documentation including threat model and best practices.
Development
# One-time setup
uv venv && uv pip install -e ".[dev]"
# Pre-commit workflow
uv run ruff format . && uv run ruff check . && uv run pytest tests/
# Run with coverage
uv run pytest tests/ --cov=src/mcp_acp --cov-report=html
# Build wheel
uvx --from build pyproject-build --installer uvSee CLAUDE.md for contributing guidelines.
Roadmap
Current implementation provides 26 tools. 3 tools remain planned:
Contributing
Fork the repository
Create a feature branch
Add tests for new functionality
Ensure all tests pass (
uv run pytest tests/)Ensure code quality checks pass (
uv run ruff format . && uv run ruff check .)Submit a pull request
Status
Code: Production-Ready | Tests: All Passing | Security: Input validation, gateway enforcement, token security | Tools: 26 implemented (3 more planned)
Documentation
API_REFERENCE.md — Full API specifications for all 26 tools
SECURITY.md — Security features, threat model, and best practices
CLAUDE.md — System architecture and development guide
License
MIT License — See LICENSE file for details.
Support
For issues and feature requests, use the GitHub issue tracker.
Available Tools
41 toolsacp_add_repoB
Add a repository to a running session.
Inputs: session (required), repo_url (required), project.
acp_bulk_delete_sessionsA
Delete multiple sessions (max 3). DESTRUCTIVE: requires confirm=true. Use dry_run=true first!
Inputs: sessions (required), project, confirm, dry_run.
acp_bulk_delete_sessions_by_labelA
Delete sessions matching label selectors (max 3 matches). DESTRUCTIVE: requires confirm=true.
Inputs: labels (required), project, confirm, dry_run.
acp_bulk_label_resourcesA
Add labels to multiple sessions (max 3). DESTRUCTIVE: requires confirm=true.
Inputs: sessions (required), labels (required), project, confirm, +1 more.
acp_bulk_restart_sessionsA
Restart multiple stopped sessions (max 3). Requires confirm=true.
Inputs: sessions (required), project, confirm, dry_run.
acp_bulk_restart_sessions_by_labelA
Restart sessions matching label selectors (max 3 matches). Requires confirm=true.
Inputs: labels (required), project, confirm, dry_run.
acp_bulk_stop_sessionsA
Stop multiple running sessions (max 3). DESTRUCTIVE: requires confirm=true.
Inputs: sessions (required), project, confirm, dry_run.
acp_bulk_stop_sessions_by_labelA
Stop sessions matching label selectors (max 3 matches). DESTRUCTIVE: requires confirm=true.
Inputs: labels (required), project, confirm, dry_run.
acp_bulk_unlabel_resourcesA
Remove labels from multiple sessions (max 3). DESTRUCTIVE: requires confirm=true.
Inputs: sessions (required), label_keys (required), project, confirm, +1 more.
acp_clone_sessionA
Clone an existing session's configuration into a new session.
Inputs: source_session (required), new_display_name (required), project, dry_run.
acp_create_scheduled_sessionA
Create a scheduled session backed by a Kubernetes CronJob. Requires a cron schedule and a session template.
Inputs: schedule (required), session_template (required), project, display_name, +2 more.
acp_create_sessionB
Create an ACP AgenticSession with a custom prompt. Supports dry-run mode.
Inputs: initial_prompt (required), project, display_name, repos, +2 more.
acp_create_session_from_templateB
Create a session from a predefined template (triage/bugfix/feature/exploration). Each template has optimized settings.
Inputs: template (required), display_name (required), project, repos, +1 more.
acp_delete_scheduled_sessionA
Delete a scheduled session and its CronJob. Supports dry-run mode.
Inputs: name (required), project, dry_run.
acp_delete_sessionB
Delete an AgenticSession. Supports dry-run mode.
Inputs: session (required), project, dry_run.
acp_export_sessionB
Export session chat history as markdown.
Inputs: session (required), project.
acp_get_repos_statusA
Check repository clone status for a session.
Inputs: session (required), project.
acp_get_scheduled_sessionB
Get details of a specific scheduled session by name.
Inputs: name (required), project.
acp_get_sessionB
Get details of a specific session by ID.
Inputs: session (required), project.
acp_get_session_logsB
Retrieve container logs for a session. Useful for debugging.
Inputs: session (required), project, container, tail_lines.
acp_get_session_metricsA
Get usage statistics for a session (tokens, duration, tool calls).
Inputs: session (required), project.
acp_get_session_transcriptA
Retrieve conversation history for a session in JSON or Markdown format.
Inputs: session (required), project, format.
acp_get_workflow_metadataB
Get workflow metadata (steps, configuration) for a session.
Inputs: session (required), project.
acp_label_resourceC
Add labels to a session. Labels are key-value pairs for organizing and filtering.
Inputs: name (required), labels (required), project, resource_type.
acp_list_clustersA
List configured cluster aliases from clusters.yaml.
Inputs: no named parameters.
acp_list_scheduled_session_runsB
List past runs (AgenticSessions) created by a scheduled session.
Inputs: name (required), project.
acp_list_scheduled_sessionsA
List all scheduled sessions (cron-based recurring sessions) in a project.
Inputs: project.
acp_list_sessionsB
List and filter AgenticSessions in a project. Filter by status (running/stopped/failed), age. Sort and limit results.
Inputs: project, status, older_than, sort_by, +1 more.
acp_list_sessions_by_labelC
List sessions matching label selectors.
Inputs: labels (required), project.
acp_loginA
Authenticate to a cluster with a Bearer token. Sets the token in memory and verifies it works.
Inputs: cluster (required), token.
acp_remove_repoB
Remove a repository from a session.
Inputs: session (required), repo_name (required), project.
acp_restart_sessionA
Restart a stopped session. Supports dry-run mode.
Inputs: session (required), project, dry_run.
acp_resume_scheduled_sessionA
Resume a suspended scheduled session. The CronJob will start creating sessions again.
Inputs: name (required), project.
acp_set_workflowB
Set the active workflow on a running session.
Inputs: session (required), workflow (required), project.
acp_suspend_scheduled_sessionA
Suspend (pause) a scheduled session. The CronJob will stop creating new sessions.
Inputs: name (required), project.
acp_switch_clusterB
Switch to a different cluster context.
Inputs: cluster (required).
acp_trigger_scheduled_sessionB
Manually trigger a scheduled session to run immediately, regardless of its cron schedule.
Inputs: name (required), project.
acp_unlabel_resourceB
Remove labels from a session by key.
Inputs: name (required), label_keys (required), project, resource_type.
acp_update_scheduled_sessionC
Update a scheduled session (schedule, template, display name, or suspend state).
Inputs: name (required), project, schedule, display_name, +3 more.
acp_update_sessionC
Update session metadata (display name, timeout). Supports dry-run mode.
Inputs: session (required), project, display_name, timeout, +1 more.
acp_whoamiA
Get current configuration and authentication status.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 41 tools
Most tools have clearly distinct purposes due to consistent verb_noun naming. However, the large number of bulk operations (e.g., acp_bulk_* sessions) and similar tools like acp_clone_session vs acp_create_session_from_template could cause confusion if descriptions are not carefully read.
All tools follow the acp_verb_noun pattern in snake_case, which is highly consistent and predictable. The naming convention makes it easy to infer the action and target resource.
With 41 tools, the set is significantly larger than the recommended well-scoped range (3-15). Even for a comprehensive platform, this many tools risk overwhelming agents and users, and many operations could potentially be consolidated.
The tool set covers the full lifecycle of sessions (CRUD, clone, logs, metrics, transcript), scheduled sessions, repos, labels, clusters, authentication, and workflows. There are no obvious missing operations for the declared domain of managing an Ambient Code Platform.
Maintenance
Related MCP Connectors
Scoped agent execution. Server-side credentials, policy, budgets and verifiable receipts.
Fail-closed policy guardrails for AI agents running kubectl, terraform, helm, and argocd.
Deploy and run apps, workers, jobs, Postgres, and Valkey on Ownkube from your coding agent.
Persistent cloud workspaces for AI agents: run commands, edit files, use git and a browser.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables delegation of agentic sessions to Kubernetes-hosted Claude agents running on the Ambient Code Platform. Supports creating, managing, and communicating with remote AI agent sessions through OpenShift authentication.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to create isolated Kubernetes Pod sessions for real-time shell command execution, file management, and Node.js code execution, with automatic TTL-based cleanup.MIT
- AlicenseAqualityCmaintenanceEnables an orchestrator like Claude Code to hand coding work off to Cursor SDK agents, run as detached background jobs that survive the session and can be listed, inspected, steered, resumed, or stopped. Agents are asynchronous and reusable across follow-up turns, letting expensive frontier models delegate cheaply without blocking or paying to read the results.7MIT
- AlicenseAqualityBmaintenanceEnables AI agents to explore and operate OpenShift/Kubernetes clusters, offering read-only tools for projects, pods, logs, and resources, with opt-in higher modes for scaling, restarts, applying manifests, and deletions under safe-by-default guards.6213 npmMIT