Feature Engineering MCP Server
Exposes the automated feature engineering LangGraph agent as MCP tools, enabling dataset profiling, feature planning, and feature code execution through MCP-compatible hosts.
README
Feature Engineering MCP Server
An MCP (Model Context Protocol) server that exposes the existing
ahutosh173/automated-feature-engineering LangGraph agent as reusable tools.
The original agent takes a CSV, a fraud/modus-operandi objective, schema metadata, ID column and label column, then:
- analyzes the modeling objective,
- proposes candidate features,
- generates pandas feature-engineering code,
- executes that code, and
- writes an Excel feature file.
This project adds an MCP interface on top of that workflow.
Architecture
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 output
MCP tools
| Tool | Purpose |
|---|---|
profile_dataset |
Inspect a CSV before running the agent |
run_feature_engineering |
Run the complete existing LangGraph agent |
get_feature_engineering_plan |
Run the agent and return its analysis, candidate features and generated code |
health_check |
Verify server configuration |
Important design decision
The MCP layer does not replace the existing agent.
It is an adapter around the existing agent so that an MCP-compatible host can discover and call the feature-engineering workflow as a tool.
The original repository is:
https://github.com/ahutosh173/automated-feature-engineering
1. Prerequisites
- Python 3.10+
- Git
- Access to the original feature-engineering agent repository
- The LLM configuration required by the original agent
The MCP Python SDK currently requires Python 3.10+.
2. Clone both repositories
Recommended layout:
projects/
├── automated-feature-engineering/
└── feature-engineering-mcp/
Clone the original repository:
git clone https://github.com/ahutosh173/automated-feature-engineering.git
Clone this repository:
git clone <YOUR-MCP-REPO-URL>
3. Create a virtual environment
From this repository:
python -m venv .venv
Windows:
.venv\Scripts\activate
Linux/macOS:
source .venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Install the original agent's dependencies:
pip install -r ../automated-feature-engineering/requirements.txt
4. Configure the original agent
The original repository currently expects its own .env configuration,
including HF_TOKEN.
Configure that repository exactly as described in its README.
Do not commit API keys or tokens.
5. Configure this MCP server
Copy:
cp .env.example .env
Windows PowerShell:
Copy-Item .env.example .env
Set:
FEATURE_ENGINEERING_REPO=../automated-feature-engineering
If the two repositories are somewhere else, use an absolute path.
Example:
FEATURE_ENGINEERING_REPO=C:/projects/automated-feature-engineering
6. Run the MCP server
For local stdio usage:
python server.py
The process will wait for an MCP client over stdin/stdout.
For MCP Inspector development:
mcp dev server.py
The official MCP Python SDK provides the Inspector development workflow and supports defining tools directly from typed Python functions.
7. Test without an external MCP host
Run:
pytest -q
The tests use the MCP Python client's in-memory connection and therefore test the MCP tool definitions without starting a subprocess.
Example: profile a dataset
An MCP client can call:
{
"name": "profile_dataset",
"arguments": {
"csv_path": "../automated-feature-engineering/data/train.csv"
}
}
Example response:
{
"success": true,
"rows": 10000,
"columns": 25,
"columns_info": [
{
"name": "amount",
"dtype": "float64",
"missing": 0,
"missing_pct": 0.0,
"unique": 9000
}
]
}
Example: run the agent
{
"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"
}
}
Why MCP is useful here
Without MCP, the feature-engineering workflow is primarily a Python application.
With MCP, an MCP-compatible host can discover the feature-engineering tools and decide when to invoke them.
For example:
User:
"Analyze my fraud dataset and create account-level features."
LLM:
-> profile_dataset
-> run_feature_engineering
-> inspect result
-> explain generated features
Security note
The original agent generates Python code with an LLM and executes it using
exec(). That is a high-risk operation if untrusted model output or untrusted
users can reach the server.
For production:
- run the agent in an isolated container,
- use a restricted filesystem,
- validate generated code,
- restrict imports,
- restrict input/output paths,
- use resource and CPU/time limits,
- do not expose arbitrary filesystem access,
- add authentication/authorization before remote deployment.
This repository intentionally does not claim that the existing generated-code execution is production-safe.
Suggested next upgrades
- Add a feature evaluation tool.
- Add model-performance comparison.
- Add feature lineage metadata.
- Add approval/review before generated code executes.
- Add Streamable HTTP deployment.
- Add authentication.
- Add LangGraph checkpoint/session IDs instead of the fixed thread ID used by the original workflow.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.