logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Cloud Infrastructure State Controller for Terrakube

This system interfaces with the Terrakube platform, offering programmatic management over its core assets, including environments, input parameters, component libraries, and organizational structures. Drawing parallels to project management principles, these managed assets represent the foundational 'tasks' and 'dependencies' for infrastructure provisioning workflows. It ensures data fidelity through strong typing and provides thorough feedback mechanisms when errors occur, streamlining complex configuration adjustments necessary for defining isolated operational settings.

Author

Cloud Infrastructure State Controller for Terrakube logo

terrakube-io

Apache License 2.0

Quick Info

GitHub GitHub Stars 2
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

terrakubeenvironmentmanagemanagement terrakubemanage terrakubeterrakube manage

This tool acts as a Model Context Protocol (MCP) server specifically tailored for interacting with Terrakube services. Managing infrastructure deployment often involves coordinating numerous sequential activities, much like managing complex projects where dependencies slow progress if not handled correctly. This server simplifies accessing and modifying the necessary components for successful provisioning.

Introduction

In the realm of project execution, an activity often requires completion within a set timeline to achieve broader objectives. These activities, analogous to infrastructure components, must be systematically managed. This tool facilitates the rigorous control required over configuration items, ensuring that the necessary 'assignments'—such as setting variables or defining workspaces—are executed correctly to finalize the larger infrastructure 'task'. Effective coordination of these items is paramount for avoiding stagnation.

Key Operations

This server exposes a set of functions mirroring essential management capabilities within Terrakube.

Workspaces Management

Create Workspace

Initiates a new isolated execution environment within a specified organization. - Inputs: - name (string): Designated identifier for the workspace. - organization (string): The parent organizational unit. - description (optional string): A brief explanation of the environment's purpose. - vcsProviderId (optional string): Identifier linking to the source code repository provider. - vcsRepository (optional string): The specific repository name. - vcsBranch (optional string): The target branch for deployment operations. - Returns: The newly established workspace object.

Update Workspace

Modifies parameters of an existing execution environment. - Inputs: - name (string): Identifier of the workspace to alter. - organization (string): The owning organizational context. - description (optional string): Revised descriptive text. - vcsProviderId (optional string): Updated link to the version control system provider. - vcsRepository (optional string): The repository name to utilize going forward. - vcsBranch (optional string): The branch to track for future synchronization. - Returns: The successfully modified workspace object.

Delete Workspace

Removes an entire execution environment and its associated state. - Inputs: - name (string): The identifier of the environment to erase. - organization (string): The organization where the workspace resides. - Returns: Confirmation of successful removal.

Get Workspace

Retrieves the current detailed state information for a targeted workspace. - Inputs: - name (string): The unique workspace designator. - organization (string): The responsible organization. - Returns: Detailed attributes of the workspace.

List Workspaces

Generates a roster of all environments within a specified organizational boundary. - Inputs: - organization (string): The organization name to query. - Returns: A collection of workspace details.

Variables Management

Create Variable

Injects a new configuration parameter into a specific workspace context. - Inputs: - name (string): Name assigned to the configuration item. - organization (string): The controlling organization. - workspace (string): The target workspace receiving the input. - value (string): The actual configuration data or secret. - description (optional string): Annotation explaining the variable's purpose. - category (optional string): Classification of the variable type. - hcl (optional boolean): Indicates if the value uses HashiCorp Configuration Language format. - sensitive (optional boolean): Flags the value as confidential data. - Returns: Details of the newly registered input parameter.

Update Variable

Revises the value or metadata of an existing configuration item. - Inputs: - name (string): The identifier of the configuration item. - organization (string): The controlling organization. - workspace (string): The workspace containing the input. - value (string): The revised configuration data. - description (optional string): Updated explanation for the item. - category (optional string): New classification for the input. - hcl (optional boolean): Reassessment of HCL formatting. - sensitive (optional boolean): Reassessment of data sensitivity. - Returns: The updated parameter object.

Delete Variable

Permanently removes a configuration parameter from its associated workspace. - Inputs: - name (string): Name of the parameter to eliminate. - organization (string): The organization context. - workspace (string): The workspace from which it is being removed. - Returns: Confirmation of successful deletion.

Get Variable

Fetches the current definition and status of a single configuration parameter. - Inputs: - name (string): Name of the configuration item sought. - organization (string): The organization scope. - workspace (string): The workspace holding the parameter. - Returns: The requested variable details.

List Variables

