Purpose
mcp-timeplus is an MCP (Model Context Protocol) server for Timeplus, used to let LLMs and MCP-enabled clients interact with a Timeplus cluster through tool calls, execute SQL queries, manage databases, and handle Kafka topics and Apache Iceberg tables.
Main Capabilities
The server provides the following tools:
- generate_sql: Provides the LLM with more knowledge about how to query Timeplus via SQL.
- run_sql: Executes SQL queries on the Timeplus cluster. The input is sql (string). By default, all Timeplus queries run with readonly = 1 for safety; if you need to execute DDL or DML, you can set the environment variable TIMEPLUS_READ_ONLY to false.
- list_databases: Lists all databases on the Timeplus cluster.
- list_tables: Lists all tables in a database. The input is database (string), which is the database name.
- list_kafka_topics: Lists all topics in the Kafka cluster.
- explore_kafka_topic: Displays some messages in a Kafka topic. The inputs are topic (string, topic name) and message_count (integer, number of messages to display, default 1).
- create_kafka_stream: Sets up streaming ETL in Timeplus to save Kafka messages locally. The input is topic (string, topic name).
- connect_to_apache_iceberg: Connects to an Apache Iceberg-based database. Currently available only through Timeplus Enterprise, with plans to make it available in Timeplus Proton soon. Inputs include iceberg_db (string, Iceberg database name), aws_account_id (integer, 12-digit AWS account ID), s3_bucket (string, S3 bucket name), aws_region (string, AWS region,default "us-west-2"), is_s3_table_bucket (boolean, whether the S3 bucket is an S3 table bucket, default False).
Usage
When using in Claude Desktop:
- Make sure the uv executable is installed; if not, install it according to its instructions.
- Open the Claude Desktop configuration file: on macOS it is located at ~/Library/Application Support/Claude/claude_desktop_config.json, and on Windows at %APPDATA%/Claude/claude_desktop_config.json.
- Add the corresponding configuration and update the environment variables to point to your own Timeplus service.
- Restart Claude Desktop to apply the changes. It can also be used with other MCP clients (such as 5ire).
Local development and testing:
- Run docker compose up -d in the test-services directory to start the Timeplus Proton server; you can also use curl https://install.timeplus.com/oss | sh download, then start with ./proton server.
- Add the corresponding variables in the .env file at the repository root.
- Run uv sync to install dependencies, then execute source .venv/bin/activate.
- For easier testing, you can run mcp dev mcp_timeplus/mcp_server.py to start the MCP server; click the "Connect" button to connect the UI to the MCP server, then switch to the "Tools" tab to run the available tools.
- Build the Docker image: docker build -t mcp_timeplus .
Environment variables:
- TIMEPLUS_HOST: Timeplus server hostname.
- TIMEPLUS_USER: Authentication username.
- TIMEPLUS_PASSWORD: Authentication password.
- TIMEPLUS_PORT: Timeplus server port number. Default: 8443 when HTTPS is enabled, 8123 when not enabled. Usually no need to set unless using a non-standard port.
- TIMEPLUS_SECURE: Enable/disable HTTPS connection. Default "false"; set to "true" to use a secure connection.
- TIMEPLUS_VERIFY: Enable/disable SSL certificate verification. Default "true"; set to "false" to disable certificate verification (not recommended for production environments).
- TIMEPLUS_CONNECT_TIMEOUT: Connection timeout (seconds). Default "30"; if you encounter connection timeouts, you can increase this value.
- TIMEPLUS_SEND_RECEIVE_TIMEOUT: Send/receive timeout (seconds). Default "300"; for long-running queries, you can increase this value.
- TIMEPLUS_DATABASE: The default database to use. Default None (use the server default); when set, it can automatically connect to a specific database.
- TIMEPLUS_READ_ONLY: Enable/disable read-only mode. Default "true"; set to "false" to enable DDL/DML.
- TIMEPLUS_KAFKA_CONFIG: A JSON string for Kafka configuration. You can refer to the librdkafka configuration or the examples above.
Applicable scenarios
Suitable for scenarios where you need to query Timeplus data, browse databases and table structures, view Kafka topic messages, save Kafka messages locally through streaming ETL, and connect to an Apache Iceberg database for data interaction via an LLM or MCP client using natural language/tool calls.
Limitations
- Runs in read-only mode by default; to execute DDL/DML, you must explicitly set TIMEPLUS_READ_ONLY to false.
- connect_to_apache_iceberg is currently only available through Timeplus Enterprise; support for Timeplus Proton is still planned.
- Other details such as features, fees, pricing, platforms, and results are not provided for now.