6. Follow-along: Connect to an AI agent
1m

Follow-along: Connect to an AI agent

We're using Claude as our AI Agent.

  1. Open up Claude.

  2. In the Application tool bar, open up Settings using Cmd+, on MacOS.

    You can also access this through the main Claude menu dropdown.

    Accessing settings on MacOS

    Selecting Settings from the Claude application menu

    On Windows, click on the app's menu button in the top-left corner, then go to File, Settings.

  3. Select the Developer option from the left-hand menu. In this window we'll see a short overview about Claude's compatibility with servers that use MCP.

  4. Click Edit Config.

    The Developer tab in Claude's settings, highlighting the Edit Config button

  5. This will open a new file system window, opened to claude_desktop_config.json. Open it in your code editor.

  6. If you're running a fresh installation of Claude, you'll probably see an empty mcpServers config:

    claude_desktop_config.json
    {
    "mcpServers": {}
    }

    If you've played with MCP servers before, you'll probably have config defined here already. Copy your existing config and save it somewhere safe. Then, clear the file so we can start fresh and test our new MCP server in isolation.

  7. Add the following inside the mcpServers object:

    claude_desktop_config.json
    {
    "mcpServers": {
    "airlock-mcp": {
    "command": "npx",
    "args": ["mcp-remote", "http://127.0.0.1:5000/mcp"]
    }
    }
    }

    This will run our MCP server using the mcp-remote package.

Test the connection

  1. Restart Claude. You'll need to quit the application completely, wait a few moments, then open it again.

  2. After a moment, Claude will open up a new tab in your browser to authenticate with the MCP server. Log in with the host@example.com account (password: host123!).

  3. Click on the Search & Tools button.

    The Search & Tools button in Claude

  4. Toggle off the Web search to verify that Claude is only using the MCP server.

  5. Ensure that the airlock-mcp server is toggled on.

  6. Try asking: "What are some available listings I can travel to?"

  7. Claude will ask to use a particular tool. Expand to see what tool it is. Click Allow once.

  8. Claude will return a response outlining the listings available and all the information needed.

Note: mcp-remote has a known issue where the scopes requested are missing from the authorization request. At the time of publishing this workshop content, this issue has not been resolved. Requests that involve the @requiredScopes will fail.

Task!

Troubleshooting tips

  • Try deleting the ~/.mcp-auth directory on your machine, which caches any previous login state.
  • You may need to restart Claude a few times.
  • Try stopping the MCP Inspector process.
Previous