MCP integration

The Model Context Protocol (MCP) is an open protocol that enables large language models to interact with applications through standardized interfaces.

Chef-cli provides MCP integration through the chef-cli mcp initial-mapping subcommand. This integration allows AI assistants to programmatically edit and test initial domain mapping files.

Limitations

MCP integration is experimental. Functionality may vary across different AI models and MCP clients.

Cursor and Claude Code demonstrate reliable performance with this integration. AI assistants can prepare initial domain mappings with significant autonomy, though developer oversight remains essential.

Prerequisites

  • Chef-cli installed and configured
  • MCP-compatible client (Cursor, Claude Code, etc.)
  • External domain metadata file

Configuration

Create a mcp.json file with the following content:

1{
2 "mcpServers": {
3 "AirSync": {
4 "command": "chef-cli",
5 "args": [
6 "mcp",
7 "initial-mapping"
8 ]
9 }
10 }
11}

Cursor setup

  1. Place mcp.json in your .cursor directory (typically ~/.cursor/mcp.json).
  2. Restart Cursor.
  3. In Agent mode, specify the initial domain mapping file location. a. Use absolute file paths for optimal results. b. Alternatively, provide an existing initial domain mapping file.
  4. Direct the AI to create the initial domain mappings.
  5. Run initial-mapping check to validate initial domain mappings against the local domain metadata file.

Add DevRev’s AirSync documentation to your MCP server by including https://developer.devrev.ai/public/airsync/ as a custom docs URL.

See Cursor documentation for details.

Claude Code setup

  1. Run claude mcp add airsync chef-cli mcp initial-mapping.
  2. Start Claude Code.
  3. Specify the initial domain mapping file location. a. Alternatively, provide an existing initial domain mapping file.
  4. Direct the AI to create the initial domain mappings.
  5. Run initial-mapping check to validate initial domain mappings against the local domain metadata file.

Other IDEs

You can use the same mcp.json file in other IDEs that support MCP servers.

Usage guidelines

Provide these instructions to your AI assistant when using the MCP server:

1When performing AirSync initial mapping:
2
3- Use `metadata.json` for external domain metadata.
4- Use `mappings.json` as the initial domain mapping file.
5- Call `use_mapping` to test how the initial mapping behaves on the current metadata.
6- Use MCP tools for:
7 - Adding and removing record type mappings
8 - Unmapping fields
9 - Mapping simple fields
10- For complex field mappings, edit the mapping file directly:
11 - Refer to `initial_mappings_schema.yaml` for proper format.
12 - Always call `use_mapping` to verify the mapping file remains valid.

Adjust file paths according to your project structure.

Available operations

The MCP server provides the following tools:

  • Test mappings against metadata files
  • Add and remove record type mappings
  • Map and unmap fields
  • Validate mapping file structure