巨鹤手机定位MCP服务器
一个提供手机号码(段)所属归属地查询功能的模型上下文协议(Model Context Protocol)服务器。该服务器使大型语言模型(LLMs)能够获取手机号码段归属地信息,如:省份、城市、运营商。
组件
工具
服务器实现了一个工具:
- get_mobile_phone_location:根据手机号码查询其所属地信息。
- 需要传入 "phone"(手机号码)作为必须的字符串参数。
async def get_mobile_location(phone: str = "") -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]:安装
此服务器需要Python 3.10或更高版本。使用uv(推荐)或pip安装依赖项
使用紫外线(推荐)
使用时 紫外线 不需要特定的安装。我们将使用 uvx 直接运行jmobile定位mcp服务器。
uvx jmobile-location-mcp-server使用PIP
或者,您可以通过pip安装jmobile位置mcp服务器:
pip install jmobile-location-mcp-server安装后,您可以使用以下命令将其作为脚本运行:
python -m jmobile_location_mcp_server配置
环境变量
JUHE_MOBILE_LOCATION_API_KEY: 聚合数据的手机归属地查询API密钥。获取:https://www.juhe.cn/docs/api/id/11
JUHE_MOBILE_LOCATION_API_KEY=your_api_key克劳德桌面
- 在MacOS上:
~/Library/Application\ Support/Claude/claude_desktop_config.json - 在Windows上:
%APPDATA%/Claude/claude_desktop_config.json
Using uvx
"mcpServers": {
"jmobile-location-mcp-server": {
"command": "uvx",
"args": [
"jmobile-location-mcp-server"
],
"env": {
"JUHE_MOBILE_LOCATION_API_KEY": "your_api_key"
}
}
}Using pip installation
"mcpServers": {
"jmobile-location-mcp-server": {
"command": "python",
"args": [
"-m",
"jmobile_location_mcp_server"
],
"env": {
"JUHE_MOBILE_LOCATION_API_KEY": "your_api_key"
}
}
}调试
您可以使用MCP检查器调试服务器。对于uvx安装:
npx @modelcontextprotocol/inspector uvx jmobile-location-mcp-server 或者,如果您已将软件包安装在特定目录中或正在其上开发:
cd path/to/servers/src/jmobile-location-mcp-server
npx @modelcontextprotocol/inspector uv run jmobile-location-mcp-serverCline问题示例
- "查询下这个手机号码的归属地信息 18912341234"
