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.

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 two major categories of tools:

1. Deep Context Documents: static documents that provide dense and complete compilations
2. Granular Navigational Tools: more granular tools to aid in navigation and discovery

## Deep Context Tools

### get_architecture_guide
Returns a single page document describing the architecture of the whole codebase. Use at the beginning of a workflow.

### get_llm_onboarding_guide
Returns a document to onboard an LLM agent to the codebase quickly. Use at the beginning of a session.

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

## 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_file_documentation
Fetch complete symbol-level documentation for a file specified by path.

### 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. Read Deep Context Docs at the start of sessions and tasks
2. Use get_code_map and get_file_documentation in tandem for detailed discovery
3. Use get_changelog and get_detailed_changelog for historical context

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.