Skip to main content

企业微信群机器人 MCP 服务器

Project description

企业微信消息 MCP 服务器

超简单的企业微信群机器人 MCP 服务器,让 AI 助手能发送消息到企业微信群。

安装

方式一:pip安装(推荐)

pip install qiye-wechat-mcp

方式二:从源码安装

git clone https://github.com/example/qiye-wechat-mcp.git
cd qiye-wechat-mcp
pip install -e .

快速开始

1. 配置企业微信群机器人

  1. 在企业微信群中添加群机器人
  2. 复制机器人的 Webhook URL

2. 设置环境变量

# 设置环境变量
export WECHAT_WEBHOOK_URL="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=your-webhook-key"

# 或者创建 .env 文件
echo "WECHAT_WEBHOOK_URL=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=your-webhook-key" > .env

3. 运行服务器

使用命令行工具

qiye-wechat-mcp

或使用Python模块

python -m qiye_wechat_mcp

4. 配置 Claude Desktop

在 Claude Desktop 配置文件中添加:

{
  "mcpServers": {
    "企业微信": {
      "command": "qiye-wechat-mcp",
      "env": {
        "WECHAT_WEBHOOK_URL": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=your-webhook-key"
      }
    }
  }
}

或者使用Python模块方式:

{
  "mcpServers": {
    "企业微信": {
      "command": "python",
      "args": ["-m", "qiye_wechat_mcp"],
      "env": {
        "WECHAT_WEBHOOK_URL": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=your-webhook-key"
      }
    }
  }
}

功能

  • send_text_message(content) - 发送文本消息
  • send_markdown_message(content) - 发送Markdown消息

发布到PyPI

构建包

python setup.py sdist bdist_wheel

上传到PyPI

pip install twine
twine upload dist/*

就这么简单!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qiye_wechat_mcp-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qiye_wechat_mcp-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file qiye_wechat_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: qiye_wechat_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for qiye_wechat_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d17c3549564cdaed30d0f3de13021cba71475df00aeb536ef6521e5c05240402
MD5 50db43896d424b1dafd7ab93decfd55d
BLAKE2b-256 4629d7a5fe2093800fa9deff4606c6b060cb770937e3dc036a69b9f03f096820

See more details on using hashes here.

File details

Details for the file qiye_wechat_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for qiye_wechat_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88911de674b3dd2e59b9868abc39b37aa7d90b9fd713cbb3ca19d77c725c4141
MD5 b28c92f009eaeadef6f5419ab0a175f7
BLAKE2b-256 26455c7a709846b38419cb26a8bfa88c615ee623b1b2045d3434247e827d5789

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page