Skip to content

Run MiniMax Code functions through native MCP - #781

Merged
SaladDay merged 6 commits into
mainfrom
run-minimax-code-functions-through-native-mcp
Oct 19, 2026
Merged

SaladDay merged 6 commits into
mainfrom
run-minimax-code-functions-through-native-mcp

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

MiniMax Code now runs public function tools as native MCP tools, as a local MiniMax Code run with an MCP server does.

MiniMax Code speaks ACP, which has no function protocol, but it runs the MCP servers passed in the ACP Session's mcpServers.

Function server. The daemon serves the Session's frozen functions from a go-sdk MCP server, stateless with JSON responses, on 127.0.0.1:0.

  • It is passed as the http server functions, with a per-Session random bearer header.
  • The token lives only in daemon memory and in the transient ACP request, never in argv, env or a native file.
  • Requests without the token get 401.
  • The listener closes with the executor.

Calls.

  • Each tools/call emits function_call, then blocks until SubmitFunctionResult delivers the result.
  • success=false becomes MCP isError.
  • The receipt is confirmed only when the matching ACP tool_call_update (completed or failed) appears.
  • When the Turn ends or is cancelled, pending calls are released with an error to native, and a late result gets the unknown-call error.

Declaration.

  • FunctionTools is supported on none and on workspace placements.
  • Function schemas need an object root, as MCP inputSchema requires.
  • The label functions is reserved for public MCP servers.
  • Functions with multi_agent stay rejected until child attribution for this Harness is settled.
  • Result images stay unsupported.

Native difference. This is recorded in OpenAI compatibility. The native MCP client has a hard 120 s call timeout and ACP servers carry no timeout, so a result submitted later fails natively.

Also deleted:

  • the mcp.json = {"mcpServers":{}} write on every preparation (native treats a missing file as empty, and its MCP-create tool is off);
  • the SubmitFunctionResult stub.

Docs: harness-capabilities, message-content, execution-tools, index.md, with zh mirrors, and the MiniMax Code guide.

Checks.

  • go vet ./... in all modules.
  • go test (with -race) for the mcode adapter, internal/harnessconfig/... and services/core/internal/execution.
  • The translation test.
  • Unit tests:
    • a function round trip against the fake ACP harness (401 without the token, result to native, receipt confirmed);
    • cancellation (released call, rejected late result, closed listener).
  • Live run on environment: none with MiniMax-M2.7: the model called the function, native received the submitted result, the receipt was confirmed, and the Turn finished with it.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@SaladDay
SaladDay force-pushed the run-minimax-code-functions-through-native-mcp branch from 3be2c0e to 6aaab75 Compare October 19, 2026 16:15
@SaladDay
SaladDay changed the base branch from main to let-subagents-call-function-and-mcp-tools October 19, 2026 16:15
@SaladDay
SaladDay force-pushed the run-minimax-code-functions-through-native-mcp branch from 6aaab75 to 22fb795 Compare October 19, 2026 18:00
@SaladDay
SaladDay force-pushed the let-subagents-call-function-and-mcp-tools branch from e01c09d to 7b621a9 Compare October 19, 2026 18:14
@SaladDay
SaladDay force-pushed the run-minimax-code-functions-through-native-mcp branch from 22fb795 to b09fae9 Compare October 19, 2026 18:16
@SaladDay
SaladDay force-pushed the let-subagents-call-function-and-mcp-tools branch from 7b621a9 to 1a1b706 Compare October 19, 2026 18:20
@blacksmith-sh

This comment has been minimized.

@SaladDay
SaladDay force-pushed the run-minimax-code-functions-through-native-mcp branch from b09fae9 to d6ec217 Compare October 19, 2026 18:20
Base automatically changed from let-subagents-call-function-and-mcp-tools to main October 19, 2026 18:30
@SaladDay
SaladDay force-pushed the run-minimax-code-functions-through-native-mcp branch from 010e40e to d57e8f5 Compare October 19, 2026 18:30
@SaladDay
SaladDay merged commit 9028bb8 into main Oct 19, 2026
1 check passed
@SaladDay
SaladDay deleted the run-minimax-code-functions-through-native-mcp branch October 19, 2026 18:31
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.

1 participant