Skip to main content

MCP server for closing running applications by process name

Project description

FastMCP App Closer

MCP 服务器,用于关闭正在运行的应用程序。

功能特性

  • 🔍 智能进程查找 - 支持模糊匹配进程名
  • 🎯 别名支持 - 内置常见应用别名(微信、飞书、钉钉等)
  • 🛡️ 安全保护 - 防止关闭系统关键进程
  • 🌍 跨平台 - 支持 Windows、macOS、Linux

安装

pip install fastmcp-app-closer

或从源码安装:

git clone <repository-url>
cd fastmcp_app_closer
pip install -e .

使用方法

启动 MCP 服务器

fastmcp-app-closer

可用工具

1. close_app - 关闭应用

关闭指定名称的应用程序。

参数:

  • appName (string, required) - 应用名称或进程名

示例:

{
  "tool": "close_app",
  "arguments": {
    "appName": "微信"
  }
}

支持的匹配方式:

  • 精确匹配:WeChat.exe
  • 模糊匹配:wechatWeChat
  • 别名匹配:微信weixin

2. list_running_apps - 列出运行的应用

列出所有正在运行的应用程序。

示例:

{
  "tool": "list_running_apps"
}

支持的应用别名

应用名 别名
微信 wechat, weixin, wechat.exe
飞书 lark, feishu, lark.exe
钉钉 dingtalk, dingtalk.exe
QQ qq.exe, qqprotect.exe

安全限制

以下系统关键进程无法被关闭:

  • Windows: explorer.exe, winlogon.exe, csrss.exe, services.exe, svchost.exe
  • macOS: Finder, WindowServer, loginwindow
  • Linux: systemd, init, Xorg

开发

运行测试

pip install -e ".[dev]"
pytest

代码格式化

black src/
ruff check src/

许可证

MIT License

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

fastmcp_app_closer-0.1.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

fastmcp_app_closer-0.1.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastmcp_app_closer-0.1.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for fastmcp_app_closer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8c6738b9cb1a8089e797384dc9ec222c0994a40d4839bdda6736c6f55b85b436
MD5 41866214e190bc377e0da6cb1d402e1c
BLAKE2b-256 7b80f496c81ede5effbade50ca0a88845fe46b8adb66f2cd46c69897f440c7a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastmcp_app_closer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b94f71df69bc1d883c28fba8c1540693b795cc01f1bbb060ec397751f13a18e
MD5 c357d2f8cb4d35479cfee73ff762c752
BLAKE2b-256 97561ee2b397db8b36b99221b73db64cca9a97615cc2e90d052ad5a42f45f05e

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