Skip to content

MCP Server

drift-guard ships an MCP (Model Context Protocol) server that exposes schema diffing as tools for AI assistants such as Claude Desktop.

Running the server

sh
# Build
make build-mcp

# Or run directly
go run ./cmd/mcp-server

The server communicates over stdio and is registered in your MCP host's configuration file.

Claude Desktop configuration

Add drift-guard to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

json
{
  "mcpServers": {
    "drift-guard": {
      "command": "/path/to/drift-guard-mcp"
    }
  }
}

Available tools

diff_openapi

Compare two OpenAPI 3.x schema files (YAML or JSON).

ParameterRequiredDescription
base_fileYesPath to the base (old) schema file
head_fileYesPath to the head (new) schema file
formatNoOutput format: text (default), json, markdown

diff_graphql

Compare two GraphQL SDL schema files (.graphql or .gql).

ParameterRequiredDescription
base_fileYesPath to the base (old) schema file
head_fileYesPath to the head (new) schema file
formatNoOutput format: text (default), json, markdown

diff_grpc

Compare two Protobuf .proto files.

ParameterRequiredDescription
base_fileYesPath to the base (old) .proto file
head_fileYesPath to the head (new) .proto file
formatNoOutput format: text (default), json, markdown

detect_project

Detect the project type, framework, and available schema types for a directory.

ParameterRequiredDescription
dirYesAbsolute path to the project directory

Returns the detected framework (e.g. NestJS, Gin) and whether OpenAPI, GraphQL, and gRPC schemas are present.

Released under the MIT License.