Skip to main content
Glama

imessage-query-fastmcp-mcp-server

iMessage 查询 MCP 服务器

一个 MCP 服务器,通过模型上下文协议 (MCP) 提供对 iMessage 数据库的安全访问。该服务器基于 FastMCP 框架和 imessagedb 库构建,使 LLM 能够查询和分析 iMessage 对话,并进行适当的电话号码验证和附件处理。

📋 系统要求

  • macOS(iMessage 数据库访问所需)
  • Python 3.6+

📦依赖项

安装所有必需的依赖项:

# Using pip pip install -r requirements.txt

所需软件包

  • fastmcp :构建模型上下文协议服务器的框架
  • imessagedb :用于访问和查询 macOS 消息数据库的 Python 库
  • phonenumbers :Google 的电话号码处理库,用于正确的号码验证和格式化

所有依赖项均在requirements.txt中指定,以方便安装。

📑 目录

🛠️ MCP 工具

服务器向 LLM 公开以下工具:

获取聊天记录

检索特定电话号码的短信历史记录,并可选择日期筛选。包括:

  • 消息文本和时间戳
  • 附件信息(如果有)
  • 正确的电话号码验证
  • 日期范围过滤

🚀 入门

克隆存储库:

git clone https://github.com/hannesrudolph/imessage-query-fastmcp-mcp-server.git cd imessage-query-fastmcp-mcp-server

📦安装选项

您可以在 Claude Desktop 或 Cline VSCode 插件中安装此 MCP 服务器。请选择最符合您需求的选项。

选项 1:安装 Claude Desktop

使用 FastMCP 安装:

fastmcp install imessage-query-server.py --name "iMessage Query"

选项 2:安装 Cline VSCode 插件

要将此服务器与Cline VSCode 插件一起使用:

  1. 在 VSCode 中,单击 Cline 插件侧栏中的服务器图标 (☰)
  2. 点击“编辑 MCP 设置”按钮 (✎)
  3. 在设置文件中添加以下配置:
{ "imessage-query": { "command": "uv", "args": [ "run", "--with", "fastmcp", "fastmcp", "run", "/path/to/repo/imessage-query-server.py" ] } }

/path/to/repo替换为您克隆此存储库的完整路径(例如, /Users/username/Projects/imessage-query-fastmcp-mcp-server

🔒 安全功能

  • 对 iMessage 数据库的只读访问权限
  • 使用 phonenumbers 库进行电话号码验证
  • 通过丢失文件检测进行安全附件处理
  • 日期范围验证
  • 抑制进度输出以获得干净的 JSON 响应

📚 开发文档

该存储库包括用于开发的文档文件:

  • dev_docs/imessagedb-documentation.txt :包含有关 iMessage 数据库结构和 imessagedb 库功能的综合文档。

该文档在开发功能时可作为上下文,并可与 LLM 一起使用以协助开发。

⚙️ 环境变量

不需要环境变量,因为服务器会自动将 iMessage 数据库定位在默认的 macOS 位置。

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

MCP 服务器通过 MCP 提供对 iMessage 数据库的安全访问,使 LLM 能够通过适当的电话号码验证和附件处理来查询和分析 iMessage 对话

  1. 📋 系统要求
    1. 📦依赖项
      1. 所需软件包
    2. 📑 目录
      1. 🛠️ MCP 工具
        1. 获取聊天记录
      2. 🚀 入门
        1. 📦安装选项
          1. 选项 1:安装 Claude Desktop
          2. 选项 2:安装 Cline VSCode 插件
        2. 🔒 安全功能
          1. 📚 开发文档
            1. ⚙️ 环境变量

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                An MCP server that provides safe, read-only access to SQLite databases through MCP. This server is built with the FastMCP framework, which enables LLMs to explore and query SQLite databases with built-in safety features and query validation.
                Last updated 8 days ago
                77
                Python
              • -
                security
                A
                license
                -
                quality
                An MCP server that integrates with MySQL databases, enabling secure read and write operations through LLM-driven interfaces with support for transaction handling and performance monitoring.
                Last updated 5 months ago
                682
                13
                JavaScript
                MIT License
              • -
                security
                A
                license
                -
                quality
                Open source MCP server specializing in easy, fast, and secure tools for Databases.
                Last updated 19 hours ago
                7,856
                Go
                Apache 2.0
                • Linux
              • -
                security
                A
                license
                -
                quality
                A macOS app that provides an MCP server to your Messages, Contacts, and more
                Last updated 2 days ago
                719
                MIT License
                • Apple

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/hannesrudolph/imessage-query-fastmcp-mcp-server'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server