# Coder MCP for AI Agents MCP

> The Coder MCP connects your remote development environment to any AI agent, letting you monitor builds, manage workspaces, and troubleshoot deployments using natural language. You get instant access to build statistics, detailed logs, and insights from active AI sessions without ever leaving your chat window.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Tags:** remote-development, workspace-management, coder, ai-bridge, infrastructure-as-code

## Description

Managing complex dev infrastructure usually means jumping between a terminal, a dashboard, and a log viewer. It's slow, frustrating, and you always lose context. This MCP changes that. It lets your agent connect directly to your Coder deployment, making remote development management conversational.

You can ask your AI client to check the latest build information or retrieve specific logs from an agent just by asking. Need to know how many users are active in a workspace? Just prompt it. You can audit AI-assisted workflows by fetching thread history from sessions, or even update core infrastructure settings like SSH configurations.

If you're building complex pipelines, this integration is huge. It surfaces deep platform insights—from deployment statistics to user activity duration—right into your chat stream. Since Vinkius hosts thousands of specialized MCPs, connecting Coder here means you have one central access point for all your remote development tooling.

## Tools

### get_agent_debug_magicsock
Get Tailscale magicsock debug info (local agent API)

### get_agent_debug_manifest
Get the startup manifest from the server (local agent API)

### get_agent_external_auth
Get external authentication tokens for the agent

### get_agent_logs
Streams detailed logs from a specific agent instance so you can debug runtime issues.

### get_ai_session_threads
Get threads for an AI session

### get_api_root
Get basic API information

### get_app_auth_redirect
Redirect to a URI with an encrypted API key

### get_app_host
Get the base host for applications

### get_appearance
Get dashboard branding and banners

### get_audit_logs
Get a paginated list of audit logs

### get_build_info
Get Coder build info

### get_chat_messages
Get messages for a chat session

### get_deployment_config
Get deployment configuration

### get_deployment_stats
Retrieves key deployment metrics like build counts and active workspaces.

### get_external_auth_device
Initiate device-based OAuth

### get_insights_daus
Get Daily Active User stats

### get_insights_templates
Get usage data for templates

### get_insights_user_activity
Get activity duration per user

### get_notifications_inbox
List user notifications

### get_notifications_settings
Get global notification settings

### get_notifications_templates
List available notification templates

### get_prebuild_settings
Get prebuild settings

### get_ssh_config
Provides the necessary SSH configuration details to connect your local machine to the remote environment.

### get_update_check
Check for Coder updates

### get_user_profile
Get user profile

### get_workspace_acl
Get workspace ACLs

### get_workspace_build_logs
Get logs for a specific build

### get_workspace_build_params
List parameters used for the build

### get_workspace_build
Get details of a specific build

### get_workspace
Get workspace metadata

### list_ai_clients
List connected AI Bridge clients

### list_ai_interceptions
List AI interceptions

### list_ai_models
List available AI models

### list_ai_sessions
Lists all active AI Bridge sessions, showing which models are in use and who is connected.

### list_chats
List user chat sessions

### list_external_auth
List linked external accounts (e.g., GitHub)

### list_groups
List groups

### list_licenses
List enterprise licenses

### list_org_members
List members of an organization

### list_org_provisioner_daemons
List active provisioner daemons

### list_org_provisioner_jobs
List jobs for the organization provisioners

### list_org_roles
List assignable roles in an organization

### list_organizations
List organizations

### list_tasks
Manage long-running AI tasks

### list_template_examples
List starter template examples

### list_template_versions
List versions for a template

### list_templates
List all templates

### list_user_secrets
List user secrets

### list_user_tokens
List user tokens

### list_users
Gets a list of all user accounts managed within the Coder deployment.

### list_workspace_port_shares
List port shares for a workspace

### list_workspaces
g., owner:me).

List workspaces

### login_user
Authenticate a user with email and password

### register_agent_log_source
Register a new log source

### send_agent_logs
Send logs to the server

### update_agent_app_status
Update status of an application running on the agent

### update_appearance
Update dashboard branding and banners

### update_organization
Update an organization

### update_prebuild_settings
Update prebuild settings

### update_user_profile
Update user profile

### update_workspace_acl
Update workspace ACLs

### update_workspace_autostart
Update workspace autostart schedule

### update_workspace_autoupdates
Update workspace autoupdates schedule

### upload_file
Upload a file (tar or zip)

### add_license
Add an enterprise license

### auth_workspace_agent
Authenticate agent using cloud provider identity

### cancel_workspace_build
Cancel a pending or running build

### check_auth
Check if user has permission to perform actions

### create_chat_message
Send a message to a chat session

### create_chat
Start a new AI chat session

### create_group
Create a group in an organization

### create_organization
Create an organization

### create_user_secret
Create a user secret

### create_user_task
Create a long-running AI task for a user

### create_user_token
Create a user token

### create_user
Create a user

### create_workspace_port_share
Create a port share for a workspace

### create_workspace
Create a workspace

