Integration
Command line
The knowmind command line opens a connection to your workspace from any terminal. It handles sign-in, search and upload, and provides a local MCP bridge for MCP-capable tools such as Claude Code or Cursor.
Prerequisites
- Node.js 20 or newer (check: node --version)
- knowmind account with an API token of the form kmt_… (created on the Business API plan)
- Write permission in your home directory for the token file at ~/.knowmind/config.json
Steps
- 1
Install from the npm registry
bashnpm install -g knowmindThe
knowmindcommand is then available system-wide. Current version: 0.1.9 (as of 23 May 2026).NoteWhat does this command download?
Only the command line itself — a small Apache 2.0 licensed binary. No customer content, no memories, no credentials. Content from knowmind workspaces is only available after the sign-in in step 2.Outcome:
knowmind --versionreturns a version string. - 2
Sign in with an API token
In the knowmind dashboard, under API Tokens, create a token with scope
readfor read-only access or alsowriteto create and maintain content. Copy the token once.bashknowmind login --token kmt_…The token is saved to
~/.knowmind/config.jsonwith restricted permissions (chmod 600 on Unix). Alternatively pass it through theKNOWMIND_TOKENenvironment variable — useful in CI pipelines.Outcome:
knowmind healthreturns the service status and a version string. - 3
Commands at a glance
bash# Search knowmind search "When does the Müller GmbH contract expire?" knowmind search "GDPR training" -k 10 --hops 3 # Create a memory echo "Short note" | knowmind upload - --title "Keyword" knowmind upload ./handbook.md --title "Service Handbook" # Sync content (idempotent, content-hash based) knowmind sync ./docs --manifest ./.knowmind.manifest # Status and maintenance knowmind stats # number of memories and relations knowmind health # service reachability knowmind config # current token prefix and endpointOutcome: On success every command returns exit code 0 and writes the result to stdout.
- 4
Use as an MCP bridge
If an AI tool supports the Model Context Protocol over stdio (Claude Code, Claude Desktop, Cursor), the CLI can serve as a local bridge. The token stays in the CLI configuration — the AI tool never sees it.
json{ "mcpServers": { "knowmind": { "command": "knowmind", "args": ["mcp"] } } }Tool-specific guides: Claude Code, Claude Desktop and Cursor.
Verify the result
The CLI is ready when all three conditions hold:
knowmind healthreturnsstatus: ok.knowmind statsshows the memory and relation count.knowmind search "your question"returns hits from the corpus.
Troubleshooting
| Error message | Cause | Resolution |
|---|---|---|
| command not found: knowmind | npm global directory not on PATH. | Find the path with npm config get prefix and add it to PATH. On Windows: PowerShell profile or environment variable dialog. |
| EACCES on npm install -g | Global directory needs administrator rights. | Either install with elevated rights (sudo / "Run as administrator"), or point npm prefix at a user-owned directory: npm config set prefix ~/.npm-global. |
| knowmind login: token rejected | Token revoked in the dashboard or a copy-paste typo. | Create a new token in the dashboard and retry. Watch for surrounding whitespace when copying. |
| knowmind sync: reports missing permission | Token scope is read only, not write. | Edit the token in the dashboard and add scope "write", or create a new token with both scopes. |