数据治理服务器

Eunomia MCP Server 是一个开源数据治理工具,用于在基于LLM的应用程序中实施数据治理策略,如PII检测和用户访问控制,并与MCP生态系统中的外部服务器进程无缝集成。

  • by whataboutyou-ai
  • Python
  • 本地部署
  • 7 星标
  • 更新于
在 GitHub 查看 whataboutyou-ai/eunomia-mcp-server

使用说明

[!警告] 此MCP服务器已弃用,因为它与最新开发的 Eunomia新的MCP集成正在开发中,很快就会推出。

Eunomia MCP服务器

基于LLM的应用程序的开源数据治理——与MCP集成

由以下材料制成❤ 由团队在 你呢.

阅读文档 · 加入Discord

概述

Eunomia MCP服务器 是 Eunomia 将Eunomia仪器与 主控程序 服务器。它提供了一种简单的方法来编排数据治理策略(如PII检测或用户访问控制),并将其与MCP生态系统中的外部服务器进程无缝集成。

使用Eunomia MCP服务器,您可以:

  • 实施数据治理 在LLM或其他基于文本的管道之上。
  • 协调多个服务器 它们通过MCP框架进行通信。

开始使用

安装

git clone https://github.com/whataboutyou-ai/eunomia-mcp-server.git

基本用法

Eunomia MCP服务器使用与 Eunomia.通过定义你的一套工具 Orchestra,您可以将数据治理策略应用于流经基于MCP的服务器的文本流。

下面是一个如何定义应用程序设置和运行MCP服务器的简化示例 紫外线.

"""
Example Settings for MCP Orchestra Server
=========================================
This example shows how we can combine Eunomia with a web-browser-mcp-server
(https://github.com/blazickjp/web-browser-mcp-server).
"""

from pydantic_settings import BaseSettings
from pydantic import ConfigDict
from eunomia.orchestra import Orchestra
from eunomia.instruments import IdbacInstrument, PiiInstrument


class Settings(BaseSettings):
    """
    Application settings class for MCP orchestra server using pydantic_settings.

    Attributes:
        APP_NAME (str): Name of the application
        APP_VERSION (str): Current version of the application
        LOG_LEVEL (str): Logging level (default: "info")
        MCP_SERVERS (dict): Servers to be connected
        ORCHESTRA (Orchestra): Orchestra class from Eunomia to define data governance policies
    """

    APP_NAME: str = "mcp-server_orchestra"
    APP_VERSION: str = "0.1.0"
    LOG_LEVEL: str = "info"
    MCP_SERVERS: dict = {
        "web-browser-mcp-server": {
            "command": "uv",
            "args": [
                "tool",
                "run",
                "web-browser-mcp-server"
            ],
            "env": {
                "REQUEST_TIMEOUT": "30"
            }
        }
    }
    ORCHESTRA: Orchestra = Orchestra(
        instruments=[
            PiiInstrument(entities=["EMAIL_ADDRESS", "PERSON"], edit_mode="replace"),
            # You can add more instruments here
            # e.g., IdbacInstrument(), etc.
        ]
    )

运行服务器

定义设置后,您可以通过指向来运行MCP Orchestra服务器 uv 到包含服务器代码的目录,例如:

uv --directory "path/to/server/" run orchestra_server

这将:

  1. 从加载设置 .env 或环境变量。
  2. 启动 Eunomia MCP服务器 处理请求并编排您的外部MCP服务器。
  3. 应用Eunomia仪器(如 PiiInstrument)对于传入的文本,确保自动执行数据治理策略。

进一步阅读

有关更详细的用法、高级配置和其他仪器,请查看以下资源: