Skip to main content

MCP Server Workflow

This workflow allows you to access an ApertureDB instance from an MCP platform, specifically any Generative AI that supports the Model Context Protocol.

For more detailed information about what this workflow is doing, see the mcp-server documentation in GitHub.

Creating the workflow

For general information on creating workflows in ApertureDB Cloud see Creating and Deleting Workflows.

Configure your workflow by selecting:

  • Which instance to use. If you only have one instance, there will be no options to select.

MCP Server setup dialog

Once you have filled in the fields, click "Submit". Your workflow will be created and will start running.

See the results

Jupyter Notebook

If you are running the Jupyter Notebook workflow, then there is a notebook mcp.ipynb that gives a quick demonstration of writing an MCP client by hand. This will help you to test your MCP server.

Jupyter notebook for MCP server

MCP Inspector

An easy way to test your MCP server is by using the MCP Inspector. There are a number of ways to run this, but the recommended instructions are:

docker run -it -p 6274:6274 -p 6277:6277 allfunc/mcp-inspector:0.14.0

Entering URL and bearer token in the MCP Inspector

  1. Select "Streamable HTTP" as the Transport Type.
  2. Fill in the URL for your server, e.g. https://test.farm1234.cloud.aperturedata.io/mcp/
  3. Under Authentication, enter the authorization bearer token assigned to this workflow. You can find the token by clicking "Connection Helper" in the Cloud UI.

MCP Server Connection Helper shows token and setup details

  1. Select the "Tools" tab and click on "List Tools"

MCP Inspector lists the available tools

  1. Click on a tool, say find_similar_documents, type a query, and select the descriptor set. Note, you can populate a text corpus on your instance by running the Website Chatbot workflow.

MCP Inspector finds similar documents

Claude Desktop

  1. First install Claude Desktop
  2. Find the configuration directory for Claude. On MacOS, this is ~/Library/Application\ Support/Claude
  3. Download the helper script stdio-bridge.py. This allows Claude to see a remote streamable-HTTP MCP server with bearer token authentication as if it were a local stdio MCP server.
  4. Create a file called claude_desktop_config.json with contents like:
{
"mcpServers": {
"aperturedb": {
"command": "python3",
"args": [
"/path/to/stdio-bridge.py",
"https://<hostname>/mcp/",
"<token>"
]
}
}
}

As before, get the hostname and token from the connection helper. Make sure you change the path to stdio-bridge.py.

  1. Start or restart Claude Desktop and ask it "What MCP servers do you have access to?"