René's URL Explorer Experiment


Title: Preload MCP server tools into the initial agent function list (instead of lazy discovery) · Issue #3787 · github/copilot-cli · GitHub

Open Graph Title: Preload MCP server tools into the initial agent function list (instead of lazy discovery) · Issue #3787 · github/copilot-cli

X Title: Preload MCP server tools into the initial agent function list (instead of lazy discovery) · Issue #3787 · github/copilot-cli

Description: Summary When a session starts, MCP tools registered via .mcp.json or --additional-mcp-config are lazy-loaded — they are not advertised in the agent's initial list. Agents that don't know to probe for them (via tool_sear...

Open Graph Description: Summary When a session starts, MCP tools registered via .mcp.json or --additional-mcp-config are lazy-loaded — they are not advertised in the agent's initial list. Agents that don...

X Description: Summary When a session starts, MCP tools registered via .mcp.json or --additional-mcp-config are lazy-loaded — they are not advertised in the agent's initial <available_tools> list. Agent...

Opengraph URL: https://github.com/github/copilot-cli/issues/3787

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Preload MCP server tools into the initial agent function list (instead of lazy discovery)","articleBody":"## Summary\n\nWhen a session starts, MCP tools registered via `.mcp.json` or `--additional-mcp-config` are **lazy-loaded** — they are not advertised in the agent's initial `\u003cavailable_tools>` list. Agents that don't know to probe for them (via `tool_search_tool_regex` or similar discovery) will not see they exist and may resort to less-appropriate built-in tools instead.\n\n## Concrete failure mode we hit\n\nWe ship a custom MCP server (`squad_state`) with [Squad](https://github.com/bradygaster/squad) that exposes 13 tools (7 `squad_state_*` + 6 `memory.*`). Squad agents are supposed to use these to write durable team state (decisions, agent history, governed memory) instead of raw `create` / `edit` / `write_file` against on-disk files.\n\nWhat we observed across multiple agent sessions:\n\n> *\"My session loaded with `powershell`, `view`, `create`, `edit`, `grep`, `glob`, `task`, `store_memory`, `vote_memory`, etc. — the squad MCP tools (`squad_state-*`) were **registered but not advertised** in the tool definitions block at the top of my prompt. I only found them just now by running `tool_search_tool_regex`.\"*\n\nBehaviour: agent silently writes `.squad/decisions.md` with `create` even though the contract requires going through `squad_state_write`. On a `two-layer` state backend (orphan branch + git notes) that write either fails at the pre-commit hook or creates phantom state the runtime overwrites at next read — silent data loss.\n\nWe worked around it with a documented \"state-backend handshake\" in the coordinator prompt that forces the agent to probe for the tools at session start (see [bradygaster/squad#1306](https://github.com/bradygaster/squad/pull/1306)). But this is defence in depth — the prompt cost shouldn't be necessary if the tools were in the initial function list.\n\n## Request\n\n**Advertise tools from `.mcp.json` / `--additional-mcp-config`-loaded MCP servers in the agent's initial `\u003cavailable_tools>` list at session start**, instead of (or in addition to) lazy discovery.\n\nOptional refinements:\n\n1. **Opt-in per server** — add a `\"preload\": true` flag to the MCP server entry so server authors can mark a server as eager-load.\n2. **Logging on connect** — print a one-line `⚙️ MCP server X connected; advertised N tools` on stdout/stderr at session start so users see which servers loaded without having to inspect `~/.copilot/logs/`.\n3. **Optional initial system-reminder banner** when external MCP tools are detected: `External MCP tools available: X, Y, Z. Use these for the operations they cover.` This nudges agents that don't proactively probe.\n\n## Why this matters for the broader ecosystem\n\nThis isn't a Squad-specific request. Any third party who ships a custom MCP server (memory, vector store, code-intelligence, telemetry, custom CI) hits the same wall: their tools exist but the agent doesn't know to ask. The pattern of \"register an MCP server then hope the agent probes for it\" is fragile and produces inconsistent agent behaviour across sessions.\n\nClosing this would let MCP-server authors trust that `.mcp.json` registration is enough — no per-prompt nudges needed.\n\n## Repro\n\n1. `npm i -g @bradygaster/squad-cli@insider`\n2. `mkdir test && cd test && git init && squad init`\n3. `copilot --agent squad --allow-all-tools -p \"list every tool you can call right now\"`\n4. Observe: `squad_state_*` / `memory.*` tools are NOT in the initial response. They are only discoverable via `tool_search_tool_regex` or by reading the .mcp.json.\n\nTested on Copilot CLI v1.0.62-2 (Windows 11, Node v24.14.0).\n\n## Filed by\n\nSquad maintainer team, surfaced during v0.10 stabilisation effort.","author":{"url":"https://github.com/tamirdresher","@type":"Person","name":"tamirdresher"},"datePublished":"2026-06-13T18:27:57Z","url":"https://github.com/github/copilot-cli/issues/3787"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e8866689-c589-3182-3641-0919ecf760e0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id860A:19AA62:1871480:1F107B4:6B014106
html-safe-nonced931d46d645a87e616012a0d943c16da01c50537cd5532632d0ad92516bbb316
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjBBOjE5QUE2MjoxODcxNDgwOjFGMTA3QjQ6NkIwMTQxMDYiLCJ2aXNpdG9yX2lkIjoiNTAwMjU0NTQzMDE4NjI0NjQwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3c87ff9039355d91a33371b0fdd20f38ef38c9ec62056b91c4b09bdfc02ca6aa
hovercard-subject-tagissue:4656504326
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/copilot-cli/3787/issue_layout
twitter:imagehttps://opengraph.githubassets.com/71eda7001d6d6787c88a89117e235ea53de8ced022ade93a80b91bfc1332a689/github/copilot-cli/issues/3787
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/71eda7001d6d6787c88a89117e235ea53de8ced022ade93a80b91bfc1332a689/github/copilot-cli/issues/3787
og:image:altSummary When a session starts, MCP tools registered via .mcp.json or --additional-mcp-config are lazy-loaded — they are not advertised in the agent's initial list. Agents that don...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametamirdresher
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/github/copilot-cli git https://github.com/github/copilot-cli.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id585860664
octolytics-dimension-repository_nwogithub/copilot-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id585860664
octolytics-dimension-repository_network_root_nwogithub/copilot-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/github/copilot-cli/issues/3787#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcopilot-cli%2Fissues%2F3787
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcopilot-cli%2Fissues%2F3787
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=github%2Fcopilot-cli
Reloadhttps://github.com/github/copilot-cli/issues/3787
Reloadhttps://github.com/github/copilot-cli/issues/3787
Reloadhttps://github.com/github/copilot-cli/issues/3787
githubhttps://github.com/github
copilot-clihttps://github.com/github/copilot-cli
Codehttps://github.com/github/copilot-cli
Issues2.1k (2.1k)https://github.com/github/copilot-cli/issues
Pull requests47 (47)https://github.com/github/copilot-cli/pulls
Discussionshttps://github.com/github/copilot-cli/discussions
Actionshttps://github.com/github/copilot-cli/actions
Projectshttps://github.com/github/copilot-cli/projects
Security and quality2 (2)https://github.com/github/copilot-cli/security
Insightshttps://github.com/github/copilot-cli/insights
https://github.com/github/copilot-cli
New issuehttps://github.com/login?return_to=https://github.com/github/copilot-cli/issues/3787
New issuehttps://github.com/login?return_to=https://github.com/github/copilot-cli/issues/3787
Featurehttps://github.com/github/copilot-cli/issues?q=type:"Feature"
Preload MCP server tools into the initial agent function list (instead of lazy discovery)https://github.com/github/copilot-cli/issues/3787#top
area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registryhttps://github.com/github/copilot-cli/issues?q=state%3Aopen%20label%3A%22area%3Amcp%22
https://github.com/tamirdresher
tamirdresherhttps://github.com/tamirdresher
on Jun 13, 2026https://github.com/github/copilot-cli/issues/3787#issue-4656504326
Squadhttps://github.com/bradygaster/squad
bradygaster/squad#1306https://github.com/bradygaster/squad/pull/1306
github-actionshttps://github.com/apps/github-actions
triagehttps://github.com/github/copilot-cli/issues?q=state%3Aopen%20label%3A%22triage%22
on Jun 13, 2026https://github.com/github/copilot-cli/issues/3787#event-26713241416
examonhttps://github.com/examon
area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registryhttps://github.com/github/copilot-cli/issues?q=state%3Aopen%20label%3A%22area%3Amcp%22
on Jun 15, 2026https://github.com/github/copilot-cli/issues/3787#event-26751205330
github-actionshttps://github.com/apps/github-actions
triagehttps://github.com/github/copilot-cli/issues?q=state%3Aopen%20label%3A%22triage%22
on Jun 15, 2026https://github.com/github/copilot-cli/issues/3787#event-26751212518
examonhttps://github.com/examon
Featurehttps://github.com/github/copilot-cli/issues?q=type:"Feature"
on Jun 15, 2026https://github.com/github/copilot-cli/issues/3787#event-26751225421
https://github.com/examon
examonhttps://github.com/examon
on Jun 17, 2026https://github.com/github/copilot-cli/issues/3787#issuecomment-4726492885
examonhttps://github.com/examon
completedhttps://github.com/github/copilot-cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 17, 2026https://github.com/github/copilot-cli/issues/3787#event-26844111955
Sign up for freehttps://github.com/signup?return_to=https://github.com/github/copilot-cli/issues/3787
Sign in to commenthttps://github.com/login?return_to=https://github.com/github/copilot-cli/issues/3787
area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registryhttps://github.com/github/copilot-cli/issues?q=state%3Aopen%20label%3A%22area%3Amcp%22
Featurehttps://github.com/github/copilot-cli/issues?q=type:"Feature"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.