Using the Model Context Protocol Server with Claude Desktop

A guide to integrating MCP-based tools with Claude and other AI assistants

What is MCP?

Model Context Protocol (MCP) allows Claude and other AI assistants to access external tools and data sources through specialized servers. This enables Claude to perform actions like retrieving financial data, converting files, or managing directories.

Setting Up MCP with Claude Desktop

Follow these steps to connect Claude Desktop to our MCP server:

1. Install Claude Desktop

Download and install the Claude desktop application from claude.ai/download

2. Access Developer Settings

  1. Open Claude Desktop
  2. Click on the Claude menu in the top menu bar
  3. Select “Settings”
  4. Navigate to the “Developer” tab
  5. Click the “Edit Config” button

3. Configure the MCP Server

This will open your file browser to edit the claude_desktop_config.json file. Add our AgentAI MCP server configuration as shown below:

{
  "mcpServers": {
    "agentai": {
      "command": "npx",
      "args": [
        "-y",
        "@agentai/mcp-server"
      ],
      "env": {
        "API_TOKEN": "YOUR_API_TOKEN_HERE"
      }
    }
  }
}

Replace YOUR_API_TOKEN_HERE with your actual API token.

Note: You can also set up multiple MCP servers, including the local filesystem server:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/accessible/directory1",
        "/path/to/accessible/directory2"
      ]
    },
    "agentai": {
      "command": "npx",
      "args": [
        "-y",
        "@agentai/mcp-server"
      ],
      "env": {
        "API_TOKEN": "YOUR_API_TOKEN_HERE"
      }
    }
  }
}

4. Restart Claude Desktop

Save the configuration file and restart Claude Desktop for the changes to take effect.

Using MCP Tools with Claude

Once configured:

  1. Open a new conversation in Claude Desktop
  2. Look for the “Tools” icon in the main chat window
  3. Clicking this icon will display all available tools from your configured MCP servers
  4. You can directly ask Claude to use these tools in your conversation

For example, typing “Give me the latest company financial details about HubSpot” will prompt Claude to:

  • Identify the appropriate tool from available MCP servers
  • Request your permission to use the tool
  • Execute the request
  • Provide the results in a formatted response

MCP Server Package

Our MCP server is available as an NPM package at https://www.npmjs.com/package/@agentai/mcp-server. The package provides the necessary infrastructure to connect Claude and other AI assistants to our API services.

Security Considerations

  • Claude will always request your permission before running any MCP tool
  • You can grant permission for a single use or for the entire conversation
  • Review each action carefully before approving

Troubleshooting

If you encounter issues:

  1. Verify your API token is correct
  2. Ensure Claude Desktop has been restarted after configuration changes
  3. Check that the NPM packages can be installed (requires internet connection)
  4. Examine Claude’s error messages for specific issues

Using with Other MCP-Compatible Applications

This MCP server can be used with any application that supports the Model Context Protocol, not just Claude Desktop. The configuration process may vary by application, but the core functionality remains the same.

For additional help or to report issues, please contact our support team.