{"slug": "amazon-quick-integration-with-time-series-databases-for-market-intelligence-mcp", "title": "Amazon Quick integration with time-series databases for market intelligence using MCP", "summary": "Amazon Quick has integrated Model Context Protocol (MCP) to allow financial analysts to query time-series databases using conversational language, eliminating the need for complex SQL queries. The integration connects Amazon Quick with KDB-X time-series databases through an MCP server running on Amazon EC2, using Amazon Bedrock AgentCore Gateway for authentication and routing. This capability enables traders and analysts to ask natural language questions and receive actionable insights from high-frequency market data, with applicability extending to IoT sensor monitoring and DevOps performance dashboards.", "body_md": "[Artificial Intelligence](https://aws.amazon.com/blogs/machine-learning/)\n\n# Amazon Quick integration with time-series databases for market intelligence using MCP\n\nModel Context Protocol (MCP) integration in Amazon Quick transforms how financial analysts access time-series market intelligence, removing the need for complex database queries. As a financial analyst, you navigate millions of stock trades flowing through markets every second, searching for patterns that drive trading decisions. Financial institutions often use time series databases to analyze high-frequency market data.\n\nIn this post, we walk through a practical implementation using [KDB-X MCP](https://github.com/KxSystems/kdb-x-mcp-server) server integration with [Amazon Quick](https://docs.aws.amazon.com/quicksuite/latest/userguide/what-is.html), demonstrating how traders and analysts can ask questions using conversational language and receive actionable insights from datasets. You can apply this same integration pattern across various domains, from financial market analysis to IoT sensor monitoring to DevOps performance dashboards, where you need to simplify access to time series insights.\n\n## Solution overview\n\nAmazon Quick is a comprehensive, generative AI-powered business intelligence service that you can use to analyze data, create visualizations, automate workflows, and collaborate across your organization. With MCP integration in Amazon Quick, you can connect to MCP servers for both task execution and data access capabilities. MCP provides a standardized way to connect AI systems with external tools and data sources. In this example, you’ll work with time series databases provided by KDB-X, which is built on the industry-leading [kdb+](https://code.kx.com/q/). kdb+ is a high-performance time-series database and analytics engine, powered by the vector language q.\n\nWe begin by installing the KDB-X MCP server on an [Amazon Elastic Compute Cloud (Amazon EC2)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) instance. This installation enables the KDB-X service to run continuously and establishes the connection between the MCP server and KDB-X service for query execution. Quick translates natural language queries into SQL statements and passes them to the KDB-X MCP server, which executes these queries against the KDB-X database.\n\nTo connect the MCP server with Quick, we use [Amazon Bedrock AgentCore Gateway](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html) as an authentication and routing layer. The AgentCore Gateway serves as a single access point for the agent to interact with its tools. In our architecture, we configure MCP servers as targets within the AgentCore Gateway, enabling communication with the MCP server running on Amazon EC2. We also implement inbound authorization for the AgentCore Gateway, which validates users attempting to access targets through the gateway. Since MCP integration in Quick requires authentication credentials, the inbound authentication to the gateway fulfills this requirement for the MCP connector. For this solution, we configure [Amazon Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools.html) as the identity provider for accessing the AgentCore Gateway. This integration appears in the Quick chat interface as actions, allowing users to perform relevant tasks and boosting productivity through third-party service integration.\n\n## Prerequisites\n\nVerify that you meet the following prerequisites to deploy the solution in your own AWS account using the step-by-step instructions in this post. Before you begin, make sure that you have the following:\n\n- An\n[AWS account](https://docs.aws.amazon.com/accounts/latest/reference/welcome-first-time-user.html#getting-started-step1) - Amazon Quick set up with Author Pro subscription\n- Permission to create AWS resources and\n[AWS Identity and Access Management (IAM)](http://aws.amazon.com/iam)roles and policies - Basic knowledge of AWS services\n- Access to KDB-X (sign up to the\n[KDB-X public preview](https://developer.kx.com/products/kdb-x/install)) [UV Installed](https://docs.astral.sh/uv/getting-started/installation/)for running the KDB-X MCP Server\n\n## Configuration of MCP server\n\nWith the prerequisites in place, we will configure the MCP server on your EC2 instance.\n\nThe KDB-X MCP server provides access to domain-specific tools such hybrid_search, run_sql_query and similarity_search. These tools are implemented as custom Python functions. The server extends the ability to query KDB-X data through natural language. Users can perform specialized tasks such as computing volatility, querying market data, or semantically searching SEC filings within KDB-X tables.\n\nFollow these steps to install and run the MCP server on EC2. Start by [launching an EC2 instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html), preferably t2.medium or larger.\n\n- Clone the repository\n\nBegin by cloning the [KDB-X MCP server](https://github.com/KxSystems/kdb-x-mcp-server/tree/main?tab=readme-ov-file#clone-the-repository) repository to your EC2 instance.\n\n- Install KDB-X Service\n\nThe MCP server requires KDB-X service running in the background. Install KDB-X by signing up for the [KDB-X public preview](https://developer.kx.com/products/kdb-x/install) as mentioned in the prerequisites section.\n\n- Configure KDB-X Service\n\nConfigure the KDB-X service to listen on port 5000. We will create a sample dataset that simulates trade data over time with random values for price, size, and symbols.\n\nCreate a dedicated OS service account for KDB-X:\n\nDownload the stocks.txt file containing stock symbols.\n\nCreate the startup script. Copy the following into a plain text editor and paste into the terminal:\n\nThis script initializes the KDB-X service and creates a dummy table with stock data. It randomly selects 100 stock symbols from the file. The script also prints 10 sample rows to verify successful data ingestion.\n\n- Start and Verify KDB-X Service\n\nCreate the systemd service unit. Copy the following into a plain text editor and paste into the terminal:\n\nRun the following commands to check the service status and verify the logs:\n\nWhen you check the status, you should see output similar to this:\n\nNote: KDB-X runs as a dedicated `kdbx-svc`\n\naccount with no login shell, no sudo, and no SSH keys. The systemd unit enforces `NoNewPrivileges`\n\n, `ProtectSystem=strict`\n\n, and `PrivateTmp=true`\n\nto limit blast radius if the process is compromised. The service is enabled to auto-start after a reboot.\n\n- Start the MCP Server\n\nInstall uv and set up the MCP server service:\n\nCreate the MCP server systemd service. Copy the following into a plain text editor and paste into the terminal:\n\n- Verify MCP Server configuration\n\nTo confirm the MCP server is configured correctly, run this command to display available tools:\n\n- Configure HTTPS endpoint for KDB-X MCP Server\n\nReplace `<public-ip-of-ec2>`\n\nwith your EC2 instance’s public IP address. After completing these steps, you will have a running MCP HTTPS endpoint accessible at `<public-ip-of-ec2>.nip.io/mcp`\n\n.\n\nFor production deployments, replace nip.io with a domain registered in Amazon Route 53 with DNSSEC enabled, use AWS Certificate Manager (ACM) to issue and manage TLS certificates, and front the EC2 with an internal Application Load Balancer. You can then configure Amazon Bedrock AgentCore Gateway with VPC egress using Amazon VPC Lattice to route traffic from AgentCore to your MCP server entirely within the AWS network, without any public internet exposure. See [Configuring Amazon Bedrock AgentCore Gateway for secure access to private resources](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-vpc-egress.html).\n\nStep 1: Install Required Packages\n\nUpdate your system and install Nginx with Certbot for SSL certificate management:\n\nStep 2: Create Temporary HTTP Configuration\n\nSet up a temporary HTTP configuration for certificate verification. Create the necessary directories and configuration file:\n\nStep 3: Test and Reload Nginx\n\nVerify the configuration syntax and reload Nginx:\n\nStep 4: Configure EC2 Security Group\n\nVerify your [EC2 security group](https://docs.aws.amazon.com/vpc/latest/userguide/security-group-rules.html) allows inbound traffic on Port 80 and 443.\n\nStep 5: Obtain Let’s Encrypt Certificate\n\nRequest an SSL certificate from Let’s Encrypt. Replace the email address with your own:\n\nStep 6: Configure HTTPS-Only Access\n\nAfter obtaining the certificate, update the Nginx configuration to enable HTTPS and redirect all HTTP traffic:\n\nStep 7: Apply Configuration Changes\n\nTest the updated configuration and reload Nginx:\n\nYour MCP server is now accessible through HTTPS at `<public-ip-of-ec2>.nip.io/mcp`\n\n. All HTTP requests will automatically redirect to HTTPS, supporting secure communication between Quick and your KDB-X MCP server.\n\n## Amazon Bedrock AgentCore Gateway integration with MCP\n\n[Amazon Bedrock AgentCore Gateway](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html) provides a secure way for developers to build, deploy, discover, and connect to tools at scale. With Gateway, developers can convert APIs, AWS Lambda functions, and existing services into MCP-compatible tools and make them available to agents through Gateway endpoints with just a few lines of code. In AgentCore Gateway, you can define a preconfigured MCP server as a target when creating a gateway.\n\nNow that your HTTPS endpoint is running, you can integrate it with AgentCore Gateway as an MCP server target. Follow these steps:\n\n- Navigate to the\n[Amazon Bedrock AgentCore Gateway](https://console.aws.amazon.com/bedrock-agentcore)console and select**Gateways** from the left navigation pane. Choose**Create Gateway** to begin. - For inbound authorization, configure the following parameters. This solution uses a Cognito user pool as the inbound authorization mechanism for the AgentCore Gateway:\n\n- Identity provider\n- Discovery URL\n- Allowed Clients\n\n- Under\n**Targets**, select** MCP server**as the Target type. Enter your HTTPS endpoint as the MCP endpoint URL. After the target is successfully attached, it will display a Ready status as shown in the following screenshot, confirming the connection is established.\n\nWith your AgentCore Gateway configured and running, you’re ready to create an integration within Quick. For production deployments, consider adding per-IP rate limiting in Nginx and enabling AWS CloudTrail for API activity.\n\n## Integration with Amazon Quick actions\n\nTo integrate with Quick, select **Integrations** from the left panel and choose **Actions**. Choose **Model Context Protocol** from the available options. Integrations in Amazon Quick connect you to external applications and services for AI-powered analysis and automation. [Action connectors](https://docs.aws.amazon.com/quick/latest/userguide/int-actions-how-it-works.html) create secure connections between Quick and external services. With MCP integration, you can connect to MCP servers for both task execution and data access capabilities. Follow these steps to complete the integration:\n\n- Provide the Gateway resource URL from your created AgentCore Gateway as the MCP server endpoint.\n- For Authorization type, select Service-to-Service OAuth. Enter the following details from your Cognito user pool configuration:\n\n- Token URL\n- Client ID\n- Client Secret\n\nFor production deployments, store the Cognito Client ID and Client Secret in AWS Secrets Manager. Retrieve the values on-demand when configuring the Quick connector and enable automatic rotation in Secrets Manager. Consider attaching an AWS WAF web ACL to the Cognito user pool to protect the `/oauth2/token`\n\nendpoint from credential stuffing and brute-force threats.\n\n- After the integration is created, all available tools from the MCP server will appear in the Actions section as shown in the following screenshot.\n- With the integration ready, you can now create a chat agent for stock analysis. When creating the chat agent, select the action you configured as shown in the following screenshot. You can add multiple actions to your agent as needed. Provide an appropriate description and instructions summary that define the agent’s purpose and capabilities.Here’s a sample configuration for an equity research assistant. You can also add explicit data scope guardrails to the system prompt, for example, limiting the agent to specific tables, date ranges, and query types.Description: An expert-level financial research assistant and equity analyst that helps investors understand company market positions, financial health, and future potential through comprehensive analysis.Instructions Summary: Focus on providing objective, data-driven analysis of companies’ financial health, competitive positioning, and growth prospects. Always consider both bullish and bearish perspectives. When discussing valuations, reference appropriate metrics like P/E, EV/EBITDA, and sector comparisons. Highlight key risks and catalysts that could impact the investment thesis.\n- Select\n**Chat** to start interacting with your equity research assistant. The agent can now process natural language queries, translate them into SQL statements, execute them against your KDB-X time series database, and return actionable insights.\n\n## Interaction with the chat agent\n\nTo illustrate the Actions integration within Quick, consider a financial analyst who needs to navigate stock trades for specific securities and identify patterns. Here are several example queries that demonstrate the agent’s capabilities:\n\n**Query 1: Retrieve sample stock data**\n\nAsk the agent to retrieve a sample of 10 stocks from the database. This initial query helps demonstrate how the Quick chat agent understands natural language requests and translates them into SQL queries using the MCP server tool to query KDB-X tables.\n\n**Query 2: Calculate total trading volume**\n\nRequest the total trading volume for a specific stock symbol. The agent queries the time series database to sum all trade sizes for that security across the available time period. The following screenshots demonstrate how the chat agent interprets the natural language query and frames the appropriate SQL statement. After the user reviews and approves the action submission, the agent executes the query against the KDB-X database and displays the aggregated trading volume results.\n\n**Query 3: Analyze hourly trading patterns**\n\nAsk for hourly trading volume breakdown on a particular day for a specific stock. The agent groups trades by hour and calculates volume metrics, revealing intraday trading patterns and peak activity periods.\n\n**Query 4: Find maximum price**\n\nQuery the maximum price a stock reached during a trading day. The agent executes aggregation query to identify the highest trade price recorded.\n\n**Query 5: Generate price visualizations**\n\nRequest a visualization of price movements for a stock throughout the day. The agent retrieves time-stamped price data, processes it into a suitable format, and generates an interactive chart showing price trends and volatility patterns.\n\n## Clean up\n\nTo avoid ongoing charges, delete the resources you created while following this walkthrough.\n\n- Stop and disable the MCP server and KDB-X services on your EC2 instance:\n- Terminate the EC2 instance from the Amazon EC2 console or by running\n`aws ec2 terminate-instances --instance-ids <your-instance-id>`\n\n. - In the Amazon Quick console, remove the MCP integration you created under Integrations > Actions.\n- In the Amazon Bedrock AgentCore console, delete the gateway and the associated MCP server target.\n- In the Amazon Cognito console, delete the user pool and any associated app clients you created for inbound authorization.\n\n## Conclusion\n\nFinancial services firms using time-series databases such as KDB-X face a significant challenge in democratizing access to market data. Querying time series databases to analyze market data requires specialized knowledge of q language or SQL.\n\nWith MCP integration in Amazon Quick using Amazon AgentCore Gateway, we demonstrated how to bridge this gap. Each interaction we explored demonstrates how MCP integration in Quick transforms complex database queries into conversational exchanges. Financial analysts can explore market data, identify trends, and generate insights without writing SQL code or understanding the underlying database structure.\n\nFor more detailed information about Quick integrations, see [Amazon Quick integrations](https://docs.aws.amazon.com/quicksuite/latest/userguide/integration-guides.html). For more information about Amazon AgentCore Gateway targets, see [Amazon AgentCore targets](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-supported-targets.html).", "url": "https://wpnews.pro/news/amazon-quick-integration-with-time-series-databases-for-market-intelligence-mcp", "canonical_source": "https://aws.amazon.com/blogs/machine-learning/amazon-quick-integration-with-time-series-databases-for-market-intelligence-using-mcp/", "published_at": "2026-06-01 16:01:24+00:00", "updated_at": "2026-06-02 20:27:19.282919+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "generative-ai", "ai-tools", "ai-products"], "entities": ["Amazon Quick", "KDB-X MCP", "Model Context Protocol", "KxSystems", "AWS"], "alternates": {"html": "https://wpnews.pro/news/amazon-quick-integration-with-time-series-databases-for-market-intelligence-mcp", "markdown": "https://wpnews.pro/news/amazon-quick-integration-with-time-series-databases-for-market-intelligence-mcp.md", "text": "https://wpnews.pro/news/amazon-quick-integration-with-time-series-databases-for-market-intelligence-mcp.txt", "jsonld": "https://wpnews.pro/news/amazon-quick-integration-with-time-series-databases-for-market-intelligence-mcp.jsonld"}}