Skip to content

docs: clarify details around MCP #17220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 90 additions & 23 deletions docs/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"versions": ["main"],
"versions": [
"main"
],
"routes": [
{
"title": "About",
Expand Down Expand Up @@ -186,7 +188,9 @@
"description": "Use Coder Desktop to access your workspace like it's a local machine",
"path": "./user-guides/desktop/index.md",
"icon_path": "./images/icons/computer-code.svg",
"state": ["early access"]
"state": [
"early access"
]
},
{
"title": "Workspace Management",
Expand Down Expand Up @@ -236,7 +240,10 @@
"title": "Appearance",
"description": "Learn how to configure the appearance of Coder",
"path": "./admin/setup/appearance.md",
"state": ["enterprise", "premium"]
"state": [
"enterprise",
"premium"
]
},
{
"title": "Telemetry",
Expand Down Expand Up @@ -317,22 +324,33 @@
{
"title": "Groups \u0026 Roles",
"path": "./admin/users/groups-roles.md",
"state": ["enterprise", "premium"]
"state": [
"enterprise",
"premium"
]
},
{
"title": "IdP Sync",
"path": "./admin/users/idp-sync.md",
"state": ["enterprise", "premium"]
"state": [
"enterprise",
"premium"
]
},
{
"title": "Organizations",
"path": "./admin/users/organizations.md",
"state": ["premium"]
"state": [
"premium"
]
},
{
"title": "Quotas",
"path": "./admin/users/quotas.md",
"state": ["enterprise", "premium"]
"state": [
"enterprise",
"premium"
]
},
{
"title": "Sessions \u0026 API Tokens",
Expand Down Expand Up @@ -474,7 +492,10 @@
"title": "Process Logging",
"description": "Log workspace processes",
"path": "./admin/templates/extending-templates/process-logging.md",
"state": ["enterprise", "premium"]
"state": [
"enterprise",
"premium"
]
}
]
},
Expand All @@ -487,7 +508,10 @@
"title": "Permissions \u0026 Policies",
"description": "Learn how to create templates with Terraform",
"path": "./admin/templates/template-permissions.md",
"state": ["enterprise", "premium"]
"state": [
"enterprise",
"premium"
]
},
{
"title": "Troubleshooting Templates",
Expand All @@ -501,13 +525,19 @@
"description": "Learn how to run external provisioners with Coder",
"path": "./admin/provisioners/index.md",
"icon_path": "./images/icons/key.svg",
"state": ["enterprise", "premium"],
"state": [
"enterprise",
"premium"
],
"children": [
{
"title": "Manage Provisioner Jobs",
"description": "Learn how to run external provisioners with Coder",
"path": "./admin/provisioners/manage-provisioner-jobs.md",
"state": ["enterprise", "premium"]
"state": [
"enterprise",
"premium"
]
}
]
},
Expand Down Expand Up @@ -585,13 +615,19 @@
"title": "Workspace Proxies",
"description": "Run geo distributed workspace proxies",
"path": "./admin/networking/workspace-proxies.md",
"state": ["enterprise", "premium"]
"state": [
"enterprise",
"premium"
]
},
{
"title": "High Availability",
"description": "Learn how to configure Coder for High Availability",
"path": "./admin/networking/high-availability.md",
"state": ["enterprise", "premium"]
"state": [
"enterprise",
"premium"
]
},
{
"title": "Troubleshooting",
Expand Down Expand Up @@ -650,7 +686,10 @@
"title": "Audit Logs",
"description": "Audit actions taken inside Coder",
"path": "./admin/security/audit-logs.md",
"state": ["enterprise", "premium"]
"state": [
"enterprise",
"premium"
]
},
{
"title": "Secrets",
Expand All @@ -661,7 +700,10 @@
"title": "Database Encryption",
"description": "Encrypt the database to prevent unauthorized access",
"path": "./admin/security/database-encryption.md",
"state": ["enterprise", "premium"]
"state": [
"enterprise",
"premium"
]
}
]
},
Expand Down Expand Up @@ -720,7 +762,9 @@
"title": "Run AI Coding Agents with Coder",
"description": "Learn how to run and secure agents in Coder",
"path": "./tutorials/ai-agents/README.md",
"state": ["early access"],
"state": [
"early access"
],
"children": [
{
"title": "Learn about coding agents",
Expand All @@ -731,42 +775,65 @@
"title": "Create a Coder template for agents",
"description": "Create a purpose-built template for your AI agents",
"path": "./tutorials/ai-agents/create-template.md",
"state": ["early access"]
"state": [
"early access"
]
},
{
"title": "Integrate with your issue tracker",
"description": "Assign tickets to AI agents and interact via code reviews",
"path": "./tutorials/ai-agents/issue-tracker.md",
"state": ["early access"]
"state": [
"early access"
]
},
{
"title": "Best practices \u0026 adding tools via MCP",
"description": "Improve results by adding tools to your agents",
"path": "./tutorials/ai-agents/best-practices.md",
"state": ["early access"]
"state": [
"early access"
]
},
{
"title": "Supervise agents via Coder UI",
"description": "Interact with agents via the Coder UI",
"path": "./tutorials/ai-agents/coder-dashboard.md",
"state": ["early access"]
"state": [
"early access"
]
},
{
"title": "Supervise agents via the IDE",
"description": "Interact with agents via VS Code or Cursor",
"path": "./tutorials/ai-agents/ide-integration.md",
"state": ["early access"]
"state": [
"early access"
]
},
{
"title": "Programmatically manage agents",
"description": "Manage agents via MCP, the Coder CLI, and/or REST API",
"path": "./tutorials/ai-agents/headless.md",
"state": ["early access"]
"state": [
"early access"
]
},
{
"title": "Securing agents in Coder",
"description": "Learn how to secure agents with boundaries",
"path": "./tutorials/ai-agents/securing.md"
"path": "./tutorials/ai-agents/securing.md",
"state": [
"early access"
]
},
{
"title": "Custom agents",
"description": "Learn how to use custom agents with Coder",
"path": "./tutorials/ai-agents/custom-agents.md",
"state": [
"early access"
]
}
]
},
Expand Down
6 changes: 2 additions & 4 deletions docs/tutorials/ai-agents/create-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ Follow the instructions in the Coder Registry to install the module. Be sure to
enable the `experiment_use_screen` and `experiment_report_tasks` variables to
report status back to the Coder control plane.

