Skip to main content
Glama

MCP 个人助理代理

使用模型上下文协议 (MCP) 构建的多功能个人助理 AI 代理,可帮助处理日历、任务、电子邮件等。

概述

该项目是一个模型上下文协议 (MCP) 服务器,为个人助理代理提供了一套工具。它可以与 Claude for Desktop 等 MCP 客户端集成,使 AI 助理能够:

  • 管理日历事件

  • 跟踪任务和待办事项

  • 阅读和发送电子邮件

  • 搜索网络并检索信息

  • 控制智能家居设备

要求

⚠️重要提示: MCP SDK 需要 Python 3.10 或更高版本。服务器不支持更低版本的 Python。

  • Python 3.10+

  • MCP SDK 1.2.0+

  • 所需的 Python 包(请参阅 requirements.txt)

安装

  1. 克隆存储库:

git clone https://github.com/yourusername/mcp-pa-ai-agent.git cd mcp-pa-ai-agent
  1. 确保您拥有 Python 3.10+:

python --version
  1. 如果您的系统 Python 版本早于 3.10,请设置兼容环境:

# Using conda conda create -n mcp-env python=3.10 conda activate mcp-env # OR using venv (if Python 3.10+ is installed elsewhere) python3.10 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
  1. 安装依赖项:

pip install -r requirements.txt
  1. 通过复制示例文件来配置环境变量:

cp .env.example .env
  1. 使用您的 API 凭证和设置编辑.env文件。

运行服务器

使用以下命令启动 MCP 服务器:

python mcp_server.py

服务器将启动并监听 MCP 客户端连接。

连接到 Claude 桌面版

  1. 安装Claude 桌面版

  2. 通过编辑配置文件来配置 Claude for Desktop 以使用此 MCP 服务器:

    • MacOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  3. 添加以下配置:

{ "mcpServers": { "personal-assistant": { "command": "/path/to/python", "args": [ "/absolute/path/to/mcp-pa-ai-agent/mcp_server.py" ] } } }

如果您使用虚拟环境,请确保指向该环境中的 Python 可执行文件。

  1. 重启 Claude 桌面版

可用工具

日历

  • get_events :检索即将发生的日历事件

  • create_event :安排新的日历事件

任务

  • list_tasks :查看所有任务或按状态过滤

  • add_task :创建新任务

  • update_task_status :将任务标记为待处理、进行中或已完成

电子邮件

  • get_emails :列出收件箱中的最近电子邮件

  • read_email :查看特定电子邮件的完整内容

  • send_email :撰写并发送新电子邮件

知识

  • web_search :在网络上搜索信息

  • get_weather :获取当前天气信息

  • get_news :检索最新新闻文章

智能家居

  • list_devices :查看所有智能家居设备

  • control_device :控制智能家居设备(灯、恒温器等)

  • get_device_state :获取有关设备当前状态的详细信息

配置

服务器需要各种 API 密钥和凭证来访问不同的服务:

  • Google API :用于日历和电子邮件功能(OAuth2 凭证)

  • 天气 API :获取天气信息

  • 新闻 API :用于新闻检索

  • 家庭助理:用于智能家居控制

请参阅.env.example文件以了解所有可配置选项。

故障排除

Python 版本问题

如果您看到如下错误:

Error: Python 3.10 or higher is required for the MCP server.

您需要升级您的 Python 版本或使用 Python 3.10+ 的虚拟环境。

MCP SDK 安装问题

如果您在安装 MCP SDK 时遇到问题:

ERROR: Could not find a version that satisfies the requirement mcp>=1.2.0

确保您使用的是 Python 3.10+ 并且 pip 已更新:

pip install --upgrade pip

发展

要向服务器添加新功能,您可以:

  1. modules/目录中创建一个新模块

  2. 使用@mcp.tool()装饰器实现函数

  3. mcp_server.py中导入您的模块

执照

麻省理工学院

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

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

Related MCP Servers

  • -
    security
    -
    license
    -
    quality
    A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
    Last updated -
    36
    1
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol server that enables AI assistants to manage meeting data, including creating meeting bots, searching transcripts, and organizing calendar events.
    Last updated -
    21
    MIT License
    • Apple
  • -
    security
    -
    license
    -
    quality
    A Model Context Protocol server that extends AI capabilities through tools for remote control, note-taking, email operations, and knowledge search.
    Last updated -
  • A
    security
    -
    license
    A
    quality
    A Model Context Protocol server that enables AI assistants to communicate with each other using Inter-Process Communication, featuring natural language commands and cross-platform compatibility.
    Last updated -
    9
    107
    MIT License

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/zhangzhongnan928/mcp-pa-ai-agent'

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