{% extends "_base.html" %} {% set active = 'install' %} {% block title %}trovex — connect Claude Code{% endblock %} {% block topbar_meta %} {{ "{:,}".format(total) }} docs indexed {% endblock %} {% block content %}
QUICKSTART · 30 SECONDS

Connect Claude Code to trovex

Paste one prompt into Claude Code. It detects your handle from git config, registers the MCP, and you're done — your agents can then trovex_search the shared store and trovex_write to it.

1 MCP 2 Guard 3 LLM Verify
{# ── Step 1: required ───────────────────────────────────── #}
1

Connect the MCP required

Pick your coding agent. trovex speaks the Model Context Protocol over HTTP, so any MCP client connects to the /mcp/ endpoint with one config entry — no filesystem changes, no shell scripts, no sudo.

{# ── Client switcher ── #}
+ any MCP client
{# ── Panel: Claude Code (default) ── #}
Paste this prompt into Claude Code — it wires itself up
prompt
1Set up the trovex MCP on this machine.231. Read my ~/.claude/settings.json (preserve everything else).42. Detect my handle: run `git config user.email`. Take the part before5   the @. If empty or weird, ask me. Confirm with me ([Y/n]) before6   proceeding.73. Add this entry to mcpServers (merge, don't replace siblings):89     "trovex": {10       "type": "http",11       "url": "https://trovex.prod.synergix.ch/mcp/",12       "headers": { "X-TROVEX-User": "<my-handle>" }13     }14154. Tell me to restart Claude Code so the MCP loads. Then these tools16   are available: `trovex_search(query)` → relevant passages, `trovex_read`,17   and `trovex_write(content, kind, tags)` to store records into the shared store.185. To also WRITE to the store, add an "X-TROVEX-Write-Token" header (the19   shared token from your admin) next to X-TROVEX-User, then restart.
Prefer the CLI / manual edit?

one-liner — replace <handle>

~/.claude/settings.json · shell
1claude mcp add --transport http trovex \2  https://trovex.prod.synergix.ch/mcp/ \3  --header "X-TROVEX-User: <handle>"
{# ── Panel: Cursor ── #} {# ── Panel: Windsurf ── #} {# ── Panel: Zed ── #}
Preserves your config
Claude Code only merges the new entry — nothing else is touched.
Reads open · writes need a token
trovex_search/trovex_read work as-is. To trovex_write/trovex_tag/trovex_delete, add a header "X-TROVEX-Write-Token": "<shared-token>" next to X-TROVEX-User (ask your admin for the token). In the web UI, paste it once on /settings.
~
Reversible
Remove the entry from settings.json and restart. Zero residue.
{# ── Step 2: optional ambient hook ──────────────────────── #}
2

Write-guard hook optional recommended

A PreToolUse hook that blocks writing a .md to disk and redirects it to trovex_write — so records land in the shared store, not scattered across repos. .trovexignore exempts files that must stay on disk; degrades to allow if trovex is unreachable.

After step 1, paste this
prompt
1Install the trovex write-guard hook.231. Create ~/.claude/hooks/trovex-md-guard.sh with the content fetched from4   https://trovex.prod.synergix.ch/hooks/trovex-md-guard.sh52. chmod +x it.63. Read ~/.claude/settings.json and add this to hooks.PreToolUse7   (merge — don't overwrite existing entries):89     {10       "matcher": "Write|Edit|MultiEdit",11       "hooks": [{12         "type": "command",13         "command": "/home/<me>/.claude/hooks/trovex-md-guard.sh"14       }]15     }16174. Replace <me> with $HOME's basename. Add a .trovexignore at your repo18   root for files that must stay on disk. Then tell me to restart.
{# ── BYOK: LLM rerank ─────────────────────────────────── #}
3

LLM rerank BYOK quality boost

Bring your own OpenAI key. trovex fetches the top-20 from vector search, then asks gpt-5.4-mini to pick the best 5. Improves top-1 reliability on ambiguous queries.

cost ~$0.0017 / query
budget ~$5 / month at 100 q/d
paid by your key, your bill
Key handling — your API key never touches our database or logs. It's read from the HTTPS request header on each call and dropped immediately after. read the guarantees ↓
Have your OpenAI key ready · paste this into Claude Code
prompt
1Enable LLM reranking for trovex.231. Ask me for my OpenAI API key (starts with sk-). Do NOT proceed until4   I provide it. Treat the value as a secret — never echo it back to me5   in chat after the initial confirmation.62. Read my ~/.claude/settings.json and locate the existing "trovex" entry7   under mcpServers.83. Add the key as an additional header (merge, don't replace existing):910     "trovex": {11       "type": "http",12       "url": "https://trovex.prod.synergix.ch/mcp/",13       "headers": {14         "X-TROVEX-User": "<my-existing-handle>",15         "X-TROVEX-OpenAI-Key": "<my-sk-key>"16       }17     }18194. Tell me to restart Claude Code. After restart, trovex() calls will be20   reranked by gpt-5.4-mini. Verify by checking21   https://trovex.prod.synergix.ch/insights — my queries will be flagged22   as reranked.
Never stored, never logged
Read from HTTPS header per-request, dropped after the call returns. Not in DB, not in access logs, not in error traces.
Soft dependency, never blocking
If the LLM is slow, errors, or your quota runs out, trovex falls back to vector ranking. Your query never hangs.
You own the bill
Cost goes to your OpenAI account, never ours. Override the model via X-TROVEX-Rerank-Model if you want cheaper or stronger.
{# ── Verify ─────────────────────────────────────────────── #}

Verify it works

After restarting Claude Code, run this — you should get a relevant passage with its title > heading breadcrumb.

prompt
1Call trovex_search with query="auth JWT" and show me the raw output.
Then refresh overview — your handle appears in MCP usage.
{% endblock %}