* Build the codegraph MCP-server config for Cursor at the given * location. Inherits the shared shape ({type, command, args}) and * appends `--path` so the spawned MCP server resolves the workspace * correctly regardless of Cursor's launch cwd. See file header for * the full rationale.
(loc: Location)
| 169 | * the full rationale. |
| 170 | */ |
| 171 | function buildCursorMcpConfig(loc: Location): { type: string; command: string; args: string[] } { |
| 172 | const base = getMcpServerConfig(); |
| 173 | const pathArg = loc === 'local' ? process.cwd() : '${workspaceFolder}'; |
| 174 | return { ...base, args: [...base.args, '--path', pathArg] }; |
| 175 | } |
| 176 | |
| 177 | function writeMcpEntry(loc: Location): WriteResult['files'][number] { |
| 178 | const file = mcpJsonPath(loc); |
no test coverage detected