MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / buildCursorMcpConfig

Function buildCursorMcpConfig

src/installer/targets/cursor.ts:171–175  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

169 * the full rationale.
170 */
171function 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
177function writeMcpEntry(loc: Location): WriteResult['files'][number] {
178 const file = mcpJsonPath(loc);

Callers 2

printConfigMethod · 0.85
writeMcpEntryFunction · 0.85

Calls 1

getMcpServerConfigFunction · 0.90

Tested by

no test coverage detected