Skip to content

fix(acp): support relayed stdio MCP servers - #3070

Open
Fnine59 wants to merge 3 commits into
MoonshotAI:mainfrom
Fnine59:fix/kimi-code-acp-stdio-mcp-3069
Open

fix(acp): support relayed stdio MCP servers#3070
Fnine59 wants to merge 3 commits into
MoonshotAI:mainfrom
Fnine59:fix/kimi-code-acp-stdio-mcp-3069

Conversation

@Fnine59

@Fnine59 Fnine59 commented Aug 19, 2026

Copy link
Copy Markdown

Related Issue

Fixes #3069

Problem

The native kimi acp path uses @moonshot-ai/acp-server, whose current converter lives in packages/acp-server/src/convert.ts. It rejects ACP's type-absent stdio MCP branch because ephemeral session overlays require an explicit runtime identity, so clients receive an internal error before session/new or session/load can finish.

What changed

  • Convert type-absent ACP stdio entries into the engine's stdio configuration while preserving command, arguments, and environment variables.
  • Bind these relayed processes explicitly to the workspace's local runtime, which supports bidirectional stdio, without weakening the session overlay's runtime identity requirement.
  • Keep the existing HTTP, SSE, and unsupported ACP transport behavior unchanged.
  • Add converter coverage plus lifecycle coverage that connects a real stdio MCP fixture through session/new and session/load after restart.

Tests

  • pnpm --filter @moonshot-ai/acp-server test (146 passed)
  • pnpm --filter @moonshot-ai/acp-server typecheck
  • pnpm exec oxlint --type-aware packages/acp-server/src/convert.ts packages/acp-server/test/convert.test.ts packages/acp-server/test/lifecycle.test.ts
  • git diff --check

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 00491cc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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

Copy link
Copy Markdown

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: 8b856ee802

ℹ️ 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".

Comment thread packages/acp-server/src/convert.ts
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.

ACP server: stdio MCP server without "type" throws "does not declare a runtime identity"

1 participant