Start with one Global Detour
Put the rules that apply everywhere in a single Global Detour: how you review, what never ships, how you name things. Add a Project Detour for each repository only when it has context of its own.
User guide
How to get useful context into your AI tools once Detour is running. Not running yet? Start with the quick start.
Detour is a small app that runs in Docker on your computer. You save the context your AI tools do not carry between sessions: rules, decisions, runbooks, prompts, skills, and notes. Your AI tool then retrieves it through a local, read-only MCP connection when the work needs it.
Context is grouped into Detours:
When rules conflict, Global outranks Project and Project outranks Sub-detour. Nothing leaves your computer unless you export a bundle yourself.
Endpoint: http://127.0.0.1:3788/mcp
Header: Authorization: Bearer <YOUR_DETOUR_KEY>Connections shows ready-to-copy configuration for VS Code, Codex, Claude Code, Claude Desktop, and Cursor.Detour gives your tool four read-only tools:
list_detour_routesLists your Detours with scope so the AI can pick the right one.get_detour_routeReturns one Detour's context with Global and parent context ranked above it.search_detour_artifactsSearches saved context by title, body, or tag.get_detour_artifactReads one saved item in full.Detour cannot run commands, change files, or write data through MCP.
Put the rules that apply everywhere in a single Global Detour: how you review, what never ships, how you name things. Add a Project Detour for each repository only when it has context of its own.
Decisions, runbooks, review checklists, conventions, prompts, and skills retrieve well. Chat transcripts and scratch notes rarely do. If you would tell a new teammate, save it.
Set non-secret flags such as NEVER_DELETE=true or TF_WORKSPACE=staging in Settings for every Detour, or on one Detour to override it. They reach your AI with the rest of the context. Names that look like secrets are rejected.
Define a tag set such as Stage: development, staging, production. Once a set applies, new items can only use its tags, so search keeps working and near-duplicates never appear.
Tell your AI to check Detour before a change, before a commit, before a pull request, and before anything public. For example: “Check my Detour for this project before you edit anything.”
Detour is for guidance, not credentials. Do not save passwords, tokens, customer records, regulated data, or confidential employer data unless your organization has approved it.
What Detour returns is context, never permission. Your AI tool still decides what to run and should still ask before destructive actions.
Create one key per AI tool on each machine and name it clearly. Revoke a key when you stop using that tool; the others keep working.
Set these as environment variables when starting Compose. Defaults are shown; the secure defaults should rarely change.
DETOUR_MCP_AUTH_MODEkey · Set to off only on a trusted offline machine. Keys are required otherwise.DETOUR_MCP_ALLOW_STDIOfalse · Allows stdio transport. Refused while key authentication is on.DETOUR_ENABLE_NESTED_DETOURSfalse · Enables Sub-detours beneath Project Detours.DETOUR_USER_NAMELocal user · Display name in the portal.Both ports bind to 127.0.0.1. Do not expose them through a proxy, tunnel, or 0.0.0.0; the portal has no login.
/data/detour.sqlite, in the detour-data volume. Rebuilds and restarts keep it.Check the endpoint is http://127.0.0.1:3788/mcp, the header is Authorization: Bearer followed by your key, and the key is still active under Connections. Restart the AI tool after changing its configuration.
Expected. Detour listens only on this computer, so browser-based and cloud-hosted assistants cannot reach it. Use a desktop or command-line tool on the same machine.
Keys are shown once and only a hash is stored. Revoke the lost key under Connections and create a new one.
Flag names must be uppercase letters, numbers, and underscores, and cannot look like a secret (TOKEN, PASSWORD, SECRET, API_KEY). Tags must belong to a tag set that applies to the Detour.