| 1 | --- |
| 2 | title: MCP |
| 3 | description: MCP use and customization |
| 4 | keywords: [tool, use, function calling, claude, automatic] |
| 5 | --- |
| 6 | |
| 7 | # MCP |
| 8 | |
| 9 | As AI systems get better, they're still held back by their training data and |
| 10 | can't access real-time information or specialized tools. The [Model Context |
| 11 | Protocol](https://modelcontextprotocol.io/introduction) (MCP) fixes this by |
| 12 | letting AI models connect with outside data sources, tools, and environments. |
| 13 | This allows smooth sharing of information and abilities between AI systems and |
| 14 | the wider digital world. This standard, created by Anthropic to bring together |
| 15 | prompts, context, and tool use, is key for building truly useful AI experiences |
| 16 | that can be set up with custom tools. |
| 17 | |
| 18 | ## How it works |
| 19 | |
| 20 | Currently custom tools can be configured using the Model Context |
| 21 | Protocol standard to unify prompts, context, and tool use. |
| 22 | |
| 23 | MCP Servers can be added to hub Assistants using `mcpServers` blocks. You can |
| 24 | explore available MCP server blocks |
| 25 | [here](https://hub.continue.dev/explore/mcp). |
| 26 | |
| 27 | <Info>MCP can only be used in the **agent** mode.</Info> |
| 28 | |
| 29 | ## Quick Start |
| 30 | |
| 31 | Below is a quick example of setting up a new MCP server for use in your assistant: |
| 32 | |
| 33 | 1. Create a folder called `.continue/mcpServers` at the top level of your workspace |
| 34 | 2. Add a file called `playwright-mcp.yaml` to this folder. |
| 35 | 3. Write the following contents to `playwright-mcp.yaml` and save. |
| 36 | |
| 37 | ```yaml title=".continue/mcpServers/playwright-mcp.yaml" |
| 38 | name: Playwright mcpServer |
| 39 | version: 0.0.1 |
| 40 | schema: v1 |
| 41 | mcpServers: |
| 42 | - name: Browser search |
| 43 | command: npx |
| 44 | args: |
| 45 | - "@playwright/mcp@latest" |
| 46 | ``` |
| 47 | |
| 48 | Now test your MCP server by prompting the following command: |
| 49 | |
| 50 | ``` |
| 51 | Open the browser and navigate Hacker News. Save the top 10 headlines in a hn.txt file. |
| 52 | ``` |
| 53 | |
| 54 | The result will be a generated file called `hn.txt` in the current working directory. |
| 55 | |
| 56 |  |
| 57 | |
| 58 | ## Continue Documentation Search |
| 59 | |
| 60 | You can set up an MCP server to search the Continue documentation directly from your agent. This is particularly useful for getting help with Continue configuration and features. |
| 61 | |
| 62 | 1. Create a folder called `.continue/mcpServers` at the top level of your workspace |
| 63 | 2. Add a file called `continue-docs-mcp.yaml` to this folder |
| 64 | 3. Write the following contents and save: |
| 65 | |
| 66 | ```yaml title=".continue/mcpServers/continue-docs-mcp.yaml" |
| 67 | name: Continue Documentation MCP |
| 68 | version: 0.0.1 |
| 69 | schema: v1 |
| 70 | mcpServers: |
| 71 | - name: Continue Docs Search |
| 72 | type: stdio |
| 73 | command: npx |
| 74 | args: |
| 75 | - mint-mcp |
| 76 | - add |
| 77 | - continue-docs |
| 78 | ``` |
| 79 | |
| 80 | Now you can search the Continue documentation by asking questions like: |
| 81 | |
| 82 | ``` |
| 83 | Search for model setup instructions in the Continue docs |
| 84 | ``` |
| 85 | |
| 86 | ``` |
| 87 | Find documentation about context providers |
| 88 | ``` |
| 89 | |
| 90 | ``` |
| 91 | How do I configure autocomplete in Continue? |
| 92 | ``` |
| 93 | |
| 94 | The MCP server will search the Continue documentation and provide relevant information to help with your questions. |
| 95 | |
| 96 | For detailed setup instructions and troubleshooting, see the [Continue MCP Reference](/reference/continue-mcp). |
| 97 | |
| 98 | ## Using MCP Servers |
| 99 | |
| 100 | To set up your own MCP server, read the [MCP |
| 101 | quickstart](https://modelcontextprotocol.io/quickstart) and then [create an |
| 102 | `mcpServers` |
| 103 | block](https://hub.continue.dev/new?type=block&blockType=mcpServers) or add a local MCP |
| 104 | server block to your [config file](./configuration.md): |
| 105 | |
| 106 | <Tabs> |
| 107 | <Tab title="YAML"> |
| 108 | ```yaml title="config.yaml" |
| 109 | mcpServers: |
| 110 | - name: SQLite MCP |
| 111 | command: npx |
| 112 | args: |
| 113 | - "-y" |
| 114 | - "mcp-sqlite" |
| 115 | - "/path/to/your/database.db" |
| 116 | |
| 117 | ```` |
| 118 | </Tab> |
| 119 | <Tab title="JSON"> |
| 120 | ```json title="config.json" |
| 121 | { |
| 122 | "experimental": { |
| 123 | "modelContextProtocolServers": [ |
| 124 | { |
| 125 | "transport": { |
| 126 | "type": "stdio", |
| 127 | "command": "uvx", |
| 128 | "args": ["mcp-server-sqlite", "--db-path", "/path/to/your/database.db"] |
| 129 | } |
| 130 | } |
| 131 | ] |
| 132 | } |
| 133 | } |
| 134 | ```` |
| 135 | |
| 136 | </Tab> |
| 137 | </Tabs> |
| 138 | |
| 139 | ### Syntax |
| 140 | |
| 141 | MCP blocks follow the established syntax for blocks, with a few additional properties specific to MCP servers. |
| 142 | |
| 143 | - `name` (**required**): A display name for the MCP server. |
| 144 | - `command` (**required**): The command to run to start the MCP server. |
| 145 | - `type` (optional): The type of the MCP server: `sse`, `stdio`, `streamable-http` |
| 146 | - `args` (optional): Arguments to pass to the command. |
| 147 | - `env` (optional): Secrets to be injected into the command as environment variables. |
| 148 | |
| 149 | ### Transport Types |
| 150 | |
| 151 | MCP now supports remote server connections through HTTP-based transports, expanding beyond the traditional local stdio transport method. This enables integration with cloud-hosted MCP servers and distributed architectures. |
| 152 | |
| 153 | #### Server-Sent Events (SSE) Transport |
| 154 | |
| 155 | For real-time streaming communication, use the SSE transport: |
| 156 | |
| 157 | ```yaml |
| 158 | mcpServers: |
| 159 | - name: Name |
| 160 | type: sse |
| 161 | url: https://.... |
| 162 | ``` |
| 163 | |
| 164 | #### Standard Input/Output (stdio) |
| 165 | |
| 166 | For local MCP servers that communicate via standard input and output: |
| 167 | |
| 168 | ```yaml |
| 169 | mcpServers: |
| 170 | - name: Name |
| 171 | type: stdio |
| 172 | command: npx |
| 173 | args: |
| 174 | - "@modelcontextprotocol/server-sqlite" |
| 175 | - "/path/to/your/database.db" |
| 176 | ``` |
| 177 | |
| 178 | #### Streamable HTTP Transport |
| 179 | |
| 180 | For standard HTTP-based communication with streaming capabilities: |
| 181 | |
| 182 | ```yaml |
| 183 | mcpServers: |
| 184 | - name: Name |
| 185 | type: streamable-http |
| 186 | url: https://.... |
| 187 | ``` |
| 188 | |
| 189 | These remote transport options allow you to connect to MCP servers hosted on remote infrastructure, enabling more flexible deployment architectures and shared server resources across multiple clients. |
| 190 | |
| 191 | For detailed information about transport mechanisms and their use cases, refer to the official MCP documentation on [transports](https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse). |
| 192 | |
| 193 | ### Working with Secrets |
| 194 | |
| 195 | With some MCP servers you will need to use API keys or other secrets. You can leverage locally stored environments secrets |
| 196 | as well as access hosted secrets in the Continue Hub. To leverage Hub secrets, you can use the `inputs` property in your MCP env block instead of `secrets`. |
| 197 | |
| 198 | ```yaml |
| 199 | mcpServers: |
| 200 | - name: Supabase MCP |
| 201 | command: npx |
| 202 | args: |
| 203 | - -y |
| 204 | - "@supabase/mcp-server-supabase@latest" |
| 205 | - --access-token |
| 206 | - ${{ secrets.SUPABASE_TOKEN }} |
| 207 | env: |
| 208 | SUPABASE_TOKEN: ${{ secrets.SUPABASE_TOKEN }} |
| 209 | - name: GitHub |
| 210 | command: npx |
| 211 | args: |
| 212 | - "-y" |
| 213 | - "@modelcontextprotocol/server-github" |
| 214 | env: |
| 215 | GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }} |
| 216 | ``` |