Windows应用开发工具服务器

一个将微软WinAppCli工具暴露给Claude Desktop和其他MCP客户端的模型上下文协议(MCP)服务器,用于简化Windows应用开发流程。

  • by hamza-usmani
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 hamza-usmani/winapp-mcp-demo

使用说明

WinAppLi MCP服务器

一个模型上下文协议(MCP)服务器,它公开了微软的 WinAppLi Claude Desktop和其他MCP客户端的工具。

先决条件

  1. Python 3.10+ -用于运行MCP服务器
  2. 克劳德桌面 -与Claude一起使用

安装

快速设置

  1. 将此存储库克隆或下载到本地目录

  2. 运行安装脚本:

    python setup_mcp_server.py
    

    此脚本将:

    • ✅ 检查Python版本兼容性
    • ✅ 验证WinAppLi安装或通过WinGet安装
    • ✅ 安装其他必需的依赖项
    • ✅ 生成示例Claude桌面配置
    • ✅ 启动MCP服务器
  3. 配置您的MCP客户端:

    对于Claude Desktop:

    • 从以下位置复制配置 claude_desktop_config.example.json 致:
      • 位置: %APPDATA%\Roaming\Claude\claude_desktop_config.json
    • 更新路径至 server.py 如有需要
    • 重新启动克劳德桌面

    对于使用GitHub Copilot的VS代码:

    • 打开VS代码设置(文件→ 偏好设置→ 设置)
    • 搜索“MCP”或“模型上下文协议”
    • 点击“在settings.json中编辑”
    • 添加MCP服务器配置:
      {
        "github.copilot.chat.mcp.enabled": true,
        "github.copilot.chat.mcp.servers": {
          "winappcli": {
            "command": "python",
            "args": ["C:\\full\\path\\to\\server.py"]
          }
        }
      }
      
    • 替换 C:\\full\\path\\to\\server.py 与您的实际路径 server.py
    • 重新启动VS代码

使用示例

配置后,您可以要求Claude帮助完成Windows应用程序开发任务:

示例1:初始化新项目

"Initialize a Windows app project in the current directory with all necessary assets"

示例2:生成清单

"Generate an AppxManifest.xml for my app called 'MyApp' published by 'MyCompany' with version 1.0.0.0"

示例3:创建MSIX包

"Package the app in ./dist folder into an MSIX file, generate and install a certificate for signing"

示例4:添加调试标识

"Add debug identity to my app at ./bin/MyApp.exe so I can test Windows APIs"

命令超时

一些操作(如包装)可能需要时间。服务器对每个命令有5分钟的超时时间。

权限错误

某些操作(如证书安装)需要管理员权限。如果需要,以管理员身份运行Claude Desktop。