Skip to content

Commit c2bc5cd

Browse files
authored
chore(cursor): update mcp example to use GitHub (#330)
1 parent c73b923 commit c2bc5cd

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

registry/coder/modules/cursor/README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder)
1616
module "cursor" {
1717
count = data.coder_workspace.me.start_count
1818
source = "registry.coder.com/coder/cursor/coder"
19-
version = "1.3.0"
19+
version = "1.3.1"
2020
agent_id = coder_agent.example.id
2121
}
2222
```
@@ -29,7 +29,7 @@ module "cursor" {
2929
module "cursor" {
3030
count = data.coder_workspace.me.start_count
3131
source = "registry.coder.com/coder/cursor/coder"
32-
version = "1.3.0"
32+
version = "1.3.1"
3333
agent_id = coder_agent.example.id
3434
folder = "/home/coder/project"
3535
}
@@ -39,23 +39,29 @@ module "cursor" {
3939

4040
Provide a JSON-encoded string via the `mcp` input. When set, the module writes the value to `~/.cursor/mcp.json` using a `coder_script` on workspace start.
4141

42+
The following example configures Cursor to use the GitHub MCP server with authentication facilitated by the [`coder_external_auth`](https://coder.com/docs/admin/external-auth#configure-a-github-oauth-app) resource.
43+
4244
```tf
4345
module "cursor" {
4446
count = data.coder_workspace.me.start_count
4547
source = "registry.coder.com/coder/cursor/coder"
46-
version = "1.3.0"
48+
version = "1.3.1"
4749
agent_id = coder_agent.example.id
50+
folder = "/home/coder/project"
4851
mcp = jsonencode({
4952
mcpServers = {
50-
coder = {
51-
command = "coder"
52-
args = ["exp", "mcp", "server"]
53-
env = {
54-
CODER_MCP_APP_STATUS_SLUG = "cursor"
55-
CODER_MCP_AI_AGENTAPI_URL = "http://localhost:3284"
56-
}
53+
"github" : {
54+
"url" : "https://api.githubcopilot.com/mcp/",
55+
"headers" : {
56+
"Authorization" : "Bearer ${data.coder_external_auth.github.access_token}",
57+
},
58+
"type" : "http"
5759
}
5860
}
5961
})
6062
}
63+
64+
data "coder_external_auth" "github" {
65+
id = "github"
66+
}
6167
```

0 commit comments

Comments
 (0)