Skip to main content

An AWS Labs Model Context Protocol (MCP) server for Amazon Q Business anonymous mode application.

Reason this release was yanked:

Invalid Documentation

Project description

AWS Labs Amazon Q Business anonymous mode MCP Server

An AWS Labs Model Context Protocol (MCP) server for Amazon Q Business anonymous mode application. This is a simple MCP server for Amazon Q Business, and it supports Amazon Q Business application created using anonymous mode access. Use this MCP server to query the Amazon Q Business application created using anonymous mode to get responses based on the content you have ingested in it.

Features

  • You can use this MCP server from your local machine
  • Query Amazon Q Business application created using anonymous mode to get responses based on the content you have ingested in it.

Prerequisites

  1. Sign up for an AWS account
  2. Create an Amazon Q Business application using anonynmous mode
  3. Install uv from Astral or the GitHub README
  4. Install Python using uv python install 3.10

Tools

QBusinessQueryTool

  • The QBusinessQueryTool takes the query specified by the user and queries the Amazon Q Business application to get a response.
  • Required parameter: query(str)
  • Example:
    • Can you get me the details of the ACME project? Use the QBusinessQueryTool to get the context.. Note that in this case the details of the ACME are required to be ingested to the underlying Amazon Q Business application created using anonymous mode.

Setup

IAM Configuration

  1. Provision a user in your AWS account IAM
  2. Attach a policy that contains at a minimum the qbusiness:ChatSync permission. Always follow the principal or least privilege when granting users permissions. See the documentation for more information on IAM permissions for Amazon Q Business.
  3. Use aws configure on your environment to configure the credentials (access ID and access key)

Installation

Cursor VS Code
Install MCP Server Install on VS Code
Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit ~/.aws/amazonq/mcp.json):
{
      "mcpServers": {
            "awslabs.amazon-qbusiness-anonymous-mcp-server": {
                  "command": "uvx",
                  "args": ["awslabs.qbusiness-anonymous-mcp-server"],
                  "env": {
                    "FASTMCP_LOG_LEVEL": "ERROR",
                    "QBUSINESS_APPLICATION_ID": "[Your Amazon Q Business application id]",
                    "AWS_PROFILE": "[Your AWS Profile Name]",
                    "AWS_REGION": "[Region where your Amazon Q Business application resides]"
                  },
                  "disabled": false,
                  "autoApprove": []
                }
      }
}

Windows Installation

For Windows users, the MCP server configuration format is slightly different:

{
  "mcpServers": {
    "awslabs.amazon-qbusiness-anonymous-mcp-server": {
      "disabled": false,
      "timeout": 60,
      "type": "stdio",
      "command": "uv",
      "args": [
        "tool",
        "run",
        "--from",
        "awslabs.amazon-qbusiness-anonymous-mcp-server@latest",
        "awslabs.amazon-qbusiness-anonymous-mcp-server.exe"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "QBUSINESS_APPLICATION_ID": "[Your Amazon Q Business application id]",
        "AWS_PROFILE": "[Your AWS Profile Name]",
        "AWS_REGION": "[Region where your Amazon Q Business application resides]"
      },
    }
  }
}

or docker after a successful docker build -t awslabs/amazon-kendra-index-mcp-server.:

# fictitious `.env` file with AWS temporary credentials
AWS_ACCESS_KEY_ID=<from the profile you set up>
AWS_SECRET_ACCESS_KEY=<from the profile you set up>
AWS_SESSION_TOKEN=<from the profile you set up>
  {
    "mcpServers": {
      "awslabs.amazon-qbusiness-anonymous-mcp-server": {
        "command": "docker",
        "args": [
          "run",
          "--rm",
          "--interactive",
          "--env-file",
          "/full/path/to/file/above/.env",
          "awslabs/amazon-qbusiness-anonymous-mcp-server:latest"
        ],
        "env": {},
        "disabled": false,
        "autoApprove": []
      }
    }
  }

NOTE: Your credentials will need to be kept refreshed from your host

Best Practices

  • Follow the principle of least privilege when setting up IAM permissions
  • Use separate AWS profiles for different environments (dev, test, prod)
  • Monitor broker metrics and logs for performance and issues
  • Implement proper error handling in your client applications

Security Considerations

When using this MCP server, consider:

  • This MCP server needs permissions to use conversation APIs with your Amazon Q Business application created in anonymous mode.
  • This MCP server cannot create, modify, or delete resources in your account

Troubleshooting

  • If you encounter permission errors, verify your IAM user has the correct policies attached
  • For connection issues, check network configurations and security groups
  • If resource modification fails with a tag validation error, it means the resource was not created by the MCP server
  • For general Amazon Q Business issues, consult the Amazon Q Business user guide

Version

Current MCP server version: 0.0.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file awslabs_amazon_qbusiness_anonymous_mcp_server-0.0.5.tar.gz.

File metadata

File hashes

Hashes for awslabs_amazon_qbusiness_anonymous_mcp_server-0.0.5.tar.gz
Algorithm Hash digest
SHA256 a73219da4eff4ee66f9f15bf935ce8fc5c2eb255e5bafdcd697d0af80d902f47
MD5 5e18e32b07e93a3a3a92f4727b2fa0dd
BLAKE2b-256 312a475f2c7594df3c5049e688e44d41602b824dca43c3891e781069caa16088

See more details on using hashes here.

Provenance

The following attestation bundles were made for awslabs_amazon_qbusiness_anonymous_mcp_server-0.0.5.tar.gz:

Publisher: release.yml on awslabs/mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file awslabs_amazon_qbusiness_anonymous_mcp_server-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for awslabs_amazon_qbusiness_anonymous_mcp_server-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4aab9d5906c501780fc0c86d01abc0c3177f34c185c504902d865d45e34ba4e9
MD5 515c722f78c59ab6f0d43c31cacbe097
BLAKE2b-256 df07626c68a151f624ac1c51edfcd4d64ea017b6b60587efe7a9b83fb81da662

See more details on using hashes here.

Provenance

The following attestation bundles were made for awslabs_amazon_qbusiness_anonymous_mcp_server-0.0.5-py3-none-any.whl:

Publisher: release.yml on awslabs/mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page