Skip to content

How to connect Claude Desktop to MCP

Claude Desktop is Anthropic’s standalone AI assistant application that supports MCP through a JSON configuration file.

When combined with Model Context Protocol (MCP) servers, Claude Desktop becomes even more powerful. Using MCP servers, you can give Claude access to your tools and infrastructure, allowing it to work with your APIs, databases, and other services.

This guide shows you how to connect Claude Desktop to a Gram-hosted MCP server using Taskmaster, a full-stack CRUD application for task and project management. Taskmaster includes a web UI for managing projects and tasks, a built-in HTTP API, OAuth 2.0 authentication, and a Neon PostgreSQL database for storing data. Try the demo app to see it in action.

You’ll learn how to set up the connection, test it, and use natural language to manage tasks, projects, and workflows through Claude Desktop.

Find the full code and OpenAPI document in the Taskmaster repository.

To follow this tutorial, you need:

Before connecting Claude Desktop to a Taskmaster MCP server, you first need to create one. Follow our guide to creating a Taskmaster MCP server.

Once your Taskmaster MCP server is ready, there are four ways to connect it to Claude Desktop:

  • Download a .mcpb file from the Gram installation page (recommended).
  • Use the Gram CLI to generate an installation package.
  • Use the MCP configuration file in Claude Desktop.
  • Use the Claude Connectors feature to connect directly to your Gram-hosted MCP server.

Connecting Claude Desktop from the Gram installation page

Section titled “Connecting Claude Desktop from the Gram installation page”

The quickest way to connect Claude Desktop to a Gram-hosted MCP server is to download the installation package directly from the Gram dashboard.

Go to your toolset’s installation page at https://app.getgram.ai/mcp/<your-toolset-slug>/install and click the Claude Desktop button to download a .mcpb file.

Screenshot showing the Gram installation page with client options

Open the downloaded .mcpb file. Claude Desktop will prompt you to install the MCP server. Click Install to complete the setup.

Connecting Claude Desktop using the Gram CLI

Section titled “Connecting Claude Desktop using the Gram CLI”

Alternatively, you can use the Gram CLI to generate an installation package (.mcpb file).

Verify the installation:

Terminal window
gram --version

For more information about the Gram CLI, see the Gram CLI documentation.

Authenticate with your Gram account:

Terminal window
gram auth

Follow the prompts to complete authentication. This creates an API key and saves it locally.

Verify authentication:

Terminal window
gram whoami

Screenshot showing the output of the gram auth command and gram whoami commands

Run the install command:

Terminal window
gram install claude-desktop --toolset your-toolset-slug

Replace your-toolset-slug with the slug of your toolset. For example, to install the Taskmaster toolset:

Terminal window
gram install claude-desktop --toolset taskmaster

The CLI automatically fetches the toolset configuration from Gram and generates the installation package in your Downloads folder.

Open the generated .mcpb file. Claude Desktop will prompt to install the MCP server. Click Install to complete the setup.

Open Claude Desktop and verify the connection by creating a test task:

Create a new task called "Test MCP connection" with description "Verify that the Taskmaster MCP server is working correctly"

Claude will use the Gram-hosted MCP server to create the task through the Taskmaster API.

Connecting Claude Desktop to your Gram-hosted MCP server using the MCP configuration file

Section titled “Connecting Claude Desktop to your Gram-hosted MCP server using the MCP configuration file”

In Claude Desktop, open settings:

  • macOS: Go to Claude -> Settings… from the menu bar.
  • Windows: Access settings through the application menu.

Select Developer from the left sidebar, then click Edit Config. This will create or open the MCP configuration file at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add your Taskmaster MCP server configuration to the file.

  • For Pass-through Authentication, the configuration looks like this:

    {
    "mcpServers": {
    "GramTaskmaster": {
    "command": "npx",
    "args": [
    "mcp-remote",
    "https://app.getgram.ai/mcp/your-taskmaster-slug",
    "--header",
    "MCP-TASKMASTER-API-KEY:<your-key-here>"
    ]
    }
    }
    }
  • For a Managed Authentication server, the configuration looks like:

    {
    "mcpServers": {
    "GramTaskmaster": {
    "command": "npx",
    "args": [
    "mcp-remote",
    "https://app.getgram.ai/mcp/your-taskmaster-slug",
    "--header",
    "Authorization: ${GRAM_KEY}"
    ],
    "env": {
    "GRAM_KEY": "Bearer <your-gram-api-key>"
    }
    }
    }
    }

Replace your-taskmaster-slug with your slug from your Taskmaster MCP server configuration and <your-gram-api-key> with your Gram API key.

Save the configuration file, then close Claude Desktop completely and reopen it. When the application has restarted, click the hamburger icon in the chat field to see the available tools.

Test the connection by asking:

Create a new task called "Test MCP connection" with description "Verify that the Taskmaster MCP server is working correctly"

Claude will use your Gram-hosted MCP server to create a task by calling the Taskmaster API.

Connecting Claude Desktop to your Gram-hosted MCP server using Claude Connectors

Section titled “Connecting Claude Desktop to your Gram-hosted MCP server using Claude Connectors”

Claude Connectors allow you to connect Claude Desktop to your Gram-hosted MCP server without manually editing the configuration file. This is more user-friendly, but comes with one important limitation: Your MCP server must be public and must not require environment variables.

If you need to use an authenticated server or an environment variable, you need to use the MCP configuration file method described above.

Here’s how to set up a connection using Claude Connectors:

In Claude Desktop, open settings:

  • macOS: Go to Claude -> Settings… from the menu bar.
  • Windows: Access settings through the application menu.

Select Connectors from the left sidebar. This is where you can manage your connections to external services.

Click the Add custom connector button.

In the popup, provide the following information:

  • Name: A descriptive name for your connector (for example, Taskmaster MCP Server).
  • URL: The URL of your Gram-hosted MCP server (for example, https://app.getgram.ai/mcp/your-slug).

Claude Desktop may show a warning about trusting the server. Since this is your own MCP server, you can safely ignore this warning.

Click Add to create the connector.

Screenshot showing the Add custom connector dialog

There’s no need to restart; you can test the connection immediately. In the chat, ask Claude something that requires the MCP server.

Claude should prompt you with a tool call request. This means the connection is working, and Claude can now use your Gram-hosted MCP server.

All three methods connect Claude Desktop to a Gram-hosted MCP server, but they have different use cases:

  • Gram CLI: The recommended method for most users. It provides a simple, automated setup process and supports authenticated servers. Requires installing the Gram CLI and authenticating with a Gram API key.
  • MCP configuration file: Use this method for advanced configuration scenarios or when the Gram CLI is not available. Provides full control over the connection configuration.
  • Claude Connectors: The simplest method for public MCP servers that don’t require authentication. Does not support authenticated servers or environment variables.
Attribute/RequirementGram CLIMCP Configuration FileClaude Desktop Connectors
Public MCP server
Local MCP server
Supports authenticated server
Manual configuration needed
User-friendly setup
Supports passthrough variables
Requires CLI installation

If you’re experiencing issues:

  • Gram CLI method:

    • Ensure the Gram CLI is installed and accessible in the PATH.
    • Verify authentication by running gram whoami.
    • Check that the toolset slug is correct and accessible with the API key.
    • For unauthorized errors, verify the Gram API key in the dashboard under Settings > API Keys.
  • MCP configuration file method:

    • Verify the MCP server URL is correct in the configuration.
    • Check that the API behind the MCP server is reachable from the machine.
    • Ensure the npx command is available (reinstall Node.js if needed).
    • Try restarting Claude Desktop after making configuration changes.
    • For authenticated servers, verify the Gram API key in the dashboard under Settings > API Keys.
  • Claude Connectors method:

    • Verify the MCP server URL is correct.
    • Ensure the MCP server is public and does not require authentication.

Ready to build your own MCP server? Try Gram today and see how easy it is to turn any API into agent-ready tools that work across all your development environments.