> Alternatively, you can report status from a custom agent back to the Coder
> control plane via our MCP server. For more information,
> [join our Discord](https://discord.gg/coder) or
> [contact us](https://coder.com/contact).
> Alternatively, you can [use a custom agent](./custom-agents.md) that is
> not in our registry via MCP.

## 3. Confirm tasks are streaming in the Coder UI

Expand Down
48 changes: 48 additions & 0 deletions docs/tutorials/ai-agents/custom-agents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Custom Agents

> [!NOTE]
>
> This functionality is in early access and subject to change. Do not run in
> production as it is unstable. Instead, deploy these changes into a demo or
> staging environment.
>
> Join our [Discord channel](https://discord.gg/coder) or
> [contact us](https://coder.com/contact) to get help or share feedback.

Custom agents beyond the ones listed in the [Coder registry](https://registry.coder.com/modules?tag=agent) can be used with Coder.

## Prerequisites

- A Coder deployment with v2.21 or later
- A [Coder workspace / template](./create-template.md)
- A custom agent that supports Model Context Protocol (MCP)

## Getting Started

Coder uses the [MCP protocol](https://modelcontextprotocol.io/introduction) to report activity back to the Coder control plane. From there, activity is displayed in the Coder dashboard.

First, your template will need a [coder_app](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/app) for the agent. This can be a web app or command run in the terminal and ideally gives the user a UI to interact with or view more details about the agent.

From there, the agent can run the MCP server with the `coder exp mcp server` command. You will need to set the `CODER_MCP_APP_STATUS_SLUG` environment variable to match the slug in the coder_app resource.

## Example

Inside a Coder workspace, run the following commands:

```sh
coder login # be sure to be authenticated with the Coder CLI
export CODER_MCP_APP_STATUS_SLUG=my-agent # needs to be the same as the slug in the coder_app resource

# Use your own agent's logic and syntax here:
any-custom-agent configure-mcp --name "coder" --command "coder exp mcp server"
```

This will start the MCP server and report activity back to the Coder control plane on behalf of the coder_app resource.
Comment on lines +26 to +40
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're mentioning the app status slug, we should also add a note about also needing to specify CODER_AGENT_TOKEN for app status reporting.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Will clarify


> See the [Goose module](https://github.com/coder/modules/blob/main/goose/main.tf) source code for a real world example.

## Contributing

We welcome contributions for various agents via the [Coder registry](https://registry.coder.com/modules?tag=agent)!

See our [contributing guide](https://github.com/coder/modules/blob/main/CONTRIBUTING.md) for more information.
6 changes: 4 additions & 2 deletions docs/tutorials/ai-agents/headless.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ The Coder CLI has options to automatically configure MCP servers for you. On
your local machine, run the following command:

```sh
coder mcp claude-desktop # Configure Claude Desktop to interact with Coder
coder mcp cursor # Configure Cursor to interact with Coder
coder exp mcp configure claude-desktop # Configure Claude Desktop to interact with Coder
coder exp mcp configure cursor # Configure Cursor to interact with Coder
```

> MCP is also used for various agents to report activity back to Coder. Learn more about this in [custom agents](./custom-agents.md).

## Coder CLI

Workspaces can be created, started, and stopped via the Coder CLI. See the
Expand Down
Loading