Skip to content

Commit 13997ca

Browse files
authored
docs: clarify details around MCP (#17220)
1 parent 8cecc4f commit 13997ca

File tree

4 files changed

+62
-7
lines changed

4 files changed

+62
-7
lines changed

docs/manifest.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,14 @@
766766
{
767767
"title": "Securing agents in Coder",
768768
"description": "Learn how to secure agents with boundaries",
769-
"path": "./tutorials/ai-agents/securing.md"
769+
"path": "./tutorials/ai-agents/securing.md",
770+
"state": ["early access"]
771+
},
772+
{
773+
"title": "Custom agents",
774+
"description": "Learn how to use custom agents with Coder",
775+
"path": "./tutorials/ai-agents/custom-agents.md",
776+
"state": ["early access"]
770777
}
771778
]
772779
},

docs/tutorials/ai-agents/create-template.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ Follow the instructions in the Coder Registry to install the module. Be sure to
4141
enable the `experiment_use_screen` and `experiment_report_tasks` variables to
4242
report status back to the Coder control plane.
4343

44-
> Alternatively, you can report status from a custom agent back to the Coder
45-
> control plane via our MCP server. For more information,
46-
> [join our Discord](https://discord.gg/coder) or
47-
> [contact us](https://coder.com/contact).
44+
> Alternatively, you can [use a custom agent](./custom-agents.md) that is
45+
> not in our registry via MCP.
4846
4947
## 3. Confirm tasks are streaming in the Coder UI
5048

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Custom Agents
2+
3+
> [!NOTE]
4+
>
5+
> This functionality is in early access and subject to change. Do not run in
6+
> production as it is unstable. Instead, deploy these changes into a demo or
7+
> staging environment.
8+
>
9+
> Join our [Discord channel](https://discord.gg/coder) or
10+
> [contact us](https://coder.com/contact) to get help or share feedback.
11+
12+
Custom agents beyond the ones listed in the [Coder registry](https://registry.coder.com/modules?tag=agent) can be used with Coder.
13+
14+
## Prerequisites
15+
16+
- A Coder deployment with v2.21 or later
17+
- A [Coder workspace / template](./create-template.md)
18+
- A custom agent that supports Model Context Protocol (MCP)
19+
20+
## Getting Started
21+
22+
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.
23+
24+
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.
25+
26+
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.
27+
28+
## Example
29+
30+
Inside a Coder workspace, run the following commands:
31+
32+
```sh
33+
coder login # be sure to be authenticated with the Coder CLI
34+
export CODER_MCP_APP_STATUS_SLUG=my-agent # needs to be the same as the slug in the coder_app resource
35+
36+
# Use your own agent's logic and syntax here:
37+
any-custom-agent configure-mcp --name "coder" --command "coder exp mcp server"
38+
```
39+
40+
This will start the MCP server and report activity back to the Coder control plane on behalf of the coder_app resource.
41+
42+
> See the [Goose module](https://github.com/coder/modules/blob/main/goose/main.tf) source code for a real world example.
43+
44+
## Contributing
45+
46+
We welcome contributions for various agents via the [Coder registry](https://registry.coder.com/modules?tag=agent)!
47+
48+
See our [contributing guide](https://github.com/coder/modules/blob/main/CONTRIBUTING.md) for more information.

docs/tutorials/ai-agents/headless.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ The Coder CLI has options to automatically configure MCP servers for you. On
3535
your local machine, run the following command:
3636

3737
```sh
38-
coder mcp claude-desktop # Configure Claude Desktop to interact with Coder
39-
coder mcp cursor # Configure Cursor to interact with Coder
38+
coder exp mcp configure claude-desktop # Configure Claude Desktop to interact with Coder
39+
coder exp mcp configure cursor # Configure Cursor to interact with Coder
4040
```
4141

42+
> MCP is also used for various agents to report activity back to Coder. Learn more about this in [custom agents](./custom-agents.md).
43+
4244
## Coder CLI
4345

4446
Workspaces can be created, started, and stopped via the Coder CLI. See the

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy