Implementation:Datajuicer Data juicer MCP Server
| Knowledge Sources | |
|---|---|
| Domains | Tooling |
| Last Updated | 2026-02-14 16:00 GMT |
Overview
Concrete tool for the unified CLI entry point of the Data-Juicer MCP server provided by Data-Juicer.
Description
mcp_server is the CLI entry point (dj-mcp) for launching the Data-Juicer MCP server in either "granular-ops" mode (individual operator tools) or "recipe-flow" mode (high-level recipe workflow tools). It parses command-line arguments for mode selection, transport protocol (stdio, sse, streamable-http), and port number. Based on the selected mode, it imports the appropriate create_mcp_server function from either DJ_mcp_granular_ops or DJ_mcp_recipe_flow, creates the server, and starts it with the specified transport.
Usage
Use when you need to start Data-Juicer as an MCP-compatible tool server for AI assistant integration, choosing between granular operator access or recipe-based workflow modes.
Code Reference
Source Location
- Repository: Datajuicer_Data_juicer
- File:
data_juicer/tools/mcp_server.py
Signature
def main():
"""Data-Juicer MCP Server CLI entry point."""
Import
from data_juicer.tools.mcp_server import main
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| mode | str (CLI arg) | Yes | MCP server mode: "granular-ops" or "recipe-flow" |
| --transport | str (CLI arg) | No | Transport protocol: "stdio", "sse", or "streamable-http". Default: "stdio" |
| --port | int (CLI arg) | No | Port number for HTTP-based transports. Default: 8080 |
Outputs
| Name | Type | Description |
|---|---|---|
| server | FastMCP (running) | A running MCP server instance accessible via the specified transport protocol |
Usage Examples
# Launch MCP server in granular-ops mode via stdio
# dj-mcp granular-ops --transport stdio
# Launch MCP server in recipe-flow mode via SSE on port 8000
# dj-mcp recipe-flow --transport sse --port 8000
# Programmatic usage
from data_juicer.tools.mcp_server import main
# main() parses sys.argv and launches the server