Skip to main content

Add your description here

Project description

MySQL + Feishu MCP Tool

This package provides a Model Context Protocol (MCP) server with:

  • Read-only MySQL query capability.
  • Feishu remote MCP connection capability.

Features

  • Read-only Access: Only allows SELECT and SHOW statements for SQL safety.
  • MySQL SSL Support: Supports SSL connections for cloud databases.
  • Feishu Remote MCP: Supports initialize, tools/list, and tools/call against Feishu MCP endpoint.
  • Env-based Config: Uses .env for all credentials and endpoint settings.

Installation

  1. Clone this repository.
  2. Install dependencies:
    uv sync
    

Configuration

  1. Copy .env.example to .env:

    cp .env.example .env
    
  2. Edit .env with your MySQL and Feishu credentials:

    MYSQL_HOST=localhost
    MYSQL_PORT=3306
    MYSQL_USER=your_username
    MYSQL_PASSWORD=your_password
    MYSQL_DATABASE=your_database
    
    # Optional: MySQL SSL
    MYSQL_USE_SSL=false
    MYSQL_SSL_CA=/path/to/ca-cert.pem
    
    # Feishu MCP
    FEISHU_MCP_URL=https://mcp.feishu.cn/mcp
    FEISHU_MCP_APP_ID=cli_xxx
    FEISHU_MCP_APP_SECRET=xxx
    FEISHU_MCP_ALLOWED_TOOLS=search-doc,fetch-doc,create-doc,update-doc
    

FEISHU_MCP_APP_ID and FEISHU_MCP_APP_SECRET are used to request tenant access token dynamically before each Feishu MCP call.

Usage

Run the MCP server:

mcp-tm

Tools

read_sql

Executes a SQL query and returns the results as JSON.

  • Arguments:
    • query_sql (string): The SQL query to execute (e.g., "SELECT * FROM users LIMIT 10").
  • Returns:
    • JSON string of the query results.

feishu_list_tools

Lists available Feishu MCP tools under the configured credentials and allowed tool set.

  • Arguments:
    • allowed_tools (string, optional): Comma-separated tool names for this call only.
  • Returns:
    • JSON-RPC response string from Feishu MCP.

feishu_call_tool

Calls a specific Feishu MCP tool.

  • Arguments:
    • tool_name (string): Tool name to call, for example fetch-doc.
    • arguments_json (string): JSON object string for tool arguments.
    • allowed_tools (string, optional): Comma-separated tool names for this call only.
  • Returns:
    • JSON-RPC response string from Feishu MCP.

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_tm-0.2.0.tar.gz (4.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_tm-0.2.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_tm-0.2.0.tar.gz.

File metadata

  • Download URL: mcp_tm-0.2.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mcp_tm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ca245106a94aaa0c1ef4475466e1a6a4965d732a28dc516cb884cc0d4f868c31
MD5 111e247d5fdefd778009b03c3ea82bf3
BLAKE2b-256 2a7e5ad8c176a434a9796749f6d7fc71e424a18902627face955ce7fb5f451a9

See more details on using hashes here.

File details

Details for the file mcp_tm-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_tm-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mcp_tm-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e1712bbcd938d9a061bd2d49dc8d15c9f7c5cfe2ee9ac65dd8161fb2c95edb6
MD5 eb76914bd39c4856efd66861a43e30b2
BLAKE2b-256 49edcb7be4152ca3895aa0a2193176c71ccc0b67d0b9363dc01a0fa650807d1b

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