Listed from the MCP registry; nobody on Odel publishes it.
An MCP server that provides text preprocessing, NLP components, and document analysis
Runs on your machine from its package; the steps are below.
At most: only reads or looks up information.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted โ your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
uvx mhlabs-mcp-tools
MCP client config
{
"mcpServers": {
"mhlabs-tools": {
"command": "uvx",
"args": [
"mhlabs-mcp-tools"
]
}
}
}mcp-name: io.github.MusaddiqueHussainLabs/mhlabs_mcp_tools
mhlabs-mcp-tools is a Modular MCP Tools Server built using FastMCP.
It provides an extendable AI tool ecosystem organized into functional categories (Text Preprocessing, NLP Components, Document Analysis, etc.) that can be dynamically loaded and served through MCP (Model Context Protocol) via STDIO transport.
This project is part of the MHLabs AI Agentic Ecosystem, designed to work with mhlabs-mcp-server, mhlabs-mcp-agents, and downstream A2A agent frameworks.
mhlabs_mcp_tools/
โโโ .gitignore
โโโ .vscode/
โ โโโ settings.json
โโโ CHANGELOG.md
โโโ LICENSE
โโโ README.md
โโโ docs/
โ โโโ index.md
โโโ examples/
โ โโโ example_client.py
โ โโโ example_client_http.py
โโโ mkdocs.yml
โโโ pyproject.toml
โโโ requirements.txt
โโโ server.json
โโโ src/
โโโ __init__.py
โโโ main.py
โโโ mhlabs_mcp_tools/
โโโ __init__.py
โโโ core/
โ โโโ __init__.py
โ โโโ config.py
โ โโโ constants.py
โ โโโ factory.py
โ โโโ prompts.py
โโโ data/
โ โโโ __init__.py
โ โโโ external/
โ โ โโโ __init__.py
โ โโโ interim/
โ โ โโโ __init__.py
โ โโโ processed/
โ โ โโโ __init__.py
โ โโโ raw/
โ โโโ __init__.py
โ โโโ contractions_dict.json
โ โโโ custom_substitutions.csv
โ โโโ leftovers_dict.json
โ โโโ slang_dict.json
โโโ handlers/
โ โโโ __init__.py
โ โโโ custom_exceptions.py
โ โโโ output_generator.py
โโโ mcp_server.py
โโโ models/
โ โโโ __init__.py
โโโ nlp_components/
โ โโโ __init__.py
โ โโโ nlp_model.py
โโโ services/
โ โโโ __init__.py
โ โโโ langchain_framework.py
โ โโโ spacy_extractor.py
โโโ text_preprocessing/
โโโ __init__.py
โโโ contractions.py
โโโ emo_unicode.py
โโโ slang_text.py
โโโ text_preprocessing.py
Currently the package is organized into three primary modules:
| Component Type | Description |
|---|---|
| tokenize | Text tokenization |
| pos | Part-of-Speech tagging |
| lemma | Word lemmatization |
| morphology | Study of word forms |
| dep | Dependency parsing |
| ner | Named Entity Recognition |
| norm | Text normalization |
This module equips users with an extensive set of text preprocessing tools:
| Function | Description |
|---|---|
| to_lower | Convert text to lowercase |
| to_upper | Convert text to uppercase |
| remove_number | Remove numerical characters |
| remove_itemized_bullet_and_numbering | Eliminate itemized/bullet-point numbering |
| remove_url | Remove URLs from text |
| remove_punctuation | Remove punctuation marks |
| remove_special_character | Remove special characters |
| keep_alpha_numeric | Keep only alphanumeric characters |
| remove_whitespace | Remove excess whitespace |
| normalize_unicode | Normalize Unicode characters |
| remove_stopword | Eliminate common stopwords |
| remove_freqwords | Remove frequently occurring words |
| remove_rarewords | Remove rare words |
| remove_email | Remove email addresses |
| remove_phone_number | Remove phone numbers |
| remove_ssn | Remove Social Security Numbers (SSN) |
| remove_credit_card_number | Remove credit card numbers |
| remove_emoji | Remove emojis |
| remove_emoticons | Remove emoticons |
| convert_emoticons_to_words | Convert emoticons to words |
| convert_emojis_to_words | Convert emojis to words |
| remove_html | Remove HTML tags |
| chat_words_conversion | Convert chat language to standard English |
| expand_contraction | Expand contractions (e.g., "can't" to "cannot") |
| tokenize_word | Tokenize words |
| tokenize_sentence | Tokenize sentences |
| stem_word | Stem words |
| lemmatize_word | Lemmatize words |
| preprocess_text | Combine multiple preprocessing steps into one function |
Clone and Navigate:
cd src/mhlabs_mcp_tools
Install Dependencies:
pip install -r requirements.txt
Configure Environment:
cp .env.example .env
# Edit .env with your configuration
Start the Server:
# Default STDIO transport (for local MCP clients)
python mcp_server.py
# HTTP transport (for web-based clients)
python mcp_server.py --transport http --port 9000
or
after installed mhlabs-mcp-tools
python -m mhlabs_mcp_tools.mcp_server --transport http --port 9000
# Using FastMCP CLI (recommended)
fastmcp run mcp_server.py -t streamable-http --port 9000 -l DEBUG
# Debug mode with authentication disabled
python mcp_server.py --transport http --debug --no-auth
1. STDIO Transport (default)
python mcp_server.py or python mcp_server.py --transport stdio2. HTTP (Streamable) Transport
python mcp_server.py --transport http --port 9000http://127.0.0.1:9000/mcp/3. SSE Transport (deprecated)
python mcp_server.py --transport sse --port 9000# Standard HTTP server
fastmcp run mcp_server.py -t streamable-http --port 9000 -l DEBUG
# With custom host
fastmcp run mcp_server.py -t streamable-http --host 0.0.0.0 --port 9000 -l DEBUG
# STDIO transport (for local clients)
fastmcp run mcp_server.py -t stdio
# Development mode with MCP Inspector
fastmcp dev mcp_server.py -t streamable-http --port 9000
Open in VS Code:
code .
Use Debug Configurations:
Debug MCP Server (STDIO): Run with STDIO transportDebug MCP Server (HTTP): Run with HTTP transportDebug Tests: Run the test suiteCreate a .env file based on .env.example:
# Server Settings
MCP_HOST=0.0.0.0
MCP_PORT=9000
MCP_DEBUG=false
MCP_SERVER_NAME=MHLABS MCP Server
# Authentication Settings
MCP_ENABLE_AUTH=true
AZURE_TENANT_ID=your-tenant-id-here
AZURE_CLIENT_ID=your-client-id-here
AZURE_JWKS_URI=https://login.microsoftonline.com/your-tenant-id/discovery/v2.0/keys
AZURE_ISSUER=https://sts.windows.net/your-tenant-id/
AZURE_AUDIENCE=api://your-client-id
When MCP_ENABLE_AUTH=true, the server expects Azure AD Bearer tokens. Configure your Azure App Registration with the appropriate settings.
For development, set MCP_ENABLE_AUTH=false to disable authentication.
Create Service Class:
from core.factory import MCPToolBase, Domain
class MyService(MCPToolBase):
def __init__(self):
super().__init__(Domain.MY_DOMAIN)
def register_tools(self, mcp):
@mcp.tool(tags={self.domain.value})
async def my_tool(param: str) -> str:
# Tool implementation
pass
@property
def tool_count(self) -> int:
return 1 # Number of tools
Register in Server:
# In mcp_server.py (gets registered automatically from services/ directory)
factory.register_service(MyService())
Add Domain (if new):
# In core/factory.py
class Domain(Enum):
# ... existing domains
MY_DOMAIN = "my_domain"
import asyncio
from fastmcp import Client
client = Client("http://localhost:9000/mcp")
async def main():
async with client:
tools = await client.list_tools()
# tools -> list[mcp.types.Tool]
# print(tools)
for tool in tools:
print(f"Tool: {tool.name}")
result = await client.call_tool("textprep.expand_contraction", {"input_text": "The must've SSN is 859-98-0987. The employee's phone number is 555-555-5555."})
print("Result:", result)
asyncio.run(main())
# Test the server is running
curl http://localhost:9000/mcp/
# With FastMCP CLI for testing
fastmcp dev mcp_server.py -t streamable-http --port 9000
Test STDIO Transport:
# Start server in STDIO mode
python mcp_server.py --debug --no-auth
# Test with client_example.py
python client_example.py
Test HTTP Transport:
# Start HTTP server
python mcp_server.py --transport http --port 9000 --debug --no-auth
# Test with FastMCP client
python -c "
from fastmcp import Client
import asyncio
async def test():
async with Client('http://localhost:9000/mcp') as client:
result = await client.call_tool("textprep.expand_contraction", {"input_text": "The must've SSN is 859-98-0987. The employee's phone number is 555-555-5555."})
print(result)
asyncio.run(test())
"
Test with FastMCP CLI:
# Start with FastMCP CLI
fastmcp run mcp_server.py -t streamable-http --port 9000 -l DEBUG
# Server will be available at: http://127.0.0.1:9000/mcp/
pip install fastmcpEnable debug mode for detailed logging:
python mcp_server.py --debug --no-auth
Or set in environment:
MCP_DEBUG=true
usage: mcp_server.py [-h] [--transport {stdio,http,streamable-http,sse}]
[--host HOST] [--port PORT] [--debug] [--no-auth]
MHLABS MCP Server
options:
-h, --help show this help message and exit
--transport, -t Transport protocol (default: stdio)
--host HOST Host to bind to for HTTP transport (default: 127.0.0.1)
--port, -p PORT Port to bind to for HTTP transport (default: 9000)
--debug Enable debug mode
--no-auth Disable authentication
MIT License ยฉ 2025 MusaddiqueHussain Labs
If you want to embed mhlabs-mcp-tools into a larger MCP-based orchestrator:
from fastmcp import StdioServerParameters
server_params = StdioServerParameters(
command="python",
args=["-m", "mhlabs_mcp_tools.server"],
//env={"MHLABS_MCP_CATEGORY": "textprep,nlp"}
)
Developed with โค๏ธ by MusaddiqueHussain Labs