Skip to content

Commit 9133cd2

Browse files
Terraform mcp server versioned docs (#949)
Along with [PR-2835](hashicorp/dev-portal#2835), this PR adds the Terraform MCP server as a new collection of versioned documentation. We are launching with 0.3.x as the latest version. @gautambaghel will backfill older versions. [Latest preview](https://dev-portal-i9p1ceqr4-hashicorp.vercel.app/terraform/mcp-server)
2 parents 439220a + ca2b7d4 commit 9133cd2

File tree

17 files changed

+68
-45
lines changed

17 files changed

+68
-45
lines changed

.github/labeler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ Terraform Enterprise:
4545
'content/terraform-enterprise/**'
4646
]
4747

48+
Terraform MCP Server:
49+
- any:
50+
- changed-files:
51+
- any-glob-to-any-file: [
52+
'content/terraform-mcp-server/**'
53+
]
54+
4855
Terraform migrate:
4956
- any:
5057
- changed-files:

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
/content/terraform-plugin-sdk @hashicorp/terraform-devex @hashicorp/terraform-education
1212
/content/terraform-plugin-testing @hashicorp/terraform-devex @hashicorp/terraform-education
1313
/content/terraform-docs-agents @hashicorp/team-hcpt-agent-engineering
14+
/content/terraform-mcp-server @hashicorp/team-docs-packer-and-terraform
1415
/content/terraform-migrate @hashicorp/team-docs-packer-and-terraform
1516
/content/terraform-cdk @hashicorp/cdktf
1617

__fixtures__/productConfig.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,16 @@ export const PRODUCT_CONFIG = {
241241
versionedDocs: true,
242242
websiteDir: 'website',
243243
},
244+
'terraform-mcp-server': {
245+
assetDir: 'img',
246+
basePaths: ['mcp-server'],
247+
contentDir: 'docs',
248+
dataDir: 'data',
249+
productSlug: 'terraform',
250+
semverCoerce: semver.coerce,
251+
versionedDocs: true,
252+
websiteDir: 'website',
253+
},
244254
'terraform-migrate': {
245255
assetDir: 'img',
246256
basePaths: ['migrate'],

content/terraform-docs-common/data/cloud-docs-nav-data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{
2525
"title": "Get started",
2626
"href": "https://learn.hashicorp.com/collections/terraform/cloud-get-started?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS"
27-
},
27+
},
2828
{
2929
"title": "Migrate to HCP Terraform",
3030
"path": "migrate"

content/terraform-docs-common/data/docs-nav-data.json

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,7 @@
1717
},
1818
{
1919
"title": "Terraform Tools",
20-
"routes": [
21-
{
22-
"title": "Overview",
23-
"path": "tools"
24-
},
25-
{
26-
"title": "Terraform MCP server",
27-
"badge": {
28-
"text": "BETA",
29-
"type": "outlined",
30-
"color": "neutral"
31-
},
32-
"routes": [
33-
{
34-
"title": "Overview",
35-
"path": "tools/mcp-server"
36-
},
37-
{
38-
"title": "Deploy server",
39-
"path": "tools/mcp-server/deploy"
40-
},
41-
{
42-
"title": "Prompt model",
43-
"path": "tools/mcp-server/prompt"
44-
},
45-
{
46-
"title": "Security",
47-
"path": "tools/mcp-server/security"
48-
},
49-
{
50-
"title": "Reference",
51-
"path": "tools/mcp-server/reference"
52-
}
53-
]
54-
}
55-
]
20+
"path": "tools"
5621
},
5722
{ "title": "Glossary", "path": "glossary" }
5823
]

content/terraform-docs-common/docs/docs/tools/index.mdx renamed to content/terraform-docs-common/docs/docs/tools.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Terraform is part of a rich infrastructure and DevOps ecosystem. The tools below
1616
|[Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform) | HashiCorp | Enable syntax highlighting and other editing features in VS Code using the Terraform Language Server.| |
1717
|[Language Server](https://github.com/hashicorp/terraform-ls) | HashiCorp | Add support for the Terraform configuration language to editors that use the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), like Sublime Text, vim, emacs, etc.| |
1818
|[console](/terraform/cli/commands/console) | HashiCorp | Evaluate Terraform expressions and explore your Terraform project's state. The console helps you develop and debug your configuration, especially when working with complex state data and Terraform expressions.| [Develop Configuration with the Console](/terraform/tutorials/cli/console) |
19-
| [Terraform MCP server](/terraform/docs/tools/mcp-server) | HashiCorp | Helps you use an AI or LLM to write Terraform configuration by retrieving data directly from the Terraform registry. | |
19+
| [Terraform MCP server](/terraform/mcp-server) | HashiCorp | Helps you use an AI or LLM to write Terraform configuration by retrieving data directly from the Terraform registry. | |
2020

2121

2222
## Manage Infrastructure

content/terraform-docs-common/redirects.jsonc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,17 @@
660660
"destination": "/terraform/migrate/reference/configuration",
661661
"permanent": true
662662
},
663+
// Move MCP server to new versioned space
664+
{
665+
"source": "/terraform/docs/tools/mcp-server",
666+
"destination": "terraform/mcp-server",
667+
"permanent": true
668+
},
669+
{
670+
"source": "/terraform/docs/tools/mcp-server/:slug*",
671+
"destination": "terraform/mcp-server/:slug*",
672+
"permanent": true
673+
},
663674
{
664675
"source": "/terraform/language/stacks/create/config",
665676
"destination": "/terraform/language/stacks/component/config",
@@ -720,7 +731,6 @@
720731
"destination": "/terraform/language/v:version/block/stack/deploy",
721732
"permanent": true
722733
},
723-
724734
{
725735
"source": "/terraform/language/stacks/reference/tfstacks-cli",
726736
"destination": "/terraform/cli/commands/stacks",
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[
2+
{
3+
"heading": "Terraform MCP Server"
4+
},
5+
{
6+
"title": "Overview",
7+
"path": ""
8+
},
9+
{
10+
"title": "Deploy",
11+
"path": "deploy"
12+
},
13+
{
14+
"title": "Prompt",
15+
"path": "prompt"
16+
},
17+
{
18+
"title": "Security",
19+
"path": "security"
20+
},
21+
{
22+
"title": "Reference",
23+
"path": "reference"
24+
}
25+
]

content/terraform-docs-common/docs/docs/tools/mcp-server/deploy.mdx renamed to content/terraform-mcp-server/v0.3.x/docs/mcp-server/deploy.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ description: |-
88

99
The Terraform Model Context Protocol (MCP) server enables AI models to generate Terraform configuration using up-to-date information from the Terraform Registry. This page explains how to install, configure, and integrate the MCP server with your AI client.
1010

11-
@include 'beta.mdx'
12-
1311
## Overview
1412

1513
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 to the following environments:

content/terraform-docs-common/docs/docs/tools/mcp-server/index.mdx renamed to content/terraform-mcp-server/v0.3.x/docs/mcp-server/index.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ description: Learn about the Terraform model context protocol (MCP) server and h
77

88
The Terraform Model Context Protocol (MCP) server enhances AI models with real-time access to current Terraform provider documentation, modules, and policies from the [Terraform registry](https://registry.terraform.io). This ensures AI-generated Terraform configurations use accurate, up-to-date information rather than potentially outdated training data.
99

10-
@include 'beta.mdx'
11-
1210
## What is the Terraform MCP server?
1311

1412
The Model Context Protocol (MCP) is an open standard that enables AI models to securely connect with external tools, applications, and data sources. MCP allows AI models to access information beyond their training data, providing more current and accurate responses.

0 commit comments

Comments
 (0)