Juhe Mobile Phone Location MCP Server

Juhe Mobile Phone Location MCP Server

By juhemcp GitHub

-

jmobile location
Overview

What is Juhe Mobile Phone Location MCP Server?

Juhe Mobile Phone Location MCP Server is a Model Context Protocol server that provides the functionality to query the location information of mobile phone numbers, including details such as province, city, and carrier.

How to use Juhe Mobile Phone Location MCP Server?

To use the server, you can either run it using the recommended uv tool or install it via pip. After installation, you need to set up your API key for mobile location queries.

Key features of Juhe Mobile Phone Location MCP Server?

  • Queries mobile phone number location information.
  • Provides details such as province, city, and carrier.
  • Supports asynchronous queries for efficient processing.

Use cases of Juhe Mobile Phone Location MCP Server?

  1. Determining the location of a mobile phone number for customer service.
  2. Verifying the origin of phone numbers in fraud detection.
  3. Enhancing user experience by providing location-based services.

FAQ from Juhe Mobile Phone Location MCP Server?

  • What programming language is the server built with?

The server is built using Python 3.10 or higher.

  • How do I obtain the API key?

You can get the API key from Juhe Data API.

  • Can I run the server on different operating systems?

Yes, the server can be run on both MacOS and Windows.

Content

Juhe Mobile Phone Location MCP Server

一个提供手机号码(段)所属归属地查询功能的模型上下文协议(Model Context Protocol)服务器。该服务器使大型语言模型(LLMs)能够获取手机号码段归属地信息,如:省份、城市、运营商。

Components

Tools

服务器实现了一个工具:

  • get_mobile_phone_location: 根据手机号码查询其所属地信息。
    • 需要传入 "phone"(手机号码)作为必须的字符串参数。
async def get_mobile_location(phone: str = "") -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]:

Install

This server requires Python 3.10 or higher. Install dependencies using uv (recommended) or pip

When using uv no specific installation is needed. We will use uvx to directly run jmobile-location-mcp-server.

uvx jmobile-location-mcp-server

Using PIP

Alternatively you can install jmobile-location-mcp-server via pip:

pip install jmobile-location-mcp-server

After installation, you can run it as a script using:

python -m jmobile_location_mcp_server

Configuration

Environment Variables

JUHE_MOBILE_LOCATION_API_KEY: 聚合数据的手机归属地查询API密钥。获取:https://www.juhe.cn/docs/api/id/11

JUHE_MOBILE_LOCATION_API_KEY=your_api_key

Claude Desktop

  • On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • On 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"
    }
  }
}

Debugging

You can use the MCP inspector to debug the server. For uvx installations:

npx @modelcontextprotocol/inspector uvx jmobile-location-mcp-server 

Or if you've installed the package in a specific directory or are developing on it:

cd path/to/servers/src/jmobile-location-mcp-server
npx @modelcontextprotocol/inspector uv run jmobile-location-mcp-server

Examples of Questions for Cline

  1. "查询下这个手机号码的归属地信息 18912341234"
No tools information available.
No content found.