Facets Module MCP Server

This MCP (Model Context Protocol) Server for the Facets Module assists in creating and managing Terraform modules for infrastructure as code. It

Local serverstdio

What is the Facets Module MCP MCP server?

Facets Module MCP MCP server exists for a simple reason — assistants are far more useful when they can act on Facets Module MCP directly instead of describing what you should do. This MCP (Model Context Protocol) Server for the Facets Module assists in creating and managing Terraform modules for infrastructure as code. It integrates with Facets.cloud's FTF CLI, providing secure and robust tools for module.

What you get

  • Secure File Operations —
  • Modular MCP Tools —
  • Facets Module Generation —
  • Module Forking —
  • Supplementary Instructions Support —
  • Module Preview and Testing —

What the assistant can call

Once Facets Module MCP is connected, these are the calls the assistant has available:

  • FIRST_STEP_get_instructions — Loads all module writing instructions from the module_instructions directory and supplementary instructions from mcp_instructions. Always call this
  • list_files — Lists all files in the specified module directory securely within the working directory
  • read_file — Reads the content of a file within the working directory
  • edit_file_block — Apply surgical edits to specific blocks of text in files. Makes precise changes without rewriting entire files. Cannot edit outputs.tf or facets.yaml
  • write_config_files — Writes and validates facets.yaml configuration files with dry-run and diff previews
  • write_resource_file — Writes Terraform resource files (main.tf, variables.tf, etc.) safely. Excludes outputs.tf and facets.yaml
  • write_outputs — Writes the outputs.tf file for a module with output attributes and interfaces in a local block
  • write_readme_file — Writes a README.md file for the module directory with AI-generated content
  • write_generic_file — Writes files generically with working directory and file type checks. Path: facets_mcp/tools/module_files.py
  • generate_module_with_user_confirmation — Generates a new Terraform module scaffold with dry-run preview and user confirmation
  • validate_module — Validates a Terraform module directory using FTF CLI standards and checks output types
  • push_preview_module_to_facets_cp — Previews a module by pushing a test version to the control plane with git context extracted automatically

Setting it up

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Configuration and credentials

You will need 7 environment variables: FACETS_PROFILE, FACETS_USERNAME, FACETS_TOKEN, CONTROL_PLANE_URL, PYTHONUNBUFFERED, YOUR_TOKEN, YOUR_CONTROL_PLANE_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

The MCP Server requires uv for MCP orchestration. The package is available on PyPI: facets-module-mcp

Choosing this one

This sits in the file and storage access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Facets Module MCP's toolset — FIRST_STEP_get_instructions, list_files, read_file and 11 more — is a fair guide to whether it matches your workflow. It is maintained by Facets-cloud; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Facets Module MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Facets Module MCP.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the facets module mcp mcp server does with a few real requests.

Available tools

ToolWhat it does
FIRST_STEP_get_instructionsLoads all module writing instructions from the module_instructions directory and supplementary instructions from mcp_instructions. Always call this first.
list_filesLists all files in the specified module directory securely within the working directory.
read_fileReads the content of a file within the working directory.
edit_file_blockApply surgical edits to specific blocks of text in files. Makes precise changes without rewriting entire files. Cannot edit outputs.tf or facets.yaml files.
write_config_filesWrites and validates facets.yaml configuration files with dry-run and diff previews.
write_resource_fileWrites Terraform resource files (main.tf, variables.tf, etc.) safely. Excludes outputs.tf and facets.yaml.
write_outputsWrites the outputs.tf file for a module with output attributes and interfaces in a local block.
write_readme_fileWrites a README.md file for the module directory with AI-generated content.
write_generic_fileWrites files generically with working directory and file type checks. Path: facets_mcp/tools/module_files.py
generate_module_with_user_confirmationGenerates a new Terraform module scaffold with dry-run preview and user confirmation.
validate_moduleValidates a Terraform module directory using FTF CLI standards and checks output types.
push_preview_module_to_facets_cpPreviews a module by pushing a test version to the control plane with git context extracted automatically.
register_output_typeRegisters a new output type in the Facets control plane with interfaces and attributes and providers.
get_output_type_detailsRetrieves details for a specific output type from the Facets control plane.

How to install the Facets Module MCP MCP server

For a locally cloned repository, use:

```json
{
  "mcpServers": {
    "facets-module": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/your/cloned/facets-module-mcp/facets_mcp",
        "run",
        "facets_server.py",
        "/path/to/working-directory"
      ],
      "env": {
        "PYTHONUNBUFFERED": "1",
        "FACETS_PROFILE": "default",
        "FACETS_USERNAME": "<YOUR_USERNAME>",
        "FACETS_TOKEN": "<YOUR_TOKEN>",
        "CONTROL_PLANE_URL": "<YOUR_CONTROL_PLANE_URL>"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

The MCP Server requires uv for MCP orchestration. The package is available on PyPI: facets-module-mcp

VariableDescriptionRequired
FACETS_PROFILEConfiguration value read at startup.Optional
FACETS_USERNAMEConfiguration value read at startup.Optional
FACETS_TOKENCredential the server authenticates with.Yes
CONTROL_PLANE_URLEndpoint or connection string the server talks to.Yes
PYTHONUNBUFFEREDConfiguration value read at startup.Optional
YOUR_TOKENCredential the server authenticates with.Yes
YOUR_CONTROL_PLANE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Facets Module MCP to FIRST STEP get instructions.
  • Use Facets Module MCP to list files.
  • Use Facets Module MCP to read file.

Frequently asked questions

It connects Facets Module MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (FIRST_STEP_get_instructions, list_files, read_file, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Facets Module MCP directly.