Skip to content

Team 4;#98

Open
seanmtracey wants to merge 1 commit intoStackOneHQ:mainfrom
seanmtracey:main
Open

Team 4;#98
seanmtracey wants to merge 1 commit intoStackOneHQ:mainfrom
seanmtracey:main

Conversation

@seanmtracey
Copy link

@seanmtracey seanmtracey commented Aug 28, 2025

What's better than using IaC (Infrastructure as Code) to deploy infrastructure? Using LLMs to describe what kind of infrastructure you want and have the IaC generated, validated and deployed for you!

With the hstacks connector, and user can deploy any kind of cloud resource to Hetzner Cloud in seconds - going from zero, to 100s of Servers, Firewalls, and Elastic volumes in an instance (pun intended).

No more handcrafting your resources, let the MCP do it for you! 😎


Summary by cubic

Adds a new HStacks MCP connector to deploy and manage cloud infrastructure via hstacks.dev. Enables stack validation, deployment, status checks, and resource discovery with docs and tests.

  • New Features
    • New connector: hstacks (credential: accessToken)
    • Tools: get_hstacks_stacks_schema, get_available_hstacks_images, get_available_hstacks_locations, get_available_hstacks_servers, validate_stack, deploy_stack, delete_stack, get_stack_status
    • Docs: connectors catalog and a detailed HStacks guide with examples
    • Tests: Vitest coverage for all tools
    • Registered in connectors index for use across the app

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

17 issues found across 5 files

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.


**Credentials:** `token`

### GitLab
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitLab connector is documented but not implemented in the codebase; remove or mark as coming soon to avoid confusion.

Prompt for AI agents
Address the following comment on docs/connectors.md at line 26:

<comment>GitLab connector is documented but not implemented in the codebase; remove or mark as coming soon to avoid confusion.</comment>

<file context>
@@ -0,0 +1,133 @@
+
+**Credentials:** `token`
+
+### GitLab
+GitLab integration for repository and project management.
+
</file context>

### Asana
Task and project management with Asana.

**Credentials:** `apiKey`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HiBob credentials should list serviceUserId and serviceUserToken, not apiKey.

Prompt for AI agents
Address the following comment on docs/connectors.md at line 36:

<comment>HiBob credentials should list serviceUserId and serviceUserToken, not apiKey.</comment>

<file context>
@@ -0,0 +1,133 @@
+### Asana
+Task and project management with Asana.
+
+**Credentials:** `apiKey`
+
+### Jira
</file context>
Suggested change
**Credentials:** `apiKey`
**Credentials:** `serviceUserId`, `serviceUserToken`

### Supabase
Backend-as-a-service with database, auth, and storage.

**Credentials:** `url`, `anonKey`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supabase credentials are incorrect; use accessToken to match the connector config.

Prompt for AI agents
Address the following comment on docs/connectors.md at line 77:

<comment>Supabase credentials are incorrect; use accessToken to match the connector config.</comment>

<file context>
@@ -0,0 +1,133 @@
+### Supabase
+Backend-as-a-service with database, auth, and storage.
+
+**Credentials:** `url`, `anonKey`
+
+## Analytics &amp; Monitoring
</file context>

### Asana
Task and project management with Asana.

**Credentials:** `apiKey`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notion credential key should be token, not apiKey, per the connector schema.

Prompt for AI agents
Address the following comment on docs/connectors.md at line 36:

<comment>Notion credential key should be token, not apiKey, per the connector schema.</comment>

<file context>
@@ -0,0 +1,133 @@
+### Asana
+Task and project management with Asana.
+
+**Credentials:** `apiKey`
+
+### Jira
</file context>
Suggested change
**Credentials:** `apiKey`
**Credentials:** `token`

### Slack
Team communication and workflow automation.

**Credentials:** `botToken`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slack requires teamId in addition to botToken; document both to prevent misconfiguration.

Prompt for AI agents
Address the following comment on docs/connectors.md at line 58:

<comment>Slack requires teamId in addition to botToken; document both to prevent misconfiguration.</comment>

<file context>
@@ -0,0 +1,133 @@
+### Slack
+Team communication and workflow automation.
+
+**Credentials:** `botToken`
+
+## Documentation &amp; Knowledge
</file context>
Suggested change
**Credentials:** `botToken`
**Credentials:** `botToken`, `teamId`


