Skip to content

[DOCS] CLI Markdown agents pick their MCP servers with mcpServers #1136

Closed

Description

@edenreich

Summary

Markdown agents in the CLI now pick the MCP servers they use with mcpServers in their frontmatter, the key Claude Code uses. Source: inference-gateway/cli#1759, implemented in inference-gateway/cli#1766. Document it once that PR is merged and released.

What changed for users:

  • mcpServers is a list of server names from the mcp.yaml of the computer the agent runs on. Its sessions connect only those servers, and of those only the ones with run: true are started.
  • Without the key an agent gets every enabled server, as before. An empty list (mcpServers: []) gives it none.
  • A named server comes up even when mcp.yaml sets enabled: false for it, so a server can stay off for every chat and serve one agent. The top-level enabled: false of mcp.yaml still turns MCP off for every agent.
  • A name the computer's mcp.yaml lacks is skipped with a warning, and the agent still runs.
  • An inline server definition, which Claude Code also accepts, is ignored with a warning. Agent files never carry a URL, a header or a secret.
  • It applies to a subagent the Agent tool starts and to a session opened as the agent on infer daemon, as the desktop does. A session moved to another workspace keeps the list and brings those servers up from that workspace's mcp.yaml.
  • A tools list hides every MCP tool it does not name. For a subagent the Agent tool starts, MCP tool names in tools are still dropped as unknown.

Example to add:

# ~/.infer/mcp.yaml
enabled: true
servers:
  - name: demo-server
    enabled: false
    url: http://localhost:3000/mcp
---
name: timekeeper
description: Tells the current time in any timezone.
mcpServers:
  - demo-server
---

You answer questions about the current time with the get_time tool.

Affected pages

  • cli.md, Markdown subagent presets: the frontmatter list gains mcpServers, the key leaves the list of ignored keys, and the v1 limits drop it. The limit about MCP tool names in a tools list stays, scoped to subagents the Agent tool starts.
  • cli.md, MCP Integration: a short note that a Markdown agent picks its servers with mcpServers, and that a server with enabled: false still comes up for an agent that names it.
  • desktop.md, Your own agents: mcpServers in the frontmatter table takes effect with this CLI version. Coordinate with [DOCS] Desktop MCPs tab: MCP servers with secret headers, picked per agent #1134, which documents the editor side.

Acceptance Criteria

  • cli.md documents mcpServers: names from mcp.yaml, absent means every enabled server, an empty list means none.
  • cli.md states that a named server comes up even with enabled: false, and that the top-level switch still wins.
  • cli.md covers the warning for an unknown name and that inline definitions are ignored.
  • The v1 limits no longer list mcpServers.
  • The examples use a placeholder server, not a real third-party one.

Activity

  1. added
    documentation
    on Nov 8, 2026
  2. added theissue type on Nov 8, 2026
  3. edenreich commented on Nov 8, 2026

    @edenreich
    ContributorAuthor

    @claude can you document this? use /ponytail:ponytail check for all the relevant code first before documenting.

  4. inference-gateway-maintainer commented on Nov 8, 2026

    @inference-gateway-maintainer
    Contributor

    Claude finished @edenreich's task in 3m 10s —— View job • docs/issue-1136-20261108-2024 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-1136-20261108-2024?quick_pull=1&title=Issue%20%231136%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%231136%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documented mcpServers for CLI Markdown agents

    • Gather context (issue, repo docs)
    • Check the CLI source for the real behavior
    • Update cli.md (subagent presets + MCP Integration)
    • Update desktop.md (Your own agents)
    • Run lint / format / build
    • Commit and open PR

    PR: #1143

    What I verified in the CLI before writing

    Cloned inference-gateway/cli and read the implementation rather than trusting the issue text:

    • internal/tools/mdagent.go - mcpServers frontmatter key, resolveMarkdownAgentMCPServers: nil keeps the enabled servers, a non-string item warns "markdown agent defines an MCP server inline, ignoring it".
    • internal/protocols/mcp/supervisor.go SelectServers - keeps only named servers and forces server.Enabled = true, then warns once per name the computer does not configure. That is the enabled: false override, confirmed at the source.
    • internal/container/container.go - the selection happens only when c.config.MCP.Enabled, so the top-level switch still wins.
    • internal/scheduler/domain/subagent.go - INFER_AGENT_MCP_SERVERS; set by both internal/tools/agent.go (Agent-tool subagent) and internal/sessions/infrastructure/worker.go (daemon thread), which is why the docs say it covers both.

    Changes

    cli.md, Markdown subagent presets

    • mcpServers added to the frontmatter table and removed from the accepted-and-ignored key list.
    • New MCP servers paragraph with the demo-server placeholder example: names from the computer's mcp.yaml, absent means every enabled server, mcpServers: [] means none, only named servers with run: true start, a named server comes up even with enabled: false while the top-level switch still wins, an unknown name warns and the agent still runs, an inline definition warns and is ignored. Plus the subagent/daemon-thread scope, INFER_AGENT_MCP_SERVERS, and the workspace move.
    • v1 limits no longer list mcpServers; the MCP-tool-names-in-tools limit stays, scoped to Agent-tool subagents.

    cli.md, MCP Integration - a short servers-per-agent note linking back to the preset section.

    desktop.md, Your own agents - the editor's MCP servers list note now says what the CLI does with the pick, instead of only that it needs a CLI understanding the key.

    One thing worth knowing

    The feature is merged on the CLI's main but not in a tagged release yet - latest is v0.249.0 (today) and its changelog does not include it. So I deliberately did not name a minimum infer version in desktop.md, unlike the v0.247.0 note just above it. Worth adding the real number once the release lands.

    Validation

    bun run format:check, bun run lint:md, bun run build - all pass.


    Skipped: bun run preview and local visual inspection (no content/nav/SEO change that needs it, and this is a headless runner), and bun test (no generator or fixture touched). Risk: the only real one is the missing version number above - everything else is a direct read of the merged CLI code.
    | Branch

  5. moved this from Todo to In progress in 2026on Nov 8, 2026
  6. moved this from In progress to QA in 2026on Nov 8, 2026
  7. inference-gateway-releaser commented on Nov 8, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.24 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

  8. moved this from QA to Done in 2026on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions