7 - MCP

The Dosu MCP (Model Context Protocol) server lets AI coding assistants search your organization's knowledge base directly. Connect tools like Cursor, Claude Code, or VS Code to get answers from your documentation, code, and conversations without leaving your editor.

Getting Started

When you create a Dosu organization, a default MCP deployment is automatically created for you. This deployment is named "Default MCP" and is linked to your organization's data sources.

To find your MCP deployment:

  1. Go to Settings → MCP
  2. You'll see your default deployment listed with its deployment ID and connection instructions

Creating Additional MCP Deployments

If you need additional MCP deployments with different data source configurations:

  1. Go to Settings → MCP
  2. Click Add New
  3. Enter a name for your MCP server (e.g., "Engineering Team MCP")
  4. Select which data sources the MCP server should have access to
  5. Click Create

After creation, you'll see your deployment ID and connection instructions for each supported client.

Connecting Your AI Assistant

Claude Code

Claude Code supports OAuth authentication natively. Run this command in your terminal:

claude mcp add --transport http dosu https://api.dosu.dev/v1/mcp \
  --header "X-Deployment-ID: <your-deployment-id>"

Replace <your-deployment-id> with your deployment ID. Claude Code will prompt you to authenticate through your browser—no API key required.

Cursor

Cursor currently requires an API key for authentication. Add the following to your Cursor MCP settings file (.cursor/mcp.json in your project root or global config):

{
  "mcpServers": {
    "dosu": {
      "url": "https://api.dosu.dev/v1/mcp",
      "headers": {
        "X-Deployment-ID": "<your-deployment-id>",
        "X-Dosu-API-Key": "<your-api-key>"
      }
    }
  }
}

Replace <your-deployment-id> and <your-api-key> with your values. You can create an API key in Settings → API Keys.

Tip: You can also click the "Configure on Cursor" button in your MCP deployment settings to automatically open Cursor with the configuration pre-filled.

VS Code and Other Clients

MCP support in VS Code depends on your AI extension. Use these connection details:

Transport: HTTP

Endpoint: https://api.dosu.dev/v1/mcp

Authentication: OAuth 2.0 (recommended) or API Key

Required Headers:

Refer to your extension's documentation for adding MCP servers.

Authentication

Dosu MCP supports two authentication methods:

For clients that support OAuth, Dosu uses OAuth 2.0 with Dynamic Client Registration. The client will prompt you to authenticate through your browser. This is the recommended approach—it requires less setup and automatically rotates credentials.

API Key

If your client doesn't support OAuth, you can fall back to API key authentication. Create an API key in Settings → API Keys and include it in the X-Dosu-API-Key header.

Available Tools

When connected to Dosu's MCP server, AI assistants can use these tools:

All search tools return the most relevant results based on your query, along with links to the source material.

Managing MCP Deployments

To view, edit, or delete your MCP deployments, go to Settings → MCP.

From here you can:

Troubleshooting

"No data sources found for this deployment"

Make sure you've connected at least one data source to your MCP deployment. Go to Settings → MCP → [Your Deployment] → Manage Connections.

"Invalid or expired API key"

Create a new API key in Settings → API Keys. Make sure you're using the full key (starting with dosu_) in your configuration.

"Source not found or access denied"

The source may have been removed from your connected data sources, or the search results have expired. Try searching again.

Connection Issues

  1. Verify your deployment ID is correct
  2. If using API keys, check that your key hasn't been revoked
  3. Try the greet tool to test basic connectivity