console.log(
'[get_available_hstacks_images] Creating client with token:',
`${accessToken.substring(0, 8)}...`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial access token is logged; mask or remove token output entirely.

Prompt for AI agents
Address the following comment on packages/mcp-connectors/src/connectors/hstacks.ts at line 207:

<comment>Partial access token is logged; mask or remove token output entirely.</comment>

<file context>
@@ -0,0 +1,396 @@
+
+          console.log(
+            &#39;[get_available_hstacks_images] Creating client with token:&#39;,
+            `${accessToken.substring(0, 8)}...`
+          );
+          const client = new HStacksClient(accessToken);
</file context>

try {
console.log('[get_available_hstacks_images] Starting');
const credentials = await context.getCredentials();
console.log('[get_available_hstacks_images] Credentials:', credentials);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full credentials object (including access token) is logged; avoid printing secrets.

Prompt for AI agents
Address the following comment on packages/mcp-connectors/src/connectors/hstacks.ts at line 198:

<comment>Full credentials object (including access token) is logged; avoid printing secrets.</comment>

<file context>
@@ -0,0 +1,396 @@
+        try {
+          console.log(&#39;[get_available_hstacks_images] Starting&#39;);
+          const credentials = await context.getCredentials();
+          console.log(&#39;[get_available_hstacks_images] Credentials:&#39;, credentials);
+          const { accessToken } = credentials;
+
</file context>
Suggested change
console.log('[get_available_hstacks_images] Credentials:', credentials);
console.log('[get_available_hstacks_images] Credentials: [REDACTED]');

}

try {
console.log('[HStacks] Request headers:', this.headers);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Access token is logged in plaintext via headers logging; redact or remove to avoid credential leakage.

Prompt for AI agents
Address the following comment on packages/mcp-connectors/src/connectors/hstacks.ts at line 92:

<comment>Access token is logged in plaintext via headers logging; redact or remove to avoid credential leakage.</comment>

<file context>
@@ -0,0 +1,396 @@
+    }
+
+    try {
+      console.log(&#39;[HStacks] Request headers:&#39;, this.headers);
+      const response = await fetch(url, options);
+      console.log(`[HStacks] Response status: ${response.status} ${response.statusText}`);
</file context>
Suggested change
console.log('[HStacks] Request headers:', this.headers);
console.log('[HStacks] Request headers:', { ...this.headers, 'Access-Token': '***' });

import { createMockConnectorContext } from '../__mocks__/context';
import { HStacksConnectorConfig } from './hstacks';

describe('#HStacksConnector', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests perform live HTTP calls without stubbing; add MSW-based request mocking like other connector specs to avoid flaky and external network-dependent tests.

Prompt for AI agents
Address the following comment on packages/mcp-connectors/src/connectors/hstacks.spec.ts at line 6:

<comment>Tests perform live HTTP calls without stubbing; add MSW-based request mocking like other connector specs to avoid flaky and external network-dependent tests.</comment>

<file context>
@@ -0,0 +1,215 @@
+import { createMockConnectorContext } from &#39;../__mocks__/context&#39;;
+import { HStacksConnectorConfig } from &#39;./hstacks&#39;;
+
+describe(&#39;#HStacksConnector&#39;, () =&gt; {
+  describe(&#39;.GET_HSTACKS_SCHEMA&#39;, () =&gt; {
+    describe(&#39;when valid credentials are provided&#39;, () =&gt; {
</file context>


```bash
# Deploy a single Ubuntu server with nginx in Germany
bun start --connector hstacks --credentials '{"accessToken":"your-token-here"}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLI example omits the required "-- --" before connector args; this will prevent options from reaching the server via turbo.

Prompt for AI agents
Address the following comment on docs/connectors/hstacks.md at line 73:

<comment>CLI example omits the required &quot;-- --&quot; before connector args; this will prevent options from reaching the server via turbo.</comment>

<file context>
@@ -0,0 +1,175 @@
+
+```bash
+# Deploy a single Ubuntu server with nginx in Germany
+bun start --connector hstacks --credentials &#39;{&quot;accessToken&quot;:&quot;your-token-here&quot;}&#39;
+```
+
</file context>

@mattzcarey
Copy link
Contributor

Hey Sean, would you let me have permissions to edit this branch. I need to remove the extra docs in order to merge this. All the docs for a connector should live in the tool descriptions.

@seanmtracey
Copy link
Author

@mattzcarey Sure thing! I'll be pushing up some cleaner code later today/early tomorrow. Best to wait until then, but I'll ping you with the access when it's ready :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants