Token导航 LogoToken导航

MCP Server · 文档知识

mhlabs MCP tools

一个基于FastMCP的可扩展AI工具生态系统,提供文本预处理、NLP组件和文档分析等功能,支持多种传输协议和认证方式。

stdio官方级别未说明来源级核验工具 36
PythonClaudeFastMCPClaude Desktop

快速开始

作者 / 组织
MusaddiqueHussainLabs
提供方
MusaddiqueHussainLabs

工具数量

36

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

0

仓库热度

收录来源

1 个

MCP World

选型结论

mhlabs MCP tools 属于文档知识类 MCP Server,公开资料标注 36 个工具,通过stdio 本地进程接入,适配 Claude Desktop、Claude,有可以直接复制的安装命令;接入前要先准备 会话凭据。

分类

文档知识

传输方式

stdio

认证方式

会话凭据

部署方式

公开资料未说明

安装与配置

安装命令

pip install -r requirements.txt

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 对应的运行时,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 36 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

mhlabs mcp工具

mcp名称:io.github。音乐学院侯赛因实验室/mhlabs_mcp_tools

🧠 mhlabs mcp工具

mhlabs-mcp-tools 是一个 模块化MCP工具服务器 使用 FastMCP.\ 它提供了一个 可扩展的人工智能工具生态系统 组织成功能类别(文本预处理、NLP组件、文档分析等),可以通过以下方式动态加载和提供服务 MCP(模型上下文协议) 通过 STDIO传输.

该项目是 MHLabs人工智能代理生态系统,旨在与 mhlabs-mcp-server, mhlabs-mcp-agents以及下游A2A代理框架。

______________________________________________________________________

特性

  • FastMCP服务器:支持多种传输协议的纯FastMCP实现
  • 工厂模式:可重复使用的MCP工具工厂,便于服务管理
  • 基于域的组织:按业务领域组织的服务(人力资源、技术支持等)
  • 认证:可选的Azure AD身份验证支持
  • 多个传输:STDIO、HTTP(流式传输)和SSE传输支持
  • VS代码集成:调试配置和开发设置
  • 综合测试:使用pytest进行单元测试
  • 灵活的配置:基于环境的配置管理

建筑

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

可用服务

目前,该软件包分为三个主要模块:

NLP组件

组件类型描述
标记化文本标记化
词性标注
词词形化
词法词形研究
dep依赖关系解析
ner命名实体识别
norm文本规范化

2.文本预处理

该模块为用户提供了一套广泛的文本预处理工具:

功能说明
to_lower将文本转换为小写
to_upper将文本转换为大写
remove_number删除数字字符
remove_itemized_bullet_and_numbering取消逐项/要点编号
remove_url从文本中删除url
remove_punctuation删除标点符号
remove_special_character删除特殊字符
keep_alpha_numeric仅保留字母数字字符
remove_whitespace删除多余的空格
normalize_unicode规范unicode字符
remove_stopword消除常见的停用词
remove_freqwords删除频繁出现的单词
remove_rarewords删除罕见词
remove_email删除电子邮件地址
remove_phone_number删除电话号码
remove_ssn删除社会安全号码(ssn)
remove_credit_card_number删除信用卡号
remove_emoji删除表情符号
remove_emotcons删除表情符号
convert_emoticons_to_words将表情符号转换为单词
convert_emojis_to_words将表情符号转换为单词
remove_html删除html标签
chat_words_conversion将聊天语言转换为标准英语
expand_contraction扩大收缩(例如,“不能”到“不能”)
tokenize_word标记单词
tokenize_sentence将句子标记化
stem_word词干
词形词对单词进行lemmatize
preprocess_text将多个预处理步骤合并到一个函数中

快速开始

开发设置

  1. 克隆和导航:
   cd src/mhlabs_mcp_tools
  1. 再进行:
   pip install -r requirements.txt
  1. 配置环境:
   cp .env.example .env
   # Edit .env with your configuration
  1. 启动服务器:
   # 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传输(默认)

  • 🔧 非常适合:本地工具、命令行集成、Claude Desktop
  • 🚀 用途: python mcp_server.py 或 python mcp_server.py --transport stdio

2.HTTP(流式)传输

  • 🌐 非常适合:基于Web的部署、微服务、远程访问
  • 🚀 用途: python mcp_server.py --transport http --port 9000
  • 🌐 网址: http://127.0.0.1:9000/mcp/

3.苏格兰和南方能源公司运输部(已弃用)

  • ⚠️ 仅支持旧版本-对新项目使用HTTP传输
  • 🚀 用途: python mcp_server.py --transport sse --port 9000

FastMCP CLI使用情况

# 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

VS代码开发

  1. 在VS代码中打开:
   code .
  1. 使用调试配置:

- Debug MCP Server (STDIO):使用STDIO传输运行 - Debug MCP Server (HTTP):使用HTTP传输运行 - Debug Tests:运行测试套件

配置

环境变量

创建一个 .env 文件基于 .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

认证

当 MCP_ENABLE_AUTH=true,服务器需要Azure AD承载令牌。使用适当的设置配置您的Azure应用程序注册。

对于开发,set MCP_ENABLE_AUTH=false 禁用身份验证。

添加新服务

  1. 创建服务类:
   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
  1. 在服务器中注册:
   # In mcp_server.py (gets registered automatically from services/ directory)
   factory.register_service(MyService())
  1. 添加域 (如果是新的):
   # In core/factory.py
   class Domain(Enum):
       # ... existing domains
       MY_DOMAIN = "my_domain"

MCP客户端使用情况

Python客户端

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

快速测试

测试STDIO传输:

# Start server in STDIO mode
python mcp_server.py --debug --no-auth

# Test with client_example.py
python client_example.py

测试HTTP传输:

# 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())
"

使用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/

故障排除

常见问题

  1. 导入错误:确保您位于正确的目录中,并且安装了依赖项
  2. 身份验证错误:检查您的Azure AD配置和令牌
  3. 端口冲突:如果9000已在使用中,请更改配置中的端口
  4. 缺少fastmcp:安装 pip install fastmcp

调试模式

启用调试模式以进行详细日志记录:

python mcp_server.py --debug --no-auth

或设置在环境中:

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

______________________________________________________________________

📄 许可证

麻省理工学院许可证©2025 侯赛因博物馆实验室

______________________________________________________________________

🤝 贡献

  1. 遵循现有的代码结构和模式
  2. 添加新功能的测试
  3. 更新新功能的文档
  4. 使用提供的VS代码配置进行开发

______________________________________________________________________

🧠 了解更多

______________________________________________________________________

💡 小贴士

如果你想嵌入 mhlabs-mcp-tools 变成一个更大的基于MCP的编排器:

from fastmcp import StdioServerParameters
server_params = StdioServerParameters(
    command="python",
    args=["-m", "mhlabs_mcp_tools.server"],
    //env={"MHLABS_MCP_CATEGORY": "textprep,nlp"}
)

______________________________________________________________________

与开发❤️ 通过 侯赛因博物馆实验室

工具与能力

工具数量

36

资源数量

0

提示词数量

0

能力标签

文本预处理Python本地部署NLP组件文档分析FastMCPAI工具

支持客户端

Claude DesktopClaude

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

读长文档提问

把 PDF、Markdown 和笔记交给模型,按章节追问细节。

整理知识库

把零散资料归档、打标签,检索时更容易命中。

批量出摘要

提取要点,输出能直接引用的段落。

选择建议

值得选的地方

  • 工具数量 36 个,一次接入能覆盖的操作比单点工具更全。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude Desktop、Claude,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 运行环境,换机器要重新装一遍。
  • 需要自备会话凭据,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到会话凭据的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
mhlabs MCP tools

MCP World · 本页

36stdio有1 个2026-05-17
Cherry Studio

MCP World

0未说明未标注1 个2026-05-17
Pdf Math Translate

MCP World

0stdio有1 个2026-05-17
report generation

MCP World

0stdio有1 个2026-05-17
Anything To Notebooklm

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

mhlabs MCP tools 怎么安装?

公开资料给出的安装命令是 pip install -r requirements.txt,运行环境为 未标注。装完后按客户端要求写进 MCP 配置,重启客户端生效。

mhlabs MCP tools 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

mhlabs MCP tools 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

mhlabs MCP tools 需要 API Key 吗?

公开资料标注的认证方式是会话凭据,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

mhlabs MCP tools 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP