-
Notifications
You must be signed in to change notification settings - Fork 46
Updating documentation for Terraform MCP Server #693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Vercel Previews Deployed
|
Broken Link CheckerSummary
Errors per inputErrors in content/terraform-docs-common/docs/docs/tools/mcp-server/index.mdx
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. The additions and edits to the overview page are great.
The changes introduce some inconsistencies with our information architecture principles and styles. I didn't make suggestions for all of the style guide violations, but we can address them after you've had a chance to process this feedback.
|
||
@include 'beta.mdx' | ||
|
||
## Overview | ||
|
||
Complete the following steps to deploy the server. | ||
The Terraform MCP server is a specialized service that provides AI models with access to current Terraform provider documentation and module information. You can deploy the server in two environments: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Terraform MCP server is a specialized service that provides AI models with access to current Terraform provider documentation and module information. You can deploy the server in two environments: | |
The Terraform MCP server is a specialized service that provides AI models with access to current Terraform provider documentation and module information. You can deploy the server in to the following environments: |
|
||
When you connect an AI model to the Terraform MCP server, the model gains access to specialized tools that can: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you connect an AI model to the Terraform MCP server, the model gains access to specialized tools that can: | |
When you connect an AI model to the Terraform MCP server, the model gains access to specialized tools that can perform the following actions: |
1. **Search and retrieve** current provider documentation | ||
2. **Access module information** including inputs, outputs, and examples | ||
3. **Find Sentinel policies** for governance and compliance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. **Search and retrieve** current provider documentation | |
2. **Access module information** including inputs, outputs, and examples | |
3. **Find Sentinel policies** for governance and compliance | |
1. Search and retrieve current provider documentation | |
1. Access module information, including inputs, outputs, and examples | |
1. Find Sentinel policies for governance and compliance |
|
||
**Important note**: The server specifically handles registry-based information. For general Terraform questions or code generation requests not requiring registry data, AI models use their standard training data and other sources. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Important note**: The server specifically handles registry-based information. For general Terraform questions or code generation requests not requiring registry data, AI models use their standard training data and other sources. | |
The server specifically handles registry-based information. For general Terraform questions or code generation requests not requiring registry data, AI models use their standard training data and other sources. |
|
||
The following table describes tools available in the Terraform MCP server: | ||
Setting up and using the Terraform MCP server involves three main steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting up and using the Terraform MCP server involves three main steps: | |
Complete the following steps to set up the Terraform MCP server: |
```shell-session | ||
$ go install github.com/hashicorp/terraform-mcp-server/cmd/terraform-mcp-server@main | ||
``` | ||
|
||
After pulling the image, add the following JSON block to your client and specify the path to the server binary in the `command` attribute: | ||
**Client configuration:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Client configuration:** |
|
||
After installation, add this configuration to your client: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After installation, add this configuration to your client: | |
After installation, add the following configuration to your client: |
It would be ideal to use an ordered list for this section. Bolded text as headings is inconsistent with our formatting styles.
- Pull the source
- Configure the client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes but the two choices above are either/or ... if we order list them it'll feel like users have to do both step-by-step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the bolded text headings though
| `MCP_ALLOWED_ORIGINS` | CORS allowed origins | `""` (none) | `https://app.terraform.io` | | ||
| `MCP_CORS_MODE` | CORS policy enforcement | `strict` | `development` | | ||
|
||
**Note:** The legacy `TRANSPORT_MODE=http` value is still supported but `streamable-http` is recommended for new deployments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Note:** The legacy `TRANSPORT_MODE=http` value is still supported but `streamable-http` is recommended for new deployments. |
|
||
| Variable | Purpose | Default Value | Example | | ||
|----------|---------|---------------|---------| | ||
| `TRANSPORT_MODE` | Communication protocol | `stdio` | `streamable-http` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `TRANSPORT_MODE` | Communication protocol | `stdio` | `streamable-http` | | |
| `TRANSPORT_MODE` | Communication protocol. The legacy `http` value is still supported, but we recommend `streamable-http` for new deployments. | `stdio` | `streamable-http` | |
Start or restart Docker to start the container using the standard transport. | ||
The binary location depends on your Go installation and `GOPATH` configuration. Use `which terraform-mcp-server` to find the installed binary path. | ||
|
||
## Configuration options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Configuration options | |
## Configuration reference | |
You can configure the following options when deploying the MCP server. |
We should move this section to a new reference.mdx
page. At the very least, we should place this section after Next steps, which marks the end of the instructions. This page would still be half instructions and half reference, but at least the reference would appear at the bottom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, on second read I don't think we should have a second file for the reference because we use these options during the deployment itself, meaning these should be considered during deployment.
It's unlike other tools where you interact with flags or other things after deployment
No description provided.