Skip to content

Conversation

@jordan-umusu
Copy link
Collaborator

@jordan-umusu jordan-umusu commented Jan 23, 2026

Summary by cubic

Adds in-process MCP support so agents can run command-based MCP servers (stdio) inside the sandbox. Extends MCP integrations, presets, runtime, and UI to configure, validate, and run these servers securely.

  • New Features

    • Added MCP server_type: url or command, with new fields (command, command_args, command_env, timeout).
    • Frontend integration dialog supports server type selection, validation, allowed commands (npx, uvx, python, python3, node), args (one per line), env (JSON), and timeout.
    • Integration detail page supports command-type configs (edit via dialog, delete with confirmation).
    • API and schemas updated: server_uri is optional for command type; command_env is write-only (exposed as has_command_env); workspace_id schema fixed to uuid.
    • Presets resolve MCP integrations into URL and command servers, re-validate command configs, and pass mcp_command_servers through AgentConfig.
    • Loopback and Claude runtime consume mcp_command_servers, start subprocess servers, and surface stderr as stream error events; avoid name collisions by suffixing server names (-cmd) if needed.
    • Security validation for command servers to prevent injection (allowlisted commands, safe args/env).
    • Sandbox image adds node, npm/npx, and uvx for running MCP servers.
  • Migration

    • Run Alembic migration to add server_type and command-related fields, and make server_uri nullable.
    • Rebuild the Docker image to include Node and uvx tooling.
    • For command-type MCP servers, enable internet access in the preset (agents need network access inside the sandbox).
    • Existing URL-based integrations continue to work; server_type defaults to url.

Written for commit a9268b0. Summary will update on new commits.

@jordan-umusu
Copy link
Collaborator Author

@cubic review

@jordan-umusu
Copy link
Collaborator Author

@codex review

@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Jan 30, 2026

@cubic review

@jordan-umusu I have started the AI code review. It will take a few minutes to complete.

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.

1 issue found across 21 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="frontend/src/components/integrations/mcp-integration-dialog.tsx">

<violation number="1" location="frontend/src/components/integrations/mcp-integration-dialog.tsx:337">
P2: Guard command_env parsing by server_type. As written, JSON.parse runs even for URL-type integrations, so stale/invalid command_env input can throw and block submit after switching server type.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f73368e620

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@blacksmith-sh

This comment has been minimized.

@jordan-umusu jordan-umusu marked this pull request as ready for review January 30, 2026 21:11
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.

1 issue found across 21 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="frontend/src/components/integrations/mcp-integration-dialog.tsx">

<violation number="1" location="frontend/src/components/integrations/mcp-integration-dialog.tsx:197">
P2: Command env validation allows non-string values, but the API expects `Record<string, string>`. Validate that all values are strings before accepting the JSON.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08b85f3662

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@jordan-umusu jordan-umusu force-pushed the feat/inprocess-mcp branch 2 times, most recently from a9283f9 to 761bd70 Compare February 2, 2026 22:14
@jordan-umusu jordan-umusu changed the title feat(agent): add in-process MCP support feat(agent): Add in-process MCP support Feb 5, 2026
@jordan-umusu jordan-umusu added agents LLM agents enhancement New feature or request labels Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents LLM agents enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant