Convert any Python module or library into a FastMCP Model Context Protocol server.
Python
0
6 commits
updated Oct 8, 2026
Convert any Python module or library into a FastMCP Model Context Protocol server.
Integrum turns any Python module, library, function, or class into a Model Context Protocol (MCP) server powered by FastMCP.
Integrum uses Python reflection (inspect), regex filtering, and an in-memory Word-Based Object Store (playful_llama, swift_falcon) so that object-oriented libraries (such as scikit-learn, pandas, PyTorch) can be used naturally by LLMs across multi-turn conversations without token bloat.
inspect.--include and --exclude regex patterns.playful_llama) to save tokens and avoid UUID hallucination.Context sessions to partition objects per connecting client.swift_falcon.data or swift_falcon.target directly to subsequent tool calls like fit().integrum expose) or integrate directly into Python scripts.uv pip install integrum
# or
pip install integrum
Expose scikit-learn dataset loaders and RandomForestClassifier as an MCP server:
integrum expose sklearn.datasets.load_iris sklearn.ensemble.RandomForestClassifier
Preview what tools will be exposed:
integrum list sklearn.datasets.load_iris sklearn.ensemble.RandomForestClassifier
Filter functions and methods with regex:
integrum expose sklearn.datasets sklearn.ensemble \
--include "^(load_iris|RandomForestClassifier)$"
Run with HTTP or SSE transport:
integrum expose sklearn.datasets.load_iris --transport http --port 8000
from integrum import IntegrumServer
server = IntegrumServer(name="ml-server")
server.expose(["sklearn.datasets.load_iris", "sklearn.ensemble.RandomForestClassifier"])
# Run over stdio (default for MCP desktop clients)
server.run(transport="stdio")
When a class is exposed, Integrum registers:
<ClassName>_create: Instantiates the class and stores it under a word ID (e.g., playful_llama).<ClassName>_<method>: Accepts a virtual parameter obj_id: str (e.g., obj_id="playful_llama"), resolves the underlying instance, and executes the method.Returned objects (such as datasets or numpy arrays) are also registered in the store with word IDs, allowing subsequent tools to receive them as arguments.
Check out examples/gemma_sklearn_session.md and examples/gemma_sklearn_session.json for a complete, verified multi-turn transcript of Gemma 4 26B loading the Iris dataset, performing train_test_split, training a RandomForestClassifier, and evaluating accuracy.
This project is licensed under the terms of the MIT License. Copyright (c) 2026 AlphaDeep.
Convert any Python module or library into a FastMCP Model Context Protocol server.
Python
0
6 commits
updated Oct 8, 2026
Convert any Python module or library into a FastMCP Model Context Protocol server.
Integrum turns any Python module, library, function, or class into a Model Context Protocol (MCP) server powered by FastMCP.
Integrum uses Python reflection (inspect), regex filtering, and an in-memory Word-Based Object Store (playful_llama, swift_falcon) so that object-oriented libraries (such as scikit-learn, pandas, PyTorch) can be used naturally by LLMs across multi-turn conversations without token bloat.
inspect.--include and --exclude regex patterns.playful_llama) to save tokens and avoid UUID hallucination.Context sessions to partition objects per connecting client.swift_falcon.data or swift_falcon.target directly to subsequent tool calls like fit().integrum expose) or integrate directly into Python scripts.uv pip install integrum
# or
pip install integrum
Expose scikit-learn dataset loaders and RandomForestClassifier as an MCP server:
integrum expose sklearn.datasets.load_iris sklearn.ensemble.RandomForestClassifier
Preview what tools will be exposed:
integrum list sklearn.datasets.load_iris sklearn.ensemble.RandomForestClassifier
Filter functions and methods with regex:
integrum expose sklearn.datasets sklearn.ensemble \
--include "^(load_iris|RandomForestClassifier)$"
Run with HTTP or SSE transport:
integrum expose sklearn.datasets.load_iris --transport http --port 8000
from integrum import IntegrumServer
server = IntegrumServer(name="ml-server")
server.expose(["sklearn.datasets.load_iris", "sklearn.ensemble.RandomForestClassifier"])
# Run over stdio (default for MCP desktop clients)
server.run(transport="stdio")
When a class is exposed, Integrum registers:
<ClassName>_create: Instantiates the class and stores it under a word ID (e.g., playful_llama).<ClassName>_<method>: Accepts a virtual parameter obj_id: str (e.g., obj_id="playful_llama"), resolves the underlying instance, and executes the method.Returned objects (such as datasets or numpy arrays) are also registered in the store with word IDs, allowing subsequent tools to receive them as arguments.
Check out examples/gemma_sklearn_session.md and examples/gemma_sklearn_session.json for a complete, verified multi-turn transcript of Gemma 4 26B loading the Iris dataset, performing train_test_split, training a RandomForestClassifier, and evaluating accuracy.
This project is licensed under the terms of the MIT License. Copyright (c) 2026 AlphaDeep.