GitHub Copilot CLI
Connect GitHub Copilot CLI to TermFlow's MCP server to open terminals, run commands, and read output.
TermFlow must be running, and you need your own GitHub Copilot CLI installation and credentials. The default MCP endpoint is http://127.0.0.1:42032/mcp.
Get Your Connection Details
- Open Settings → Connections.
- Click Connect an AI agent ⓘ to open Connect an AI agent (MCP).
- Choose the address your client can reach under Interface.
- Choose GitHub Copilot CLI under Agent and click Copy.
The modal fills in your address, MCP port, and token. Click Done to close it.
Add the MCP Server
Merge the generated termflow entry into ~/.copilot/mcp-config.json, preserving any other servers:
{
"mcpServers": {
"termflow": {
"type": "http",
"url": "http://127.0.0.1:42032/mcp",
"headers": {
"Authorization": "Bearer <token>",
"X-Termflow-Terminal-Id": "${TERMFLOW_TERMINAL_ID}"
}
}
}
}
Use the live values copied from the app. The generated config includes both headers even on localhost. Keep the block private: it contains your token. Authentication is required when Expose on local network is enabled; after rotating the token, copy the config again and update your client.
Terminal Identity
TermFlow injects TERMFLOW_TERMINAL_ID into every terminal it creates. The generated identity header refers to this variable so tools can identify the caller's terminal.
An honest note: The config source does not confirm that GitHub Copilot CLI expands
${VAR}inside headers. If expansion does not work,get_my_terminal,get_my_connections, and"me"cannot identify your terminal. Calllist_terminalsand pass explicit terminal IDs to tools instead, or set the header to a literal terminal ID for that session.
Verify the Connection
- Save the config and restart your client so it loads the server entry.
- Ask the agent to call
list_terminals; it should list the terminals open in TermFlow. - Ask it to create a terminal and run a command. Check the result in TermFlow.
If the client cannot connect, confirm TermFlow is running, the MCP port matches Settings → Connections, and the token is current if LAN access is enabled.
Next Steps
- MCP Tools Reference — all eleven tools and their parameters.
- Local API and Auth — localhost and LAN authentication.