This is the authoritative runbook for an AI coding agent installing SolidKG, configuring one supported coding client, indexing a real project, and proving the MCP integration works end to end.
Copy this instruction into your coding agent:
Read
docs/setup.mdcompletely. Inspect this machine and the target project without changing anything. Recommend an install path, coding-agent target, and configuration scope, explain exactly what files or global locations would change, and wait for my confirmation. Then install SolidKG, configure only the approved target, initialize the approved project, restart or ask me to restart the client, and run the real MCP acceptance check. Do not claim success untilsolidkg_explorereturns source and an answer packet.
- Inspect first. Do not install packages, write configuration, or initialize a project during preflight.
- Get confirmation before a global install, user-level configuration change, source link, or removal of another MCP server.
- Configure only the client and scope the user approved.
- Preserve unrelated sibling settings, comments, instruction files, and MCP servers.
- Do not replace the pinned grammar manifest or vendored SCIP sources with upstream HEAD or an arbitrary binary.
- A successful command is not acceptance. The configured client must expose
solidkg_explore, and a real call must return line-numbered source plus an answer packet.
Report the operating system, CPU architecture, project path, coding client, requested scope, and whether SolidKG is already installed:
solidkg --version
git --version
node --version
npm --version
pnpm --versionMissing commands are facts, not failures. Node.js and pnpm are required only for a source checkout; the standalone release bundles include their own runtime. The npm installation path needs npm for installation, then runs SolidKG with the bundled runtime.
If solidkg already exists, run the read-only installer diagnostic before recommending any change:
solidkg install --check --target all --location globalAlso inspect the selected project for .solidkg/, existing MCP configuration, and competing knowledge-graph servers. Show the exact files and entries involved. Do not remove or disable anything yet.
Ask the user to confirm:
- Install path: released npm package, standalone release bundle, or source checkout.
- Coding client:
claude,cursor,codex,opencode,hermes,antigravity,omp, orkimi. - Configuration scope:
globalorlocal, where supported by that client. - Project path: the source tree SolidKG should initialize and index.
Recommend the released npm package when npm is already available. Recommend a standalone bundle when the user wants no Node.js/npm dependency. Use a source checkout for contributors or when the user explicitly wants to validate this repository's current source.
npm install -g solidkg
solidkg --versionSelect the matching OS/architecture asset from GitHub Releases. Review the downloaded installer or archive before running it, install it into the user-approved location, then run:
solidkg --versionDo not download a mutable branch or substitute a third-party binary.
Require Node.js 24 and the pnpm version pinned in package.json, then prove the checkout before configuring a client:
pnpm install --frozen-lockfile
pnpm run verify:source:fullverify:source:full builds the TypeScript source, validates copied assets and vendored integrations, exercises real SQLite/tree-sitter indexing and SCIP linking, calls the stdio MCP server, runs the public tests, and checks release-package contents.
If the user wants this checkout on PATH, explain that pnpm run install:source writes to pnpm's global package/bin location and obtain confirmation before running it.
Run the diagnostic again with the approved target and scope. Explain every file it reports before writing:
solidkg install --check --target <target> --location <global-or-local>Then configure only that target:
solidkg install --target <target> --location <global-or-local>If automatic editing is unsupported or the config is malformed, print the provider-neutral snippet instead of guessing:
solidkg install --print-config <target>If another graph MCP server is present, leave it active until SolidKG passes acceptance. Remove a recognized predecessor only with explicit approval, after recording its exact entry and backup path.
solidkg init -i "<project-path>"
solidkg status "<project-path>"The status check must identify the project, SQLite backend and journal mode, indexed file count, and graph counts. Investigate an empty or partial index instead of treating process exit as success.
For a source checkout, missing src/db/schema.sql, src/extraction/native-grammars.json, or maintained vendored/scip-* sources means the checkout is incomplete. Re-download the same commit; do not fabricate placeholders.
Restart the configured coding client so it reloads MCP configuration. Then verify all of the following through that client:
- The tool list contains
solidkg_explore. - Call
solidkg_explorewith a normal structural question about the initialized project, such as:Where is the main entry point and what does it call? - Confirm the response contains relevant line-numbered source and structural or flow evidence.
- Confirm the response includes an answer packet with evidence anchors and returned-context sufficiency.
- Confirm no separate installer, test server, terminal, or detached background process was left running.
Configuration presence, a green unit test, or solidkg status alone does not pass this gate.
| Symptom | Required response |
|---|---|
| Wrong Node major or pnpm version for source | Switch to Node 24 and the pinned pnpm version; reinstall only this checkout's dependencies with --frozen-lockfile. |
| Lockfile mismatch | Stop and inspect the manifest/lock diff. Do not regenerate dependency resolutions merely to obtain a pass. |
| Missing source assets or vendored indexers | Re-clone or re-download the same commit. Never substitute floating upstream sources. |
Missing or stale dist/ assets |
Run pnpm run build, then rerun the failed source-verification gate. |
| Installer reports malformed config | Use --print-config; do not overwrite the user's file with a newly generated replacement. |
| Tool missing after installation | Rerun install --check, confirm the selected target/scope, restart the client, and inspect the client's MCP logs. |
| Tool exists but the real query fails | Keep any predecessor active, preserve logs and backups, repair the specific failure, and repeat the MCP acceptance call. |
Report:
- OS and architecture.
- Distribution and exact SolidKG version.
- Coding client, target name, and configuration scope.
- Every configuration or instruction file changed and its backup path.
- Initialized project and data-directory path.
solidkg statussummary.- Source-verification result, if the source path was used.
- MCP tool visibility and the structural question asked.
- Whether source, graph evidence, and the answer packet were observed.
- Any unverified platform, optional SCIP language, warning, or retained predecessor.
Removing client integration does not remove project indexes:
solidkg uninstall --target <target> --location <global-or-local>Removing a project index is separate and destructive; obtain confirmation first:
solidkg uninit "<project-path>"Uninstall the global npm package or standalone bundle only when the user explicitly requests it. Preserve unrelated client settings and backups.