Skip to content

Commit cfa83bc

Browse files
authored
enh: Add MCP documentation (#235)
* Add mcp * Add link * Address comments * Add other IDEs * Move limitations to top * Clarify export button * Nit
1 parent 0343fa2 commit cfa83bc

File tree

3 files changed

+101
-1
lines changed

3 files changed

+101
-1
lines changed

fern/docs/pages/airdrop/initial-domain-mapping.mdx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ The initial domain mapping is installed with your snap-in.
77
On each snap-in version update, function to upload these mappings to the Airdrop
88
system is triggered.
99

10+
## Approaches
11+
12+
You can create initial domain mappings using two methods:
13+
14+
1. **Chef-cli UI**: Interactive web interface for comprehensive mapping creation
15+
2. **Model Context Protocol (MCP)**: AI-assisted mapping creation for developers (experimental)
16+
17+
Choose the chef-cli UI for manual control or use MCP for rapid prototyping with AI assistance.
18+
MCP is an experimental feature and works locally without requiring a sync to be created.
19+
20+
<Info>
21+
For AI-assisted mapping creation, see the [Model Context Protocol integration guide](./mcp.mdx).
22+
</Info>
23+
1024
## Chef-cli initial domain mapping setup
1125

1226
### Prerequisites
@@ -95,7 +109,7 @@ After the blueprint of the test import is completed, the *Install in this org* b
95109

96110
By repeating this process (run a new import, create a different configuration, merge to the initial mappings), you can create an initial mapping that contains multiple options for the user to choose from.
97111

98-
Finally, the Export button allows you to retrieve the `initial_domain_mapping.json`.
112+
Finally, when all the fields are mapped without deficiencies and the blueprint is installed, the Export button allows you to retrieve the `initial_domain_mapping.json`.
99113

100114
<Tip>
101115
You can also provide a local metadata file to the command using the `-m` flag, for example:

fern/docs/pages/airdrop/mcp.mdx

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
The Model Context Protocol (MCP) is an open protocol that enables large language models to interact with applications through standardized interfaces.
2+
3+
Chef-cli provides MCP integration through the `chef-cli mcp initial-mapping` subcommand.
4+
This integration allows AI assistants to programmatically edit and test initial domain mapping files.
5+
6+
## Limitations
7+
8+
<Warning>
9+
MCP integration is experimental. Functionality may vary across different AI models and MCP clients.
10+
</Warning>
11+
12+
Testing shows good results with Cursor and Claude Code. The AI can prepare initial mappings with significant autonomy, though developer oversight remains essential.
13+
14+
## Prerequisites
15+
16+
- Chef-cli installed and configured
17+
- MCP-compatible client (Cursor, Claude Code, etc.)
18+
- External domain metadata file
19+
- Empty or partially populated initial domain mapping file
20+
21+
## Configuration
22+
23+
Create a `.mcp.json` file with the following content:
24+
25+
```json
26+
{
27+
"mcpServers": {
28+
"airdrop": {
29+
"command": "chef-cli",
30+
"args": [
31+
"mcp initial-mapping"
32+
]
33+
}
34+
}
35+
}
36+
```
37+
38+
### Cursor setup
39+
40+
1. Provide `.cursor/mcp.json` in your project root.
41+
2. Using the editor Agent mode point the AI to the initial domain mapping file.
42+
3. Use the editor to guide the AI to create the initial domain mappings.
43+
4. Use `initial-mapping check` to test the initial domain mappings against the local domain metadata file.
44+
45+
### Claude Code setup
46+
47+
1. Provide `.mcp.json` in your project root.
48+
2. Using the editor point the AI to the initial domain mapping file.
49+
3. Use the editor to guide the AI to create the initial domain mappings.
50+
4. Use `initial-mapping check` to test the initial domain mappings against the local domain metadata file.
51+
52+
### Other IDEs
53+
54+
You can use the same `.mcp.json` file in other IDEs that support MCP.
55+
56+
## Usage guidelines
57+
58+
To guide the AI tool, provide the following instructions to your AI assistant:
59+
60+
```markdown
61+
When asked to perform airdrop initial mapping:
62+
63+
- Refer to the `metadata.json` for the external domain metadata.
64+
- Use `mappings.json` as your initial domain mapping file.
65+
- Call 'use_mapping' to test out how the initial mapping behaves on the current metadata
66+
- Use MCP tools to manipulate the initial mapping when adding and removing record type mappings, or unmapping fields or mapping simple fields.
67+
For more complex field mappings you may edit the mapping file directly.
68+
Refer to the `initial_mappings_schema.yaml` for its proper format.
69+
- If doing so, always use 'use_mapping' to verify the mapping file is still valid.
70+
```
71+
72+
Adjust file paths according to your project structure.
73+
74+
## Available operations
75+
76+
The MCP server provides tools for:
77+
78+
- Testing mappings against metadata
79+
- Adding and removing record type mappings
80+
- Field mapping and unmapping operations
81+
- Validation of mapping file structure
82+
- Testing initial domain mapping files against local metadata files
83+

fern/versions/public.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ navigation:
326326
- page: "Publish to the marketplace"
327327
slug: publish-to-marketplace
328328
path: ../docs/pages/airdrop/publish-to-marketplace.mdx
329+
- page: "MCP integration"
330+
slug: mcp
331+
path: ../docs/pages/airdrop/mcp.mdx
329332
- page: "Common issues"
330333
slug: faq
331334
path: ../docs/pages/airdrop/faq.mdx

0 commit comments

Comments
 (0)