Provides a complete list of all inputs defined for a given workspace. - Inputs: - organization (string): The organization name. - workspace (string): The workspace name being inspected. - Returns: An array containing all variable records.

Modules Management

Create Module

Registers a reusable collection of infrastructure code for future deployment use. - Inputs: - name (string): Name given to this reusable component. - organization (string): The organization owning the module library. - provider (string): The specific infrastructure provider targeted by the module. - description (optional string): Summary of the module's function. - Returns: Details of the newly registered infrastructure component.

Update Module

Revises the metadata associated with an existing reusable infrastructure package. - Inputs: - name (string): Identifier of the module to revise. - organization (string): The owning organization. - provider (string): The infrastructure provider targeted. - description (optional string): Updated summary information. - Returns: The updated module record.

Delete Module

Removes a registered component library from the system. - Inputs: - name (string): Identifier of the library to eliminate. - organization (string): The managing organization. - provider (string): The provider context of the module. - Returns: Status confirming the removal operation.

Get Module

Retrieves the current definition for a specified infrastructure component. - Inputs: - name (string): The module identifier. - organization (string): The organization context. - provider (string): The target infrastructure provider. - Returns: The complete module definition.

List Modules

Generates a roster of all registered infrastructure components within an organization. - Inputs: - organization (string): The organization name to search within. - Returns: An array listing all available module definitions.

Organizations Management

Create Organization

Establishes a new top-level container for managing environments and resources. - Inputs: - name (string): The desired name for the new organizational unit. - description (optional string): A description of the organization's scope. - Returns: The newly established organizational entity.

Update Organization

Modifies the descriptive metadata of an existing organizational unit. - Inputs: - name (string): Identifier of the organization to modify. - description (optional string): The updated organizational summary. - Returns: The revised organizational object.

Delete Organization

Terminates an organizational unit and potentially all associated resources. - Inputs: - name (string): The name of the unit scheduled for deletion. - Returns: Confirmation that the organization deletion process has started.

Get Organization

Fetches the configuration details for a particular organizational structure. - Inputs: - name (string): The name of the organization being queried. - Returns: The organization's full attribute set.

List Organizations

Returns a catalog of every organization currently managed by the system. - Returns: An array containing all organization records.

Setup

Environment Variables

Prior to operation, define necessary credentials and endpoint details in a local .env file located in the root folder:

TERRAKUBE_API_URL=<your-terrakube-api-url>
TERRAKUBE_PAT_TOKEN=<your-personal-access-token>

Installation via Smithery

This tool can be automatically deployed to your environment using the Smithery CLI utility for simplified integration with Claude Desktop:

npx -y @smithery/cli install @AzBuilder/mcp-server-terrakube --client claude

Development Workflow

To begin local modification or inspection of the source code:

  1. Obtain the repository contents: bash git clone https://github.com/azbuilder/terrakube-mcp-server.git cd terrakube-mcp-server

  2. Install required software components: bash npm install

  3. Compile the project source code into executable form: bash npm run build

Usage with Claude Desktop

For operational use within the Claude Desktop environment, incorporate the following configuration snippet into your claude_desktop_config.json file:

{
  "mcpServers": {
    "terrakube": {
      "command": "npx",
      "args": [
        "-y",
        "@terrakube/mcp-server"
      ],
      "env": {
        "TERRAKUBE_API_URL": "<YOUR_API_URL>",
        "TERRAKUBE_PAT_TOKEN": "<YOUR_PAT_TOKEN>"
      }
    }
  }
}
  • Task dependency chains in complex scheduling problems.
  • Definition and breakdown of work packages in project lifecycles.
  • Importance of clear completion criteria to avoid ambiguity in execution tracking.
  • Coordinated effort mechanisms for achieving shared organizational objectives.
  • Differentiating assignments from overarching tasks.

Extra Details

Original material included extensive feature lists detailing TypeScript adoption for type safety and robust error reporting structures. While not explicitly listed here, these qualities ensure the service remains reliable, preventing the common drawback where project tasks stall due to unclear status or unexpected failures. The system relies on Terrakube's inherent structure to manage configuration elements consistently.

Conclusion

This server provides essential mechanisms for controlling infrastructure state elements, effectively managing the defined 'tasks' within a cloud deployment project. By providing strong programmatic control over workspaces, variables, and organizational boundaries, it supports the necessary coordination among deployment efforts. Successfully completing these atomic configuration steps leads directly to the finalization of the larger infrastructure goal.

See Also

`