top of page

Bring AI to Real-Time Data: Introducing Timeplus Support for MCP

  • Writer: Gang Tao
    Gang Tao
  • 2 days ago
  • 4 min read

Enable Claude, Cursor, and other AI assistants to query your streaming data with natural language.



The world of AI assistants is evolving rapidly. While large language models (LLMs) are incredibly powerful, they've traditionally been limited to their training data, and are unable to access your live systems, databases, or real-time data streams. We’re changing that today. 


Timeplus now supports the Model Context Protocol (MCP), allowing AI assistants like Claude to directly query your streaming data, explore schemas, and help you build real-time data processing pipeline, all through natural conversation.



What is MCP?


The Model Context Protocol (MCP) is an open standard developed by Anthropic that enables AI applications to securely connect with external data sources and tools. Think of it as a universal adapter that lets AI assistants "reach out" and interact with the real world.


Before MCP, if you wanted an AI assistant to work with your data, you had two options:

  • Copy and paste data into the chat (tedious and limited)

  • Build custom integrations for each AI tool (expensive and fragmented)


MCP solves this by providing a standardized way for AI models to:

  • Discover what tools and data sources are available

  • Query databases and APIs with proper authentication

  • Execute actions while respecting security boundaries


The protocol is already supported by leading AI tools including Claude Desktop, Cursor IDE, Windsurf, and many others in the growing MCP ecosystem.



Why MCP Matters for Real-Time Data


Real-time data is inherently complex. Streaming SQL queries, time-windowed aggregations, late-arriving data handling — these concepts have a learning curve even for experienced engineers.


Now imagine being able to ask:

"What's the average latency of our payment service over the last 5 minutes, grouped by region?"

And having an AI assistant that actually understands your streaming data schema, writes the correct Timeplus SQL query, executes it, and explains the results—all in seconds.


This is the power of combining MCP with a streaming data processing platform like Timeplus:

Traditional Approach

With MCP + Timeplus

Learn streaming SQL syntax

Describe what you want in plain English

Manually explore table schemas

AI discovers and understands your data model

Debug query errors alone

AI explains and fixes issues interactively

Context-switch between docs and IDE

Get answers in your existing AI workflow

For data teams, this means faster iteration. For developers new to streaming, it dramatically lowers the barrier to entry.



How Timeplus Implements MCP


Starting with Timeplus Enterprise 3.1, MCP server functionality is built directly into the application server. There's no separate service to deploy or manage—just enable it with a few environment variables.



Here's all you need to get started if you want to try it using docker:

services:
  timeplus:
    image: timeplus/timeplus-enterprise:3.1.2-rc.2
    platform: linux/amd64
    ports:
      - 8000:8000    # Web UI
      - 8463:8463    # Native protocol
      - 8123:8123    # HTTP interface
      - 3218:3218    # Ingest API
      - 3001:3001    # MCP server
    environment:
      - ENABLE_DATA_PREALLOCATE=false
      - MCP_ENABLED=true
      - MCP_TRANSPORT=http
      - MCP_PORT=3001
    volumes:
      - timeplus_data:/timeplus/data/

volumes:
  timeplus_data:
    driver: local

The key configuration options:

  • MCP_ENABLED=true — Activates the MCP server

  • MCP_TRANSPORT=http — Uses HTTP transport (also supports stdio for local tools)

  • MCP_PORT=3001 — The port where MCP clients can connect


Once running, configure your AI assistant to connect to http://localhost:3001/sse as an MCP server. That's it—your AI can now talk to Timeplus.



What the MCP Server Exposes


The Timeplus MCP server provides AI assistants with:

  • Schema discovery — List all streams, tables, views, and materialized views

  • Column metadata — Understand data types, nullable fields, and descriptions

  • Query execution — Run streaming SQL queries and return results

  • Query explanation — Help users understand what their queries do


This means the AI has full context about your data model before it even attempts to write a query.



Demo: Conversational Streaming Analytics


In this demo, we show how Claude Desktop connects to Timeplus via MCP and helps a user:

  1. Explore available streams and their schemas

  2. Write a tumble window aggregation query in natural language

  3. Debug and optimize a streaming query

  4. Explain the difference between streaming and historical queries




Use Cases Unlocked by MCP + Timeplus


With AI assistants now able to interact with your real-time data, here are some powerful workflows that become possible:



1. Natural Language Querying

Ask questions about your data without knowing SQL:

"Show me all error events from the last hour where response_time exceeded 500ms"


The AI translates this to proper Timeplus SQL, including the appropriate time filters and streaming semantics.



2. Interactive Schema Exploration

When onboarding to a new data environment:

"What streams do we have? Tell me about the schema of the 'orders' stream and suggest some interesting queries I could run."



3. Query Building and Optimization

Get help writing complex streaming queries:

"I need to detect when CPU usage exceeds 90% for more than 3 consecutive minutes. Help me write a streaming query with a session window."



4. Real-Time Alerting Design

Design alerting logic conversationally:

"Create a materialized view that triggers when we see more than 100 failed logins from the same IP in a 5-minute window"



5. Data Pipeline Debugging

Troubleshoot issues in your streaming pipelines:

"Why might my tumble window query be showing delayed results? Here's my current query..."



6. Learning Streaming Concepts

Use the AI as a teacher:

"Explain the difference between tumble, hop, and session windows in Timeplus. When should I use each one?"



Try It Yourself


Getting started takes less than 5 minutes:


Step 1: Save the Docker Compose file above and run:
docker compose up -d

Step 2: Configure your MCP-compatible AI tool:

For Claude Desktop, add to your claude_desktop_config.json:

{
  "mcpServers": {
    "timeplus": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:3001"
      ]
    }
  }
}

Step 3: Start chatting with your streaming data!

Open Claude or Cursor and try:

"Connect to Timeplus and show me what streams are available"


What's Next?


This is just the beginning of AI-native real time data processing. We're exploring more exciting features powered by AI, stay tuned!


We'd love to hear what use cases you're exploring. Join our Slack community to share your experiences and ideas.


Related Resources:


 
 
bottom of page