How to use MCP tools or built-in tools in a remote Copilot session from client
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- api, developer-experience
Research direction
Start with the Python create_session call and the remote CLI configuration shown in the issue. Compare how agent="agent1" and available_tools interact with the server-side mcp-config.json and .github/agents/agent1.agent.md. Done means the remote session exposes the requested built-in and jira_confluence_tools tools, or clearly documents the supported configuration and limitation.
Written by the indexing model from the issue text.
Description
I have a Copilot process running on a remote Linux sever started with the following command line
node /usr/local/bin/copilot --headless --host 0.0.0.0 --port 30007 --add-dir /opt/copilot-agents --log-dir /mnt/copilot/logs/30007 --log-level debug --allow-all-tools --disable-builtin-mcps
I see the copilot process is running and listen on the port 30007 correctly. I have set up a MCP tool under the folder [home of user running the above copilot process]/.copilot/mcp-config.json, I launched the copilot cli on the server as the same user and checked the MCP tool works correctly
"jira_confluence_tools": {
"type": "local",
"command": "npx",
"tools": [
"*"
],
"args": [ "mcp-remote", "http://127.0.0.1:38000/mcp"
]
}
also I created a python script on client side (a Windows machine), it creates a Copilot session to the remote server, here I want to use the above mcp tool jira_confluence_tools defined on the server in the remote session from the client, how can I make it?
I tried with the below code, but it doesn't work, I started the session and sent a message to Copilot server for triggering the MCP tool, but it returned that The `jira_confluence_tools` MCP server is **not connected or not registered** in this agent's session. This session appears to be running with a **very limited tool set** — only the two meta-tools (`skill` and `report_intent`) are present. Neither shell execution nor MCP integrations (Jira, Confluence) are connected.
can someone share how to add the MCP tool on remote server to the session? the agent claimed only have access to 2 tools, how can I use the built-in tools like create, edit, view, bash and so on in the remote session?
also I tried to set the parameter agent to None when calling the method client.create_session(), then the session gets access to all tools in sub_agent_tools, but I must specify an agent for my real use case
client = CopilotClient(ExternalServerConfig(url=base_url))
await client.start()
sub_agent_tools=["report_intent", "jira_confluence_tools-getJiraIssue", "create", "view", "edit", "bash"]
session = await asyncio.wait_for(
client.create_session(
on_permission_request=PermissionHandler.approve_all,
session_id=SESSION_ID,
agent="agent1", ### I have the agent agent1 defined under the folder /opt/copilot-agents/.github/agents/agent1.agent.md
streaming=True,
working_directory="/opt/copilot-agents",
system_message=SystemMessageReplaceConfig(mode="replace", content="you have access to all bash commands"),
available_tools=sub_agent_tools, ### I claims the available built-in tools here, but it doesn't work
),
timeout=TIMEOUT,
)
environment
github-copilot-sdk==0.3.0
GitHub Copilot CLI 1.0.39
Python 3.12.10
- Dominant language
- Java
- Stars
- 10.5k
- Forks
- 1.5k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 130
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/copilot-sdk
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2760 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2759 ·
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/copilot-sdk#2709 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
github/copilot-sdk#2673 ·
All issues in github/copilot-sdk
Similar issues
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1152 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/eo-graphs#75 ·