Skip to main content

An MCP server for Timeplus.

Project description

Timeplus MCP Server

PyPI - Version

An MCP server for Timeplus.

mcp-timeplus MCP server

Features

Tools

  • run_select_query

    • Execute SQL queries on your Timeplus cluster.
    • Input: sql (string): The SQL query to execute.
    • By default, all Timeplus queries are run with readonly = 1 to ensure they are safe. If you want to run DDL or DML queries, you can set the environment variable TIMEPLUS_READ_ONLY to false.
  • list_databases

    • List all databases on your Timeplus cluster.
  • list_tables

    • List all tables in a database.
    • Input: database (string): The name of the database.

Configuration

First, ensure you have the uv executable installed. If not, you can install it by following the instructions here.

  1. Open the Claude Desktop configuration file located at:

    • On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • On Windows: %APPDATA%/Claude/claude_desktop_config.json
  2. Add the following:

{
  "mcpServers": {
    "mcp-timeplus": {
      "command": "uvx",
      "args": ["mcp-timeplus"],
      "env": {
        "TIMEPLUS_HOST": "<timeplus-host>",
        "TIMEPLUS_PORT": "<timeplus-port>",
        "TIMEPLUS_USER": "<timeplus-user>",
        "TIMEPLUS_PASSWORD": "<timeplus-password>",
        "TIMEPLUS_SECURE": "false",
        "TIMEPLUS_VERIFY": "true",
        "TIMEPLUS_CONNECT_TIMEOUT": "30",
        "TIMEPLUS_SEND_RECEIVE_TIMEOUT": "30",
        "TIMEPLUS_READ_ONLY": "true"
      }
    }
  }
}

Update the environment variables to point to your own Timeplus service.

  1. Restart Claude Desktop to apply the changes.

You can also try this MCP server with other MCP clients, such as 5ire.

Development

  1. In test-services directory run docker compose up -d to start a Timeplus Proton server. You can also download it via curl https://install.timeplus.com/oss | sh, then start with ./proton server.

  2. Add the following variables to a .env file in the root of the repository.

TIMEPLUS_HOST=localhost
TIMEPLUS_PORT=8123
TIMEPLUS_USER=default
TIMEPLUS_PASSWORD=
TIMEPLUS_SECURE=false
TIMEPLUS_VERIFY=true
TIMEPLUS_CONNECT_TIMEOUT=30
TIMEPLUS_SEND_RECEIVE_TIMEOUT=30
TIMEPLUS_READ_ONLY=true
  1. Run uv sync to install the dependencies. Then do source .venv/bin/activate.

  2. For easy testing, you can run fastmcp dev mcp_timeplus/mcp_server.py to start the MCP server. Click the "Connect" button to connect the UI with the MCP server, then switch to the "Tools" tab to run the available tools: list_databases, list_tables, run_selected_query.

Environment Variables

The following environment variables are used to configure the Timeplus connection:

Required Variables

  • TIMEPLUS_HOST: The hostname of your Timeplus server
  • TIMEPLUS_USER: The username for authentication
  • TIMEPLUS_PASSWORD: The password for authentication

Optional Variables

  • TIMEPLUS_PORT: The port number of your Timeplus server
    • Default: 8443 if HTTPS is enabled, 8123 if disabled
    • Usually doesn't need to be set unless using a non-standard port
  • TIMEPLUS_SECURE: Enable/disable HTTPS connection
    • Default: "false"
    • Set to "true" for secure connections
  • TIMEPLUS_VERIFY: Enable/disable SSL certificate verification
    • Default: "true"
    • Set to "false" to disable certificate verification (not recommended for production)
  • TIMEPLUS_CONNECT_TIMEOUT: Connection timeout in seconds
    • Default: "30"
    • Increase this value if you experience connection timeouts
  • TIMEPLUS_SEND_RECEIVE_TIMEOUT: Send/receive timeout in seconds
    • Default: "300"
    • Increase this value for long-running queries
  • TIMEPLUS_DATABASE: Default database to use
    • Default: None (uses server default)
    • Set this to automatically connect to a specific database
  • TIMEPLUS_READ_ONLY: Enable/disable read-only mode
    • Default: "true"
    • Set to "false" to enable DDL/DML

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

mcp_timeplus-0.1.2.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

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

mcp_timeplus-0.1.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file mcp_timeplus-0.1.2.tar.gz.

File metadata

  • Download URL: mcp_timeplus-0.1.2.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for mcp_timeplus-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3c478034f2765b44bd113451a7249197b29913984befc60786c9b3f84e5a0c31
MD5 6ea4f0e1e7778d00052b35614087a581
BLAKE2b-256 dd8ec1be57e467ea490e64ce6a9bc866cd40c98a499c7a62369a96465c503a6d

See more details on using hashes here.

File details

Details for the file mcp_timeplus-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_timeplus-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b4886dcb8580430321ce28fcdbd5223c69b5ebc68bff8af6d9cc8b7b80c99ebc
MD5 b5b7fb9242a91761e5a055a30ed7886f
BLAKE2b-256 b823ab95d7efbe071286e4039467006b595c9f4fd4c2100e3677cca9d8ef15a6

See more details on using hashes here.

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