Tecton MCP Server

Official

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Utilizes Python as the runtime environment with specific version requirements (>=3.10)

Tecton MCP 服务器

这是 Anthropic 为 Tecton 提供的任务控制协议 (MCP) 服务器,它提供了一组与 Tecton 集群交互、管理功能存储和执行 Tecton CLI 命令的工具。

特征

该服务器提供以下 MCP 工具:

CLI 工具

  • tecton_cli_help :获取有关可用 Tecton CLI 命令的结构化帮助信息
  • tecton_cli_execute :执行 Tecton CLI 命令

功能商店管理

  • list_workspaces :列出连接的 Tecton 集群中的所有工作区
  • list_feature_views :列出所有功能视图及其元数据
  • list_feature_services :列出所有要素服务及其元数据
  • list_transformations :列出所有转换及其元数据
  • list_data_sources :列出所有数据源及其元数据
  • list_entities :列出所有实体及其元数据

配置工具

  • get_feature_service_configuration :获取要素服务的详细配置
  • get_feature_view_configuration :获取功能视图的详细配置
  • get_feature_view_code :获取功能视图的 Python 代码定义

设置

先决条件

  • Python >=3.10 或兼容版本
  • Tecton SDK 安装和配置
  • 已安装任务控制协议 (MCP)

安装

  1. 安装所需的 Python 包:
pip install httpx click cloudpickle
  1. 安装 Tecton SDK:
pip install tecton
  1. 安装 MCP:
pip install mcp

配置

将以下内容添加到您的 MCP 服务器配置中:

{ "mcpServers": { "tecton": { "command": "/path/to/python", "args": [ "--directory", "/path/to/tecton", "run", "tecton.py" ], "env": { "PYENV_VERSION": "3.9.11" } } } }

用您的实际路径替换/path/to/python/path/to/tecton

用法

启动服务器

  1. 首先,确保您已配置并登录 Tecton:
tecton login
  1. 然后使用以下命令运行服务器:
python tecton.py

服务器将启动并监听 MCP 命令。

使用工具

所有工具均可通过 MCP 界面使用。以下是一些使用示例:

  1. 列出所有工作区:
workspaces = await list_workspaces()
  1. 获取功能视图配置:
config = await get_feature_view_configuration(name="my_feature_view", workspace="my_workspace")
  1. 执行 Tecton CLI 命令:
result = await tecton_cli_execute(command="workspace list")

错误处理

该服务器包括全面的错误处理:

  • 所有工具在失败时都会返回空列表或空字符串
  • 使用_err函数记录错误
  • 一般操作使用_log函数记录

依赖项

  • 核心 Python:
    • 打字(内置)
    • httpx
    • 点击
    • cloudpickle
  • 泰克顿:
    • 构造单元
    • tecton._internals
    • tecton.cli.cli
    • tecton_core
    • tecton_proto
  • MCP:
    • mcp.服务器.fastmcp
  • 当地的:
    • utils(包含 _err、_log 和 run_command)

贡献

请随时提交问题和增强请求!

-
security - not tested
F
license - not found
-
quality - not tested

提供一组工具,用于与 Tecton 集群交互、管理特征存储以及通过任务控制协议执行 Tecton CLI 命令。

  1. Features
    1. CLI Tools
    2. Feature Store Management
    3. Configuration Tools
  2. Setup
    1. Prerequisites
    2. Installation
    3. Configuration
  3. Usage
    1. Starting the Server
    2. Using the Tools
  4. Error Handling
    1. Dependencies
      1. Contributing
        ID: tox4n9oqin