Docs / Integrations
MCP

Use Prefsly with GitHub Copilot CLI

Give Copilot CLI one authorized Prefsly profile from the terminal.

Set it up

  1. Sign in to Copilot CLI with copilot login, or authenticate GitHub CLI with gh auth login. Create a profile token in Prefsly Connections and keep it out of shell history and version control.
  2. Run the command below to add Prefsly as a remote HTTP MCP server. The command stores the server in your user-level Copilot CLI configuration.

    Copilot CLI command

    copilot mcp add --transport http --header "Authorization: Bearer <profile-token>" prefsly https://www.prefsly.io/mcp
    copilot mcp list
  3. Run copilot mcp list or /mcp in Copilot CLI to verify the server.
  4. Add the startup instruction below to ~/.copilot/copilot-instructions.md to apply it across repositories.

    Startup instruction for ~/.copilot/copilot-instructions.md

    At the start of every new session, call the `prefsly` MCP tool `get_profile` and use its returned preferences throughout the session. If the call fails, tell me that prefsly.io preferences could not be loaded.
Good to know

Copilot CLI supports remote HTTP and SSE MCP servers. This guide uses a profile token for a predictable terminal and SSH setup; revoke it in Prefsly Connections to stop future reads.

Create and use a profile token

Update or disconnect

For copied prompts, copy a new prompt after edits. For MCP, your next tool call sees the saved revision. Revoke a connection from Prefsly Connections when you no longer want a client to retrieve the profile.

Official source

GitHub Copilot CLI MCP documentation ↗

Related Prefsly guides

Create and manage profilesMCP authentication optionsMCP troubleshootingPrivacy and sharing controls
Published by Prefsly · Last reviewed September 25, 2026 · All documentation