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

Method install

src/installer/targets/cursor.ts:108–126  ·  view source on GitHub ↗
(loc: Location, _opts: InstallOptions)

Source from the content-addressed store, hash-verified

106 }
107
108 install(loc: Location, _opts: InstallOptions): WriteResult {
109 const files: WriteResult['files'] = [];
110
111 files.push(writeMcpEntry(loc));
112
113 // We no longer write `.cursor/rules/codegraph.mdc` — the codegraph
114 // usage guidance ships in the MCP server's `initialize` response,
115 // the single source of truth (issue #529). Strip a rules file a
116 // previous install created so an upgrade self-heals.
117 if (loc === 'local') {
118 const rulesCleanup = removeRulesEntry();
119 if (rulesCleanup.action === 'removed') files.push(rulesCleanup);
120 }
121
122 return {
123 files,
124 notes: ['Restart Cursor for MCP changes to take effect.'],
125 };
126 }
127
128 uninstall(loc: Location): WriteResult {
129 const files: WriteResult['files'] = [];

Callers

nothing calls this directly

Calls 2

removeRulesEntryFunction · 0.85
writeMcpEntryFunction · 0.70

Tested by

no test coverage detected