Feature Engineering MCP Server
フィーチャーエンジニアリング MCP サーバー
既存の ahutosh173/automated-feature-engineering LangGraph エージェントを再利用可能なツールとして公開する MCP(Model Context Protocol)サーバーです。
元のエージェントは、CSV、不正/手口の目的、スキーマメタデータ、ID 列、ラベル列を受け取り、次の処理を行います:
モデリング目的の分析
候補フィーチャーの提案
pandas のフィーチャーエンジニアリングコードの生成
そのコードの実行
Excel フィーチャーファイルの書き出し
このプロジェクトは、そのワークフローの上に MCP インターフェースを追加します。
アーキテクチャ
MCP Host / LLM Client
|
| MCP
v
+-----------------------+
| Feature Engineering |
| MCP Server |
+-----------+-----------+
|
+-----------+-----------+
| |
v v
Dataset profiling Existing LangGraph
Feature Engineering Agent
|
+--------------+--------------+
| | |
Analyze MO Propose features Generate code
|
v
Execute features
|
v
Excel outputRelated MCP server: skillsmcp
MCP ツール
ツール | 目的 |
| エージェントを実行する前に CSV を検査する |
| 既存の完全な LangGraph エージェントを実行する |
| エージェントを実行し、その分析、候補フィーチャー、生成されたコードを返す |
| サーバー設定を検証する |
重要な設計上の決定
MCP レイヤーは既存のエージェントを置き換えるものではありません。
これは既存のエージェントのアダプターであり、MCP 互換のホストがフィーチャーエンジニアリングのワークフローをツールとして発見し、呼び出せるようにするものです。
元のリポジトリは次のとおりです:
https://github.com/ahutosh173/automated-feature-engineering
1. 前提条件
Python 3.10+
Git
元のフィーチャーエンジニアリングエージェントリポジトリへのアクセス
元のエージェントが必要とする LLM 設定
MCP Python SDK は現在 Python 3.10+ を必要とします。
2. 両方のリポジトリをクローンする
推奨レイアウト:
projects/
├── automated-feature-engineering/
└── feature-engineering-mcp/元のリポジトリをクローンします:
git clone https://github.com/ahutosh173/automated-feature-engineering.gitこのリポジトリをクローンします:
git clone <YOUR-MCP-REPO-URL>3. 仮想環境を作成する
このリポジトリから:
python -m venv .venvWindows:
.venv\Scripts\activateLinux/macOS:
source .venv/bin/activate依存関係をインストールします:
pip install -r requirements.txt元のエージェントの依存関係をインストールします:
pip install -r ../automated-feature-engineering/requirements.txt4. 元のエージェントを設定する
元のリポジトリは現在、HF_TOKEN を含む独自の .env 設定を必要とします。
そのリポジトリを README に記載されているとおりに正確に設定してください。
API キーやトークンをコミットしないでください。
5. この MCP サーバーを設定する
コピー:
cp .env.example .envWindows PowerShell:
Copy-Item .env.example .env設定:
FEATURE_ENGINEERING_REPO=../automated-feature-engineering2 つのリポジトリが別の場所にある場合は、絶対パスを使用してください。
例:
FEATURE_ENGINEERING_REPO=C:/projects/automated-feature-engineering6. MCP サーバーを実行する
ローカルの stdio 使用の場合:
python server.pyプロセスは stdin/stdout 経由で MCP クライアントを待機します。
MCP Inspector 開発の場合:
mcp dev server.py公式の MCP Python SDK は Inspector 開発ワークフローを提供し、型付き Python 関数から直接ツールを定義することをサポートしています。
7. 外部の MCP ホストなしでテストする
実行:
pytest -qテストは MCP Python クライアントのインメモリ接続を使用するため、サブプロセスを起動せずに MCP ツール定義をテストします。
例:データセットのプロファイリング
MCP クライアントは次のように呼び出せます:
{
"name": "profile_dataset",
"arguments": {
"csv_path": "../automated-feature-engineering/data/train.csv"
}
}応答例:
{
"success": true,
"rows": 10000,
"columns": 25,
"columns_info": [
{
"name": "amount",
"dtype": "float64",
"missing": 0,
"missing_pct": 0.0,
"unique": 9000
}
]
}例:エージェントの実行
{
"name": "run_feature_engineering",
"arguments": {
"csv_path": "../automated-feature-engineering/data/train.csv",
"mo_name": "Fraud Detection",
"mo_description": "Identify fraudulent transactions based on account behavior",
"data_schema": [
{
"name": "txn_id",
"dtype": "object",
"description": "Transaction ID"
},
{
"name": "amount",
"dtype": "float64",
"description": "Transaction amount"
}
],
"id_column": "txn_id",
"label_column": "fraud"
}
}MCP がここで役立つ理由
MCP がない場合、フィーチャーエンジニアリングのワークフローは主に Python アプリケーションです。
MCP があれば、MCP 互換のホストがフィーチャーエンジニアリングのツールを発見し、いつ呼び出すかを決定できます。
例:
User:
"Analyze my fraud dataset and create account-level features."
LLM:
-> profile_dataset
-> run_feature_engineering
-> inspect result
-> explain generated featuresセキュリティに関する注意
元のエージェントは LLM で Python コードを生成し、exec() を使用して実行します。信頼できないモデル出力や信頼できないユーザーがサーバーに到達できる場合、これは高リスクな操作です。
本番環境では:
エージェントを分離されたコンテナで実行する
制限付きファイルシステムを使用する
生成されたコードを検証する
インポートを制限する
入出力パスを制限する
リソースおよび CPU/時間制限を使用する
任意のファイルシステムアクセスを公開しない
リモートデプロイ前に認証/認可を追加する
このリポジトリは、既存の生成コード実行が本番環境で安全であると意図的に主張していません。
推奨される次のアップグレード
フィーチャー評価ツールを追加する。
モデル性能比較を追加する。
フィーチャー系統(lineage)メタデータを追加する。
生成コードの実行前に承認/レビューを追加する。
Streamable HTTP デプロイを追加する。
認証を追加する。
元のワークフローで使用される固定スレッド ID の代わりに、LangGraph チェックポイント/セッション ID を追加する。
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
MCP facade over the Nebelus Construction API. ~48 tools give full agent build parity: create/update/probe agents, edit graphs, attach knowledge and vector stores, wire connectors, set governance policies and locked guardrails, enable grounding-trace, and read deployment wiring. Purpose-built for regulated industries: data residency is enforced per region (EU / GCC-KSA), with PII controls and an audit trail. Agents are created as drafts — no deploy tool is exposed over MCP by design; publishing happens in the Nebelus console.
Hosted MCP runtime where your agent publishes its own tools by tool call and keeps working.
Related MCP Servers
- AlicenseAqualityCmaintenanceExposes Great Expectations data-quality checks as MCP tools for LLM agents, enabling data loading, expectation definition, validation, and result interpretation.74MIT
- AlicenseAqualityDmaintenanceExposes Agent Skills to AI agents as MCP tools, enabling discovery and activation of skill instructions for coding agents.327MIT
- FlicenseAqualityDmaintenanceExposes two MCP tools (discover and execute) that enable agents to query an OpenAPI schema via natural language and execute matched API operations.2-
- FlicenseNot gradedqualityDmaintenanceExposes task management (add, list, complete tasks) and document search (RAG) as MCP tools for AI agents.-