Skip to content

Atru/mcp server 1.0 ga#2566

Open
trujillo-adam wants to merge 13 commits into
mainfrom
atru/mcp-server-1.0-ga
Open

Atru/mcp server 1.0 ga#2566
trujillo-adam wants to merge 13 commits into
mainfrom
atru/mcp-server-1.0-ga

Conversation

@trujillo-adam
Copy link
Copy Markdown
Contributor

This PR increments the version for the Terraform MCP server documentation and creates separate topics for local and remote server deployments.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Vercel Previews Deployed

Name Status Preview Updated (UTC)
Dev Portal ✅ Ready (Inspect) Visit Preview Fri Jun 5 23:13:06 UTC 2026
Unified Docs API ✅ Ready (Inspect) Visit Preview Fri Jun 5 23:09:08 UTC 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Broken Link Checker

This PR contains broken links, but won't be blocked. Use this report to improve content quality:

Quick Actions

  • Internal links (HashiCorp sites): Please fix these - they impact user experience
  • External links: Consider if these are essential or can be updated/removed
  • Temporary issues: External sites may recover - check again before merging

Need Help?


Internal Links

Full Github Actions output

External Links

Summary

Status Count
🔍 Total 42
✅ Successful 12
⏳ Timeouts 0
🔀 Redirected 4
👻 Excluded 24
❓ Unknown 0
🚫 Errors 2
⛔ Unsupported 0

Errors per input

Errors in content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/local.mdx

Redirects per input

Redirects in content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/local.mdx

Full Github Actions output

@trujillo-adam trujillo-adam marked this pull request as ready for review June 3, 2026 17:49
@trujillo-adam trujillo-adam requested a review from a team as a code owner June 3, 2026 17:49
Copy link
Copy Markdown
Contributor

@mattschouten mattschouten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review in the time I had

Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/index.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/index.mdx Outdated

- **Hosting**: We recommend running the MCP Server locally at `127.0.0.1` through the STDIO or HTTP Streamable transport protocol to limit publicly exposing your Terraform environment. The default transport is set to STDIO. If you host the service remotely, we recommend implementing additional security controls at the application and network layers.
- **CORS**: By default, Terraform MCP server runs in `strict` CORS (cross-origin request) mode and the allowed origins are empty. As a result, all cross-origin requests are blocked unless the server is explicitly configured to allow them. Exercise caution when you need to change allowed origins list.
- **Terraform authentication**: The `TFE_SKIP_VERIFY` option is enabled by default. We recommend keeping the option enabled so that communication with your Terraform environment is encrypted. We also recommend limiting the permissions of the `TFE_TOKEN` used to authenticate as described in the Terraform documentation. Refer to [API tokens](/terraform/cloud-docs/users-teams-organizations/api-tokens) for more information.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused here on the TFE_SKIP_VERIFY option. The paragraph says it's enabled by default (good!) and that we recommend keeping it enabled (good!) - is there a reason someone might disable it? I think my confusion is basically "why are we mentioning it?"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe for testing purposes? @vravind1 - Do you have any insight about this item? I can see mentioning it if there is a case for reminding users who set this to true for some reason to switch it back to false. But why would you even disable encryption in the first place?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes for testing and local usage if needed

Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/index.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/index.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/remote.mdx Outdated

This topic describes how to deploy the Terraform Model Context Protocol (MCP) server into a remote environment so that you can centrally manage an instance of the server. This ensures that team members always have access to the same set of tools and that your organization can uniformly enforce security policies for accessing your registry and other platform resources.

For information about deploying the server locally, refer to [Deploy Terraform MCP server locallly](/terraform/mcp-server/deploy/local).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For information about deploying the server locally, refer to [Deploy Terraform MCP server locallly](/terraform/mcp-server/deploy/local).
For information about deploying the server locally, refer to [Deploy Terraform MCP server locally](/terraform/mcp-server/deploy/local).


### Docker container

