chore(cursor): update mcp example to use GitHub (#330)
This commit is contained in:
parent
c73b923e40
commit
c2bc5cd314
@ -16,7 +16,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder)
|
|||||||
module "cursor" {
|
module "cursor" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/cursor/coder"
|
source = "registry.coder.com/coder/cursor/coder"
|
||||||
version = "1.3.0"
|
version = "1.3.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -29,7 +29,7 @@ module "cursor" {
|
|||||||
module "cursor" {
|
module "cursor" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/cursor/coder"
|
source = "registry.coder.com/coder/cursor/coder"
|
||||||
version = "1.3.0"
|
version = "1.3.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/project"
|
folder = "/home/coder/project"
|
||||||
}
|
}
|
||||||
@ -39,23 +39,29 @@ module "cursor" {
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
```tf
|
```tf
|
||||||
module "cursor" {
|
module "cursor" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/cursor/coder"
|
source = "registry.coder.com/coder/cursor/coder"
|
||||||
version = "1.3.0"
|
version = "1.3.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
|
folder = "/home/coder/project"
|
||||||
mcp = jsonencode({
|
mcp = jsonencode({
|
||||||
mcpServers = {
|
mcpServers = {
|
||||||
coder = {
|
"github" : {
|
||||||
command = "coder"
|
"url" : "https://api.githubcopilot.com/mcp/",
|
||||||
args = ["exp", "mcp", "server"]
|
"headers" : {
|
||||||
env = {
|
"Authorization" : "Bearer ${data.coder_external_auth.github.access_token}",
|
||||||
CODER_MCP_APP_STATUS_SLUG = "cursor"
|
},
|
||||||
CODER_MCP_AI_AGENTAPI_URL = "http://localhost:3284"
|
"type" : "http"
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data "coder_external_auth" "github" {
|
||||||
|
id = "github"
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user