Skip to content

Commit b3c9a3a

Browse files
Mcp docs (#17712)
## Description Creating preview documentation for Bicep MCP Server tools in VS Code. ### What's included: - **Complete MCP documentation** at docs/experimental/mcp-tools.md - **Step-by-step usage guide** with screenshots - **Three supporting images** showing Agent Mode, tool selection, and usage examples - **Proper contribution guidelines** with links to CONTRIBUTING.md and relevant GitHub issues - **Local image references** for better maintainability ### Features documented: - Available Bicep MCP tools (list_az_resource_types_for_provider, get_az_resource_type_schema, get_bicep_best_practices) - Prerequisites and installation instructions - Troubleshooting guidance - Usage limitations and safety notes - Contribution and feedback processes - Documentation placed in experimental folder as this is a preview feature - Images properly referenced and stored in docs/images folder - Contribution guidelines completed with proper issue links ## Checklist - [X] I have read and adhere to the [contribution guide](https://github.com/Azure/bicep/blob/main/CONTRIBUTING.md). --------- Co-authored-by: Anthony Martin <[email protected]>
1 parent 32a081b commit b3c9a3a

File tree

5 files changed

+59
-0
lines changed

5 files changed

+59
-0
lines changed

docs/experimental-features.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,7 @@ Command that allows the publishing of extensions to container registries. For mo
8484
### `snapshot` CLI Command
8585

8686
Generate a normalized list of resources to file, which can then be used to generate a visual diff for changes. For more information, see [Using the Snapshot Command](./experimental/snapshot-command.md).
87+
88+
### Bicep MCP Server
89+
90+
See [Using Bicep MCP Server in VS Code (Preview!)](./experimental/mcp-tools.md).

docs/experimental/mcp-tools.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Using Bicep MCP Server in VS Code (Preview!)
2+
3+
> [!NOTE]
4+
> This feature is currently in Preview while we collect feedback.
5+
6+
## What is it?
7+
The Bicep VS Code extension now includes a Bicep MCP server with agentic tools to support Bicep code generation for AI agents in VS Code. To find out more about MCP, see [Use MCP servers in VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
8+
9+
### Available Bicep MCP tools
10+
- `list_az_resource_types_for_provider`: Lists all available Azure resource types for a specific provider. The return value is a newline-separated list of resource types including their API version, e.g. `Microsoft.KeyVault/vaults@2024-11-01`. Such information is the most accurate and up-to-date as it is sourced from the Azure Resource Provider APIs.
11+
- `get_az_resource_type_schema`: Gets the schema for a specific Azure resource type and API version. Such information is the most accurate and up-to-date as it is sourced from the Azure Resource Provider APIs.
12+
- `get_bicep_best_practices`: Lists up-to-date recommended Bicep best-practices for authoring templates. These practices help improve maintainability, security, and reliability of your Bicep files. This is helpful additional context if you've been asked to generate Bicep code.
13+
14+
Please see below on how to contribute to the Bicep best practices tool.
15+
16+
17+
## How to use it?
18+
### Prerequisites
19+
- Install the latest version of the [Bicep VS Code Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep)
20+
- Confirm access to [Copilot in VS Code](https://code.visualstudio.com/docs/copilot/overview)
21+
22+
### Installing
23+
[Install the "Nightly" build](https://github.com/Azure/bicep/blob/main/docs/installing-nightly.md) of the Bicep extension. You should then automatically have access to the Bicep MCP server and all published tools in VS Code.
24+
25+
### Troubleshooting
26+
The Bicep server may not appear in your list of MCP servers and tools in VS Code until it has been triggered by a prompt. If you do not see the server, try providing a Bicep related-prompt in the Copilot chat window in "Agent" mode (as shown in Step #3 of the Viewing and Using Bicep Tools in the Bicep MCP Server section below).
27+
28+
## Viewing and Using Bicep Tools in the Bicep MCP Server
29+
1. Open the GitHub copilot extension window and select "Agent Mode".
30+
31+
![Agent Mode Selection](../images/mcp-agent-mode.png)
32+
33+
2. Click on the tool icon in the GitHub copilot chat window and search for "Bicep (PREVIEW)".
34+
35+
![Bicep MCP Tool Selection](../images/mcp-tool-selection.png)
36+
37+
3. Start using Agent Mode to help with your Bicep tasks!
38+
39+
![Bicep MCP Usage Example](../images/mcp-usage-example.png)
40+
41+
## Limitations
42+
> [!NOTE]
43+
> It is your responsibility to review all code generated by an LLM and **deploy at your own risk**.
44+
45+
These tools provide additional context to help the chosen model generate semantically and syntactically correct Bicep code. These tools are not designed to deploy directly to Azure.
46+
47+
There is no way to definitively guarantee whether the agent orchestrator will use any particular Bicep tool. As a workaround, you can view the available Bicep tools and use specific prompting to guide the agent orchestrator to invoke a tool (e.g. "Create a Bicep file to do X using Bicep best practices")
48+
49+
## Contributing and providing feedback
50+
These tools are early on and we value and welcome feedback to improve them. See `CONTRIBUTING.md` for guidelines.
51+
52+
In particular, we are looking to crowd source community wisdom on the `get_bicep_best_practices` tool. You can contribute to our forum on bicep best practices on [this Bicep Issue](https://github.com/Azure/bicep/issues/17660).
53+
54+
## Raising bugs or feature requests
55+
Please raise bug reports or feature requests under [Bicep Issues](https://github.com/Azure/bicep/issues) and tag with "story: bicep MCP".

docs/images/mcp-agent-mode.png

175 KB
Loading

docs/images/mcp-tool-selection.png

138 KB
Loading

docs/images/mcp-usage-example.png

191 KB
Loading

0 commit comments

Comments
 (0)