To use the Terraform HCP server Docker image, you must have Docker Engine v20.10.21+ or Docker Desktop v4.14.0+ installed on the local machine. Refer to the [Docker documentation](https://docs.docker.com/desktop) for installation instructions.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To use the Terraform HCP server Docker image, you must have Docker Engine v20.10.21+ or Docker Desktop v4.14.0+ installed on the local machine. Refer to the [Docker documentation](https://docs.docker.com/desktop) for installation instructions.
To use the Terraform MCP server Docker image, you must have Docker Engine v20.10.21+ or Docker Desktop v4.14.0+ installed on the target machine. Refer to the [Docker documentation](https://docs.docker.com/desktop) for installation instructions.

Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/remote.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/remote.mdx Outdated

- **Hosting**: We recommend running the MCP Server locally at `127.0.0.1` through the STDIO or HTTP Streamable transport protocol to limit publicly exposing your Terraform environment. The default transport is set to STDIO. If you host the service remotely, we recommend implementing additional security controls at the application and network layers.
- **CORS**: By default, Terraform MCP server runs in `strict` CORS (cross-origin request) mode and the allowed origins are empty. As a result, all cross-origin requests are blocked unless the server is explicitly configured to allow them. Exercise caution when you need to change allowed origins list.
- **Terraform authentication**: The `TFE_SKIP_VERIFY` option is enabled by default. We recommend keeping the option enabled so that communication with your Terraform environment is encrypted. We also recommend limiting the permissions of the `TFE_TOKEN` used to authenticate as described in the Terraform documentation. Refer to [API tokens](/terraform/cloud-docs/users-teams-organizations/api-tokens) for more information.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the right var name is TFE_SKIP_TLS_VERIFY

Co-authored-by: Matt Schouten <matt.schouten@gmail.com>
Copy link
Copy Markdown
Contributor Author

@trujillo-adam trujillo-adam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattschouten @vravind1 @Shweta-Deshpande - I applied the feedback and responded to your comments with a few follow up questions.


- **Hosting**: We recommend running the MCP Server locally at `127.0.0.1` through the STDIO or HTTP Streamable transport protocol to limit publicly exposing your Terraform environment. The default transport is set to STDIO. If you host the service remotely, we recommend implementing additional security controls at the application and network layers.
- **CORS**: By default, Terraform MCP server runs in `strict` CORS (cross-origin request) mode and the allowed origins are empty. As a result, all cross-origin requests are blocked unless the server is explicitly configured to allow them. Exercise caution when you need to change allowed origins list.
- **Terraform authentication**: The `TFE_SKIP_VERIFY` option is enabled by default. We recommend keeping the option enabled so that communication with your Terraform environment is encrypted. We also recommend limiting the permissions of the `TFE_TOKEN` used to authenticate as described in the Terraform documentation. Refer to [API tokens](/terraform/cloud-docs/users-teams-organizations/api-tokens) for more information.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe for testing purposes? @vravind1 - Do you have any insight about this item? I can see mentioning it if there is a case for reminding users who set this to true for some reason to switch it back to false. But why would you even disable encryption in the first place?

Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/remote.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/index.mdx Outdated

</Tabs>

### Run without authentication
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vravind1 @Shweta-Deshpande - correct me if I'm wrong, but I think this is the wrong way to present this. Instead of auth vs w/o-auth, this should be connect to your registry or the public registry, right?

Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/local.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/local.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/remote.mdx Outdated
trujillo-adam and others added 2 commits June 4, 2026 15:56
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@mattschouten mattschouten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more observations as I went through again.

Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/prompt.mdx Outdated

## Threat model

You should be aware of the following potential threats to the Terraform MCP server.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It occurs to me that some of the token stuff that was talked about in comments/discussion on the deployment might be useful here. Especially if there's a remote MCP that's given a token...there's possibly data exfiltration or workspace-related mischief a user could do if they got access to a poorly secured MCP.

Could be a ticket for future changes to this doc.

Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/remote.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/remote.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/index.mdx Outdated

- **Hosting**: We recommend running the MCP server locally at `127.0.0.1` through the STDIO or HTTP Streamable transport protocol to limit publicly exposing your Terraform environment. The default transport is set to STDIO. If you host the service remotely, we recommend implementing additional security controls at the application and network layers.
- **CORS**: By default, Terraform MCP server runs in `strict` CORS (cross-origin request) mode and the allowed origins are empty. As a result, all cross-origin requests are blocked unless the server is explicitly configured to allow them. Exercise caution when changing the allowed origins list.
- **Terraform authentication**: The `TFE_SKIP_TLS_VERIFY` option is set to `false` by default so that communication with your Terraform environment is encrypted. If you temporarily set this option to `true` for testing or other use cases, we strongly recommend resetting to `false` to ensure that encryption is enabled. We also recommend limiting the permissions of the `TFE_TOKEN` used to authenticate as described in the Terraform documentation. Refer to [API tokens](/terraform/cloud-docs/users-teams-organizations/api-tokens) for more information.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does skipping verification actually disable encryption, or does it just continue with operations even if the certificate isn't valid (self-signed, expired, etc)? Agree w/ the advice but just want to make sure we're being accurate.

Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/index.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/index.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/index.mdx Outdated
| `TFE_TOKEN` | Terraform Enterprise API token | `""` (empty) |
| `TFE_SKIP_TLS_VERIFY` | Skip HCP Terraform or Terraform Enterprise TLS verification | `false` |
| `TRANSPORT_MODE` | Set to `streamable-http` to enable HTTP transport (legacy `http`) | `stdio` |
| `TRANSPORT_HOST` | Host to bind the HTTP server | `127.0.0.1` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `TRANSPORT_HOST` | Host to bind the HTTP server | `127.0.0.1` |
| `TRANSPORT_HOST` | Host to bind the HTTP server. Set to `0.0.0.0` to bind to all interfaces | `127.0.0.1` |

What do you think about this clarification? I don't believe this is called out anywhere else in the docs

- `plan_only`: Creates a plan without applying
- `allow_empty_apply`: Allows applying when no changes are detected

When `ENABLE_TF_OPERATIONS` is set to `true`, the following additional options become available:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When `ENABLE_TF_OPERATIONS` is set to `true`, the following additional options become available:
When you set `ENABLE_TF_OPERATIONS` to `true`, the following additional options become available:


## Telemetry metrics

When enabled, Terraform MCP server collects the following metrics:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When enabled, Terraform MCP server collects the following metrics:
When enabled, the Terraform MCP server collects the following metrics:


| Type | Emitted metrics | Notes |
| --- | --- | --- |
| Standard HTTP server metrics | <ul><li>`http.server.request.body.size`</li><li>`http.server.response.body.size`</li><li> `http.server.request.duration`</li></ul> | The server wraps the HTTP mux with `otelhttp.NewHandler(...)` to emit the metrics. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The server wraps the HTTP mux with otelhttp.NewHandler(...) to emit the metrics.

This is a little outside my wheelhouse, but is this relevant to the user? IMO this reads more like a note that someone working on the server code itself would be concerned with. Would something like "The server emits these metrics using OpenTelemetry" be more relevant to the end user?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not sure how in the weeds we need to get, so we've kept this as is. Maybe it's helpful for people making custom integrations.

Comment on lines +48 to +49
- **Foundational model**: Concerns related to the underlying AI models, training data, and inherent vulnerabilities.
- **Infrastructure deployment**: Concerns related to the security of infrastructure, network and software environments configuration and deployment through the output of the model should always be reviewed prior to any change application.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WTF formatting, we have a couple instances in the docs (I believe the deployment docs) where we don't bold these leading phrases. Might be worth a quick check to make this consistent if we have time before publishing.

Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/index.mdx Outdated
Comment thread content/terraform-mcp-server/v1.0.x/docs/mcp-server/deploy/index.mdx Outdated
trujillo-adam and others added 2 commits June 5, 2026 11:43
Co-authored-by: Brian McClain <brianmmcclain@gmail.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
trujillo-adam and others added 3 commits June 5, 2026 15:07
Co-authored-by: Matt Schouten <matt.schouten@gmail.com>
Co-authored-by: Brian McClain <brianmmcclain@gmail.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
@trujillo-adam trujillo-adam dismissed vravind1’s stale review June 5, 2026 23:33

Applied the required changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants