Connect GitHub Copilot CLI to Semlith
How to connect GitHub Copilot CLI to Semlith over MCP, the command or file that adds it, and how to check the connection works.
${SEMLITH_BIN} where the binary goes, the path which semlith prints. Set up your agent client explains it and the HTTP form.GitHub Copilot CLI — ~/.copilot/mcp-config.json, or /mcp add in a
session. Its name for a subprocess is local rather than stdio; a remote
server is http. copilot mcp add has no scope flag and always writes the user
configuration at ~/.copilot/mcp-config.json, which covers every repository; a
per-repository entry means editing .mcp.json by hand — see
https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers.
{
"mcpServers": {
"semlith": {
"type": "local",
"command": "${SEMLITH_BIN}",
"args": ["mcp"],
"tools": ["*"],
"deferTools": "never"
}
}
}Or against a daemon on another machine, over HTTP:
{
"mcpServers": {
"semlith": {
"type": "http",
"url": "http://127.0.0.1:7365/mcp",
"headers": { "Authorization": "Bearer ${SEMLITH_AGENT_KEY}" },
"tools": ["*"]
}
}
}copilot mcp add --transport http semlith http://127.0.0.1:7365/mcp --header "Authorization: Bearer ${SEMLITH_AGENT_KEY}"To replace an existing entry:
copilot mcp remove semlithcopilot mcp add semlith -- "${SEMLITH_BIN}" mcpIts user-level instructions file, read on every session, to which
semlith setup --register-all appends the rule block — see
https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions.
${SEMLITH_RULES}