Integration

Thruline + Claude Code

Claude Code is Anthropic's terminal-native coding agent. It speaks Model Context Protocol natively, which means Thruline plugs in cleanly: your agent gets architectural awareness, convention knowledge, and co-change detection without any custom glue. The result is an agent that writes code that actually fits your repo.

What you get

  • Convention-aware code generation. Claude consults Thruline before editing a file, so the code it writes lines up with the patterns your team already uses.
  • Blast-radius checks. Before making cross-cutting changes, Claude can ask Thruline what else historically moves with the file it's touching.
  • Pre-commit changeset review. Claude can run thruline_review_changeset against your staged files to catch missing co-changes before you push.
  • Lower token consumption. Claude stops aimlessly grepping for context. Thruline returns one structured answer, and Claude gets back to writing code.

Setup

1. Add the MCP server

Create a .mcp.json file at the root of your repo (or edit it if it already exists):

{
  "mcpServers": {
    "thruline": {
      "type": "http",
      "url": "https://mcp.thrulinecontext.com/mcp"
    }
  }
}

2. Authenticate

The first time Claude Code connects to Thruline it opens a browser window for GitHub OAuth. Sign in with the same GitHub account you used for Thruline. If your session ever expires, run /mcp in Claude Code to reconnect.

3. Index your repository

Ask Claude to index your repo:

"Index my repo with Thruline — it's owner/repo-name."

Indexing takes 1–3 minutes depending on size. You'll get an email when it finishes. After that, indexing is incremental and runs automatically as commits land.

4. Start coding

That's it. Thruline's MCP server tells Claude how to use it via the protocol's instructions hook. Claude will consult Thruline before editing files, before answering architecture questions, and before committing — no extra prompting needed.

Tools available to Claude

ToolWhat Claude uses it for
thruline_indexIndex a repository for the first time, or re-index after major changes
thruline_reviewGet domain, conventions, connected files, and git history for a specific file before editing it
thruline_review_changesetCheck a set of changed files for missing co-changes, consistency issues, and domain crossings before commit
thruline_get_domainsList all architectural domains discovered in the repository
thruline_get_segmentsList code segments with their conventions and file summaries
thruline_get_networkGet the domain connection graph showing how areas of the codebase relate
thruline_get_findingsRetrieve commit and domain activity for a repository
thruline_report_findingsReport issues found during review so Thruline can strengthen its connection weights

How it feels in practice

Before editing a file

Claude calls thruline_review on the file it's about to touch. Thruline returns the file's domain, the conventions in that domain, what other files historically change with it, and the relevant slice of git history. Claude incorporates that into the code it generates.

Before answering architecture questions

Claude calls thruline_get_domains or thruline_get_network instead of guessing from filenames. Answers are grounded in Thruline's domain map.

Before committing

Claude can run thruline_review_changeset against your staged changes. If you updated a model but forgot the serializer, that gets surfaced before the PR opens.

Continuous learning

When Claude calls thruline_report_findings after a review, Thruline strengthens the connection weights between domains that produced useful findings. Over time, the system converges on the relationships that actually matter for your repo.

Troubleshooting

  • Session expired — run /mcp in Claude Code to reconnect. Sessions auto-reconnect after server restarts.
  • Repository not indexed — ask Claude to run thruline_index with your repo name in owner/repo format.
  • Tools not appearing — check that .mcp.json is in your project root and the URL matches the snippet above.

Make Claude Code feel like part of your team.

Sign Up Today Read the setup docs →