MCP Setup

Agent Instructions

MCP configuration connects your editor to Driver. Agent instructions tell the AI how to use Driver's tools. Without instructions, agents may ignore Driver or use its tools inefficiently.

What Agent Instructions Do

Agent instructions are markdown files that your AI coding agent reads at the start of every session. They tell the agent to:

  1. Prioritize Driver's MCP tools over ad-hoc file search and grep
  2. Resolve the codebase name by calling get_codebase_names and matching against the local directory
  3. Follow a structured workflow: orient first, then navigate, then execute
  4. Use the right tool for the job: deep context documents for broad understanding, granular tools for specific files

File Locations

Claude Code

Add the instructions to CLAUDE.md in your project root. If the file already exists, append the Driver section.

Cursor

Create .cursor/rules/driver-mcp-rules.mdc in your project root with this frontmatter:

yaml
---
description: Instructions for using the 'Driver MCP Server' mcp server
globs:
alwaysApply: true
---

Then add the instructions below the frontmatter.

VS Code + Copilot

Add the instructions to .github/copilot-instructions.md in your project root. If the file already exists, append the Driver section.

Other agents

Add the instructions to AGENTS.md in your project root, which several agents read by convention. If the file already exists, append the Driver section.

The Instructions

The following instructions are the same across all editors. Copy the full block into your agent instructions file. You can also run the /driver_init prompt from the slash menu in your editor to load these instructions into the current session without creating a file.

markdown
# MCP Tools for This Project

## Available Tools

Driver is a toolset that provides pre-computed and dense information about codebases, exposed through MCP. Prioritize use of Driver's MCP tools.

Use the get_codebase_names tool to get a list of codebases supported by Driver, then match your local context against the valid list.

There are four kinds of tools:

1. The context agent: one request that returns a task-specific brief.
2. Atlas: a thematic map of the codebase and the section pages beneath it.
3. Granular navigation: tools for discovery and exact source.
4. Change history: how the codebase got to its current shape.

## The Context Agent

### request_context
Submits a task and returns a request ID immediately. Give it what you are trying to accomplish and the codebases it touches. Prefer this over assembling context yourself.

### poll_context
Retrieves the result of a request_context call. Runs typically take one to three minutes; poll every 20 to 30 seconds and do other work in between.

## Atlas Tools

### get_atlas_index
Returns a thematic map of the codebase organized by what its subsystems do, rather than by directory. Use at the start of a session for orientation.

### get_atlas_detail
Opens one section that the index advertises, returning its narrative, coupling rules, and member files. Also accepts a repo-relative file path to find which sections own that file.

## Granular Navigation Tools

### get_code_map
A navigable tree structure queryable at any directory, returning descriptions and metadata for files and children up to a specified depth.

### get_related
Returns how a file or directory connects to the rest of the codebase: dependency, mirror, and co-change edges, each with a coupling verdict.

### change_impact
Reports the blast radius of changing a symbol, including which tests to run.

### get_source_file
Reads the exact source of a file, with line numbers.

### grep_source
Searches the codebase source with a regular expression.

## Change History Tools

### get_changelog
Returns an exhaustive change log broken down by year and month. Use when historical development context is valuable.

### get_detailed_changelog
Fetch detailed commit-level information for a particular month and year. Call get_changelog first.

## Other Utility Tools

### get_codebase_names
Returns all codebases supported by Driver. Call before using any other Driver tools.

## Suggested Workflows

1. Call request_context first for anything non-trivial, then poll_context for the brief
2. Read get_atlas_index at the start of a session, then get_atlas_detail for the sections that matter
3. Use get_code_map and get_related in tandem for detailed discovery
4. Use get_changelog and get_detailed_changelog for how the code got to its current shape

Why This Matters

Without agent instructions, your AI agent treats Driver as one of many available tools and may not use it at all. With instructions, the agent:

  • Reads architecture and onboarding documents at the start of every task
  • Uses code maps instead of searching files manually
  • Checks development history before modifying unfamiliar code
  • Resolves the correct codebase name automatically

This is the difference between an agent that guesses and one that understands your codebase.