警告:此 MCP 服务器已弃用,因为它与Eunomia的最新开发版本不兼容。新的 MCP 集成正在开发中,即将推出。
Eunomia MCP 服务器
基于 LLM 应用程序的开源数据治理 — 集成 MCP
由What About You团队用❤制作。
概述
Eunomia MCP 服务器是Eunomia框架的扩展,用于将 Eunomia 仪器与MCP服务器连接起来。它提供了一种简单的方法来协调数据治理策略(例如 PII 检测或用户访问控制),并将其与 MCP 生态系统中的外部服务器流程无缝集成。
使用 Eunomia MCP 服务器,您可以:
在 LLM 或其他基于文本的管道上实施数据治理。
协调通过 MCP 框架进行通信的多个服务器。
Related MCP server: MCP Server
开始
安装
git clone https://github.com/whataboutyou-ai/eunomia-mcp-server.git基本用法
Eunomia MCP 服务器使用与Eunomia相同的“工具”概念。通过在Orchestra中定义一组工具,您可以将数据治理策略应用于流经基于 MCP 的服务器的文本流。
下面是一个简化的示例,说明如何定义应用程序设置并使用uv运行 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.
]
)运行服务器
定义设置后,您可以通过将uv指向包含服务器代码的目录来运行 MCP Orchestra 服务器,例如:
uv --directory "path/to/server/" run orchestra_server这将:
从
.env或环境变量加载设置。启动Eunomia MCP 服务器来处理请求并协调您的外部 MCP 服务器。
将 Eunomia 工具(如
PiiInstrument)应用于传入文本,确保数据治理政策自动执行。
进一步阅读
有关更详细的使用方法、高级配置和其他工具,请查看以下资源:
Eunomia 文档:了解有关核心 Eunomia 框架的更多信息。
Eunomia 存储库:查看 Eunomia 源代码和示例。
MCP 文档:探索模型上下文协议规范和生态系统。
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.