Skip to content

Commit c963d7a

Browse files
committed
fix(cursor): enable mcps
1 parent 787f9b7 commit c963d7a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/backends/cursor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ pub async fn query_with_options(prompt: &str, options: QueryOptions) -> Result<(
136136

137137
let mut cmd = Command::new(&cursor_cli);
138138
cmd.args(["-p", "--output-format", "stream-json"])
139+
.arg("--approve-mcps")
139140
.args(["--api-key", &api_key])
140141
.env("HOME", &paths.cursor_home);
141142

src/onboarding.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use tracing::warn;
1919

2020
use crate::config;
2121
use crate::memory::{MemoryIndex, memories_dir};
22+
use crate::setup;
2223
use crate::skills;
2324

2425
/// Onboarding phase
@@ -431,6 +432,9 @@ pub fn build_context_prompt_for_user(
431432
}
432433
config::AiBackend::Cursor => {
433434
let mcp_config_path = paths.cursor_home.join(".cursor").join("mcp.json");
435+
let cursor_cli = setup::find_cursor_cli()
436+
.map(|p| p.display().to_string())
437+
.unwrap_or_else(|| "cursor-agent".to_string());
434438
lines.push(format!(
435439
"To add an MCP server, edit: {}",
436440
mcp_config_path.display()
@@ -451,6 +455,12 @@ pub fn build_context_prompt_for_user(
451455
.to_string(),
452456
);
453457
lines.push("```".to_string());
458+
lines.push(String::new());
459+
lines.push(format!(
460+
"After adding the config, enable the server by running: HOME={} {} mcp enable <server-name>",
461+
paths.cursor_home.display(),
462+
cursor_cli,
463+
));
454464
}
455465
}
456466
lines.push(String::new());

0 commit comments

Comments
 (0)