Skip to content

ACP tool profile excludes MCP tools by default — ACP hosts cannot use any MCP server without setting [tools] enabled = ["*"] #829

Description

@maxivillus

Summary

When jcode runs as an ACP (Agent Client Protocol) adapter (jcode acp), the default tool profile is acp, which is a hard allow-list of exactly ten base tools:

} else if matches!(profile.as_str(), "acp") {
    Some(
        [
            "bash",
            "read",
            "write",
            "edit",
            "multiedit",
            "apply_patch",
            "patch",
            "agentgrep",
            "ls",
            "batch",
        ]
        .into_iter()
        .map(|name| name.to_string())
        .collect(),
    )
}

(crates/jcode-base/src/config.rs, base_allowed_tools)

MCP tools are registered separately (the mcp management tool plus dynamic mcp__<server>__<tool> entries) via register_mcp_tools_for_dir, and are filtered by the same allowed_tools set (registry.definitions(self.allowed_tools.as_ref()) in crates/jcode-app-core/src/agent/turn_execution.rs). Because the acp profile is an exact-name allow-list, none of the mcp__* tools (nor the mcp management tool) are exposed to the model.

Impact

Any ACP host that drives jcode acp (multica, custom hermes-family runtimes, etc.) can never use MCP servers unless the operator manually overrides the tool policy with:

[tools]
enabled = ["*"]

This is not discoverable: the profile comment says "acp keeps core coding tools plus batch for generic ACP clients", and the config file documents profiles but not that MCP requires enabled = ["*"]. An ACP host expecting MCP support (per the ACP spec and common adapter behavior) gets a model that simply never sees MCP tools, with no error.

Additionally, when an ACP client does pass mcpServers in session/new params, jcode rejects them with:

ACP mcpServers are not supported yet; configure MCP servers in Jcode config.toml

(src/cli/acp.rs, ensure_no_acp_mcp_servers). The error message points at config.toml, but MCP servers are actually configured in ~/.jcode/mcp.json (or project-local .jcode/mcp.json / .mcp.json), not in config.toml — there is no MCP section in the TOML config. The message is misleading and sends users to a location that does not support MCP.

Proposed change

  1. Include MCP surface in the acp profile: add "mcp" to the allow-list and permit dynamic mcp__* tools (e.g., treat mcp as enabling mcp__* prefix, or add an mcp prefix wildcard in normalized_enabled_tools / registry.definitions).
  2. Fix the ensure_no_acp_mcp_servers error message to point at the real config location (~/.jcode/mcp.json), or accept mcpServers params and merge them with the file config.

Environment

  • jcode v0.68.0 (commit fcf5390), Linux x86_64.
  • ACP protocolVersion 1; host: a hermes-family daemon that spawns jcode acp.
  • Verified: with the default acp profile the model sees 10 tools and no MCP; after setting [tools] enabled = ["*"] in config.toml, the model sees all base tools plus mcp and 8 mcp__codebase-memory__* tools, and MCP calls succeed end-to-end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    autonomous: noNeeds your brain: a product/design decision is required before anyone acts.bugSomething isn't workingtriage: needs-decisionNeeds maintainer decision/design thought

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions