diff --git a/docs/gram/clients/using-claude-desktop-with-gram-mcp-server.mdx b/docs/gram/clients/using-claude-desktop-with-gram-mcp-server.mdx index 6487658c..5e7ee6f5 100644 --- a/docs/gram/clients/using-claude-desktop-with-gram-mcp-server.mdx +++ b/docs/gram/clients/using-claude-desktop-with-gram-mcp-server.mdx @@ -26,11 +26,94 @@ 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](/docs/gram/examples/creating-taskmaster-mcp-server). -Once your Taskmaster MCP server is ready, there are two ways you can connect it to Claude Desktop: +Once your Taskmaster MCP server is ready, there are three ways to connect it to Claude Desktop: +- Use the Gram CLI to generate an installation package (recommended). - 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 using the Gram CLI + +The Gram CLI provides the simplest way to connect Claude Desktop to a Gram-hosted MCP server. The CLI generates an installation package (`.mcpb` file) that can be opened to automatically configure the connection. + +### 1. Install the Gram CLI + +Install the Gram CLI using curl: + +```bash +curl -fsSL https://go.getgram.ai/cli.sh | bash +``` + +Alternatively, install using Homebrew: + +```bash +brew tap speakeasy-api/tap +brew install gram +``` + +Verify the installation: + +```bash +gram --version +``` + +For more information about the Gram CLI, see the [Gram CLI documentation](/docs/gram/command-line). + +### 2. Authenticate with Gram + +Authenticate with the Gram account: + +```bash +gram auth +``` + +Follow the prompts to complete authentication. This creates an API key and saves it locally. + +Verify authentication: + +```bash +gram whoami +``` + +![Screenshot showing the output of the `gram auth` command and `gram whoami` commands](/assets/docs/gram/img/guides/claude-desktop/gram-auth-whoami.png) + +### 3. Generate the installation package + +Generate the `.mcpb` file for the MCP server toolset: + +```bash +gram install claude-desktop --toolset your-toolset-slug +``` + +Replace `your-toolset-slug` with the slug of the toolset. For example, to install the Taskmaster toolset: + +```bash +gram install claude-desktop --toolset taskmaster +``` + +The CLI automatically fetches the toolset configuration from Gram and generates the installation package in the Downloads folder. + + + +### 4. Install in Claude Desktop + +Open the generated `.mcpb` file. Claude Desktop will prompt to install the MCP server. Click **Install** to complete the setup. + +### 5. Test the connection + +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
@@ -153,31 +236,44 @@ Claude should prompt you with a tool call request. This means the connection is ## Deciding which method to use -Both methods connect Claude Desktop to your Gram-hosted MCP server, but they have different use cases: +All three methods connect Claude Desktop to a Gram-hosted MCP server, but they have different use cases: -- **MCP configuration file:** Use this method if you need to connect to an authenticated MCP server or if you want more control over the configuration. -- **Claude Connectors:** Use this method for a simpler setup with public MCP servers. It's more user-friendly and doesn't require manual configuration file editing. +- **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. ## Comparison of connection methods -| Attribute/Requirement | MCP Configuration File | Claude Desktop Connectors | -|--------------------------------|------------------------|---------------------------| -| Public MCP server | ✅ | ✅ | -| Local MCP server | ✅ | ❌ | -| Supports authenticated server | ✅ | ❌ | -| Manual configuration needed | ✅ | ❌ | -| User-friendly setup | ❌ | ✅ | -| Supports passthrough variables | ✅ | ❌ | +| Attribute/Requirement | Gram CLI | MCP Configuration File | Claude Desktop Connectors | +|--------------------------------|----------|------------------------|---------------------------| +| Public MCP server | ✅ | ✅ | ✅ | +| Local MCP server | ❌ | ✅ | ❌ | +| Supports authenticated server | ✅ | ✅ | ❌ | +| Manual configuration needed | ❌ | ✅ | ❌ | +| User-friendly setup | ✅ | ❌ | ✅ | +| Supports passthrough variables | ✅ | ✅ | ❌ | +| Requires CLI installation | ✅ | ❌ | ❌ | ## Troubleshooting If you're experiencing issues: -- Verify the MCP server URL is correct in your configuration. -- Check that the API behind the MCP server is reachable from your machine. -- Ensure the `npx` command is available (reinstall Node.js if needed). -- Try restarting Claude Desktop after making configuration changes. -- For authenticated servers, verify your Gram API key in the dashboard under **Settings > API Keys**. +- **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. ## What's next diff --git a/public/assets/docs/gram/img/guides/claude-desktop/gram-auth-whoami.png b/public/assets/docs/gram/img/guides/claude-desktop/gram-auth-whoami.png new file mode 100644 index 00000000..d0dfd6cb Binary files /dev/null and b/public/assets/docs/gram/img/guides/claude-desktop/gram-auth-whoami.png differ diff --git a/public/assets/docs/gram/img/guides/claude-desktop/gram-install-claude-desktop.png b/public/assets/docs/gram/img/guides/claude-desktop/gram-install-claude-desktop.png new file mode 100644 index 00000000..673d48a2 Binary files /dev/null and b/public/assets/docs/gram/img/guides/claude-desktop/gram-install-claude-desktop.png differ diff --git a/public/assets/docs/gram/videos/installing-gram-cli-claude-desktop.mp4 b/public/assets/docs/gram/videos/installing-gram-cli-claude-desktop.mp4 new file mode 100644 index 00000000..dae8dc47 Binary files /dev/null and b/public/assets/docs/gram/videos/installing-gram-cli-claude-desktop.mp4 differ