Terraform CWD MCP Server
Check Terraform provider schemas, plans and state against what your lock file pins
- Pricing
- Open source
- Platforms
- CLI
- Runs
- Locally
- Version
- 0.1.4
- Listing updated
- 2 days ago
About Terraform CWD MCP Server
Terraform CWD MCP Server is an open-source MCP server for cloud and infrastructure. It runs locally on your machine and is started by your AI client.
Agents often write Terraform against whatever provider version their training data or the registry docs describe. Here the answer comes from terraform providers schema -json run in your root module, with versions read from .terraform.lock.hcl, so an argument is judged against the version you actually pinned. It is meant to sit beside HashiCorp's registry-based server, not replace it.
Tools cover listing pinned providers, searching type names, rendering one resource's schema as a compact outline, and checking dotted argument paths so an agent never sets a read-only attribute. tf_summarize_plan reads a saved plan and shows deletes and replaces first without printing values. State tools list addresses and show one instance with sensitive values redacted. tf_upgrade_impact diffs your configuration against a target provider version and confirms with terraform validate on a temp copy.
It never runs terraform init, so the directory must be initialised first. Schema dumps are cached per lock file, because the AWS provider's schema runs to tens of megabytes. Yaw Labs publishes it under the MIT licence.
Install
Run in a terminal
claude mcp add terraform-cwd-mcp -- npx -y @yawlabs/terraform-cwd-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"terraform-cwd-mcp": {
"command": "npx",
"args": [
"-y",
"@yawlabs/terraform-cwd-mcp"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"terraform-cwd-mcp": {
"command": "npx",
"args": [
"-y",
"@yawlabs/terraform-cwd-mcp"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"terraform-cwd-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@yawlabs/terraform-cwd-mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"terraform-cwd-mcp": {
"command": "npx",
"args": [
"-y",
"@yawlabs/terraform-cwd-mcp"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"terraform-cwd-mcp": {
"command": "npx",
"args": [
"-y",
"@yawlabs/terraform-cwd-mcp"
]
}
}
}Tools this server provides (9)
Taken from the project documentation; the running server may differ.
- tf_list_providers
- Providers with pinned versions and resource counts
- tf_search_types
- Find type names containing a substring
- tf_get_schema
- Arguments and nested blocks of one type at the pinned version
- tf_check_arguments
- Validate dotted argument paths
- tf_summarize_plan
- Summarise a saved plan, deletes and replaces first
- tf_module_interface
- Variables and interface of a module
- tf_state_addresses
- List resource instance addresses in state
- tf_show_resource
- Show one state instance with sensitive values redacted
- tf_upgrade_impact
- Diff configuration against a target provider version
What it does
- Pinned schemas
- Answers reflect the provider versions in your lock file.
- Argument checking
- Flags read-only, unknown and deprecated arguments before code is written.
- Plan summaries
- Lists deletes and replaces first without printing values.
- Redacted state
- Show resource instances with sensitive values hidden.
- Upgrade impact
- See what a provider bump would break.
Good for
- Verify a resource argument exists at your pinned AWS version
- Summarise a saved plan before approving it
- Inspect local module interfaces
- Estimate what upgrading a provider will break
Pricing
Open source
MIT licence; free
Prices change. Check yaw.sh before you buy.
Terraform CWD MCP Server FAQ
Does it run terraform init?
No. It never runs init, and an uninitialised directory gets an error telling you what to run.
Which licence applies?
MIT.
How does it relate to HashiCorp's server?
It complements it: that one answers from registry docs for the latest release, this one from your locked versions.
Is Terraform CWD MCP Server free?
Yes. Terraform CWD MCP Server is open source, so you can use and self-host it for free.
How do I add Terraform CWD MCP Server to Claude Code?
Run this command in your terminal: claude mcp add terraform-cwd-mcp -- npx -y @yawlabs/terraform-cwd-mcp
What are the best alternatives to Terraform CWD MCP Server?
The closest alternatives to Terraform CWD MCP Server are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to Terraform CWD MCP Server

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools