Docs / Integrations
MCP

Use Prefsly with VS Code

Let an agent in VS Code retrieve your selected preferences.

Set it up

  1. Create a token for one profile in Prefsly Connections.
  2. Run MCP: Open User Configuration in VS Code and add the example below. VS Code will ask for the token securely when the server starts.

    VS Code user MCP configuration

    {"inputs":[{"type":"promptString","id":"prefsly-token","description":"Prefsly profile token","password":true}],"servers":{"prefsly":{"type":"http","url":"https://www.prefsly.io/mcp","headers":{"Authorization":"Bearer ${input:prefsly-token}"}}}}
  3. In Chat: Open Customizations, select Instructions and the User scope for your active agent, then add the startup instruction below.

    Startup instruction for VS Code user instructions

    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

Tool availability and trust prompts depend on the VS Code version and workspace configuration.

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

VS Code MCP server documentation ↗

Related Prefsly guides

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