This MCP (Model Context Protocol) Server for the Facets Module assists in creating and managing Terraform modules for infrastructure as code. It
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.
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 thislist_files — Lists all files in the specified module directory securely within the working directoryread_file — Reads the content of a file within the working directoryedit_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.yamlwrite_config_files — Writes and validates facets.yaml configuration files with dry-run and diff previewswrite_resource_file — Writes Terraform resource files (main.tf, variables.tf, etc.) safely. Excludes outputs.tf and facets.yamlwrite_outputs — Writes the outputs.tf file for a module with output attributes and interfaces in a local blockwrite_readme_file — Writes a README.md file for the module directory with AI-generated contentwrite_generic_file — Writes files generically with working directory and file type checks. Path: facets_mcp/tools/module_files.pygenerate_module_with_user_confirmation — Generates a new Terraform module scaffold with dry-run preview and user confirmationvalidate_module — Validates a Terraform module directory using FTF CLI standards and checks output typespush_preview_module_to_facets_cp — Previews a module by pushing a test version to the control plane with git context extracted automaticallySetup 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.
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
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.
| Tool | What it does |
|---|---|
| FIRST_STEP_get_instructions | Loads all module writing instructions from the module_instructions directory and supplementary instructions from mcp_instructions. Always call this first. |
| 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 files. |
| 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. |
| register_output_type | Registers a new output type in the Facets control plane with interfaces and attributes and providers. |
| get_output_type_details | Retrieves details for a specific output type from the Facets control plane. |
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.
The MCP Server requires uv for MCP orchestration. The package is available on PyPI: facets-module-mcp
| Variable | Description | Required |
|---|---|---|
| FACETS_PROFILE | Configuration value read at startup. | Optional |
| FACETS_USERNAME | Configuration value read at startup. | Optional |
| FACETS_TOKEN | Credential the server authenticates with. | Yes |
| CONTROL_PLANE_URL | Endpoint or connection string the server talks to. | Yes |
| PYTHONUNBUFFERED | Configuration value read at startup. | Optional |
| YOUR_TOKEN | Credential the server authenticates with. | Yes |
| YOUR_CONTROL_PLANE_URL | Endpoint or connection string the server talks to. | Yes |
Scoped local file access — read, write, search and reorganise files in directories you explicitly allow.
Search and read your Drive — Docs, Sheets and files become context your assistant can actually use.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Build a programmable telecommunications stack for connecting telephony services with the Internet via a cloud-based utility.
Chat with your second brain — search, read and write vault notes through the Local REST API.
Connects AI models to an Obsidian knowledge base for direct access and manipulation of notes and folders.