Skip to main content

Add your description here

Project description

SQL Schema MCP 服务器 一个用于查询需求分析对应的SQL table scheme信息的模型上下文协议服务器。该服务器包装了原始的get_schema_info API,让AI应用能够通过MCP协议获取SQL表结构信息。

主要功能

根据用户查询需求,分析需要用到的数据表、字段、枚举值、关联方式和易错点等信息。

可用工具

analyze_sql_schema - 分析SQL表结构和数据需求

必需参数:

  • user (字符串): 用户信息,用于身份识别和权限控制
  • business_id (字符串): 业务ID,标识具体的业务场景
  • query (字符串): 用户的数据需求描述,例如"我需要查询最近一个月的用户活跃度数据"
  • appkey (字符串): API密钥,用于接口认证

可选参数:

  • document_id (字符串): 可选的文档ID,关联特定的文档上下文
  • extra_result_params (列表): 额外的结果参数,用于定制返回结果

使用示例

  • "查询用户最近30天的购买行为数据"
  • "分析不同地区的销售业绩情况"
  • "获取商品库存和销量的关联分析"

安装

使用 PIP

你可以通过 pip 安装 fit-growth-mcp-tools:

pip install fit-growth-mcp-tools

安装完成后,可以使用以下命令作为脚本运行:

python -m fit_growth_mcp_tools

配置

为 Claude.app 配置

在你的 Claude 设置中添加:

{
  "mcpServers": {
    "sql-schema": {
      "command": "python",
      "args": ["-m", "fit_growth_mcp_tools"]
    }
  }
}

为 Zed 配置

在你的 Zed settings.json 中添加:

{
  "assistant": {
    "version": "2",
    "provider": {
      "name": "anthropic",
      "default_model": "claude-3-5-sonnet-20241022",
      "low_speed_timeout_read_timeout": 30,
      "low_speed_timeout": 30
    }
  },
  "context_servers": [
    {
      "id": "sql-schema",
      "type": "mcp",
      "settings": {
        "command": "python",
        "args": ["-m", "fit_growth_mcp_tools"]
      }
    }
  ]
}

API 配置

服务器连接到内部API服务,需要确保:

注意事项

  • 确保提供有效的appkey进行身份认证
  • query描述应该明确具体,便于准确分析
  • 网络连接需要能访问内部API服务
  • 服务会自动处理网络连接失败、API认证失败等错误情况

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

fit_growth_mcp_tools-0.1.3.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

fit_growth_mcp_tools-0.1.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file fit_growth_mcp_tools-0.1.3.tar.gz.

File metadata

File hashes

Hashes for fit_growth_mcp_tools-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7bb98e42707faa15b3acbc81cd96c427d100cce8026aad6e8af7e266ad638e81
MD5 34f269bab44e03a83d98437b786cee9b
BLAKE2b-256 0eb60c21004d9c9f59f13a2aeffee7693c430dbbdc362431f1998208b70eaad4

See more details on using hashes here.

File details

Details for the file fit_growth_mcp_tools-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for fit_growth_mcp_tools-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 05afc18e4bcaf8e95030e1ac888874d047e08e9612d6599694dfdf12f12aa0e1
MD5 9566cca6ab8b4950ed3803a75692fd4a
BLAKE2b-256 43d4291f1857308586cc18559dbb30051adb7a90157457866946cb09cb252055

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