Model Context Protocol (MCP)

Model Context Protocol (MCP) is a protocol that enables complex AI interactions, and tool execution on your behalf, inside and outside of Visual Studio Code. It allows you to interact with AI models and tools in a more natural and intuitive way, without the need for manual coding or configuration.

Get Started

Review the MCP Settings to confirm your server port and authorization method.

Starting the server

To start the MCP server, select DBCode: MCP Start Server command from the command palette (F1 or Ctrl/Cmd + Shift + P).

Stopping the server

To stop the MCP server, select DBCode: MCP Stop Server command from the command palette (F1 or Ctrl/Cmd + Shift + P).

Using MCP

Once the server is running, you can use a MCP client to interact with the server.


Some examples of MCP clients include:

A more comprehensive list of MCP clients can be found on (https://glama.ai/mcp/clients).

Authorization methods

The MCP server can be configured to use different authorization methods. The authorization method determines how the server authenticates and authorizes clients.

Bearer token-based authorization

This method requires the MCP client to include a bearer token in the request headers. You can generate a bearer token using the DBCode: MCP Generate Authorization Token command from the command palette (F1 or Ctrl/Cmd + Shift + P).

Query string authorization

This method requires the MCP client to include a query string parameter in the MCP SSE url as the auth parameter. You can generate a query string parameter using the DBCode: MCP Generate Authorization Token command from the command palette (F1 or Ctrl/Cmd + Shift + P).

For example, if the MCP SSE url is https://localhost:8080/sse, the full url with the query string parameter would be https://localhost:8080/sse?auth=token.

None

This method does not require any authorization. It is recommended to use this method only for development and testing purposes.