### delete_license
Delete an enterprise license

### delete_user
Delete a user

### download_file
Download a file by ID

### get_agent_connection
Get DERP and connection details for an agent

### get_agent_containers
List running containers and devcontainers

### get_agent_debug_logs
Get the last 10MiB of agent logs (local agent API)

## Prompt Examples

**Prompt:** 
```
What are the deployment stats? I need to know about active workspaces and builds.
```

**Response:** 
```
**🚀 Coder Deployment Health Report**

*   **Active Workspaces:** 12
*   **Total Builds This Cycle:** 8
*   **Current Build Version:** v2.10.2
*   **Update Check:** Yes, a minor update is available (v2.10.3). Would you like to initiate the check?
```

**Prompt:** 
```
Can I see the thread history for the AI session that ran last week? The one about microservices.
```

**Response:** 
```
**AI Session Audit: Microservices Flow**

*   **Session ID:** 9b27-73b0...
*   **Date Range:** Oct 1 - Oct 5
*   **Key Threads Intercepted:**
    *   [Thread 1] Defined service boundaries (Source: User)
    *   [Thread 2] Optimized API call structure (Source: AI Model)
    *   [Thread 3] Identified missing error handling block (Source: AI Model)
```

**Prompt:** 
```
Who are the users on this platform? I need a list of all accounts.
```

**Response:** 
```
**👤 User Account Directory**

| Username | Email | Status |
| :--- | :--- | :--- |
| jdoe | john.d@corp.com | Active |
| psmith | patrick.s@corp.com | Suspended |
| rjones | r.jones@corp.com | Active |

*Note: The list can be filtered by group membership if you provide a specific group name.*
```

## Capabilities

### Monitor Deployment Health
Retrieve build details and deployment statistics to check the status of your infrastructure.

### Troubleshoot Agent Logs
Stream logs from specific workspaces or agents so you can instantly debug environment issues.

### Manage AI Sessions and Users
List active AI Bridge sessions, available models, and connected client details to audit usage.

### Configure Infrastructure Settings
Access and retrieve critical settings like SSH configurations or workspace ACLs.

### Handle User & Organization Management
List users, organizations, and manage associated roles, tokens, and secrets.

### Audit AI-Assisted Development Flows
Fetch the thread history from specific AI sessions to track how developers used AI assistance.

## Use Cases

### A build failed and I need to know why.
The agent immediately uses get_agent_logs. It pulls the last 10MiB of logs and summarizes the error, pointing directly to the missing dependency line in the code output.

### We need to check if our team has permission to access a specific workspace.
The agent executes get_workspace_acl. It returns a clear list of roles and permissions assigned to the user, preventing unauthorized resource access before development starts.

### I'm onboarding a new developer who needs SSH setup guides.
The agent runs get_ssh_config and prints the required hostname prefix and suffix. The developer copies this single block of text, eliminating the need to read complex documentation.

### I need an overview of all active AI development sessions in the company.
The agent uses list_ai_sessions. It provides a table showing three different clients (e.g., Cursor, Claude), their current model usage, and how long each session has been running.

## Benefits

- Stop switching tabs. Instead of navigating to a dashboard, ask your agent to fetch deployment statistics using get_deployment_stats and get the data instantly.
- Audit AI usage without manual effort. Use list_ai_sessions to see exactly which models are active in your workspaces right now.
- Deep debugging capability: When an agent fails, use get_agent_logs to stream real-time logs directly into your chat conversation for immediate analysis.
- Centralized access control: Managing users and groups is straightforward. You can list_users or check workspace ACLs without needing the dedicated admin portal.
- Immediate configuration checks: Need to set up a new machine? get_ssh_config gives you the exact details required, saving manual lookups.
- AI workflow review: Understand how AI was actually used by fetching threads from an AI session using get_ai_session_threads.

## How It Works

The bottom line is you stop needing dedicated CLI commands or dashboard navigation; you just talk to your infrastructure.

1. Subscribe to this MCP and enter your Coder URL along with a session token.
2. Your agent connects via Vinkius, authenticating access to your remote dev clusters.
3. You ask your AI client natural language questions—like 'What are the deployment stats?'—and receive structured data back instantly.

## Frequently Asked Questions

**How can I monitor the status of my remote development workspaces using Coder MCP for AI Agents?**
You simply ask your agent to provide deployment statistics. It gives you a real-time count of active workspaces and build cycles, keeping you updated on infrastructure health instantly.

**What if I need to check logs from an older failed build using Coder MCP for AI Agents?**
The agent lets you access specific build history. You can request the workspace build logs and review exactly what happened, which is much faster than checking manual log archives.

**Is this tool better than manually running commands in a terminal?**
Yes. Instead of opening a separate terminal for every query (like `ssh` or `docker logs`), you ask your agent, and it handles the command execution and result formatting inside the chat.

**Can Coder MCP for AI Agents help me manage user access rights?**
Yes. You can list users to see who has accounts, or check workspace ACLs to confirm which roles have permission to join a specific project environment.