Talk to Your PC MCP Server

Talk to Your PC MCP Server

Enables AI assistants to diagnose, troubleshoot, and manage PC settings on Windows, macOS, and Linux through natural language commands.

Category
访问服务器

README

Talk to Your PC MCP Server

A Model Context Protocol (MCP) server that does diagnosis and troubleshooting of your PC through AI assistants like Claude, ChatGPT, or any MCP-compatible tool.

Features

  • System Diagnosis: Automatically diagnose computer issues and performance problems
  • PC Settings Management: Check volume, WiFi networks, battery status, system information, and more
  • Safe Troubleshooting: Execute system repair commands with built-in safety checks
  • Cross-Platform Support: Works on Windows (PowerShell), macOS, and Linux (bash)
  • Multiple LLM Support: Compatible with OpenAI, Claude/Anthropic, and Azure OpenAI
  • Security-First: Built-in command validation and dangerous operation blocking

Tools

run_diagnosis

Run system diagnosis to identify probable issues with your computer.

Example usage:

  • "Why is my computer running slow?"
  • "Check my network connectivity"
  • "Diagnose memory usage problems"

get_pc_settings

Get PC settings and system information like volume, WiFi, battery, etc.

Example usage:

  • "What WiFi network am I connected to?"
  • "Show me my battery percentage"
  • "What's my current IP address?"
  • "Check my disk space"

execute_troubleshooting

Execute troubleshooting commands to fix system issues safely.

Example usage:

  • "Fix my DNS issues"
  • "Reset my network adapter"
  • "Clear system cache"
  • "Restart audio services"

Installation

Method 1: PyPI (Recommended)

pip install talk-to-pc-mcp

Method 2: From Source

git clone https://github.com/Irene-123/talk-to-your-pc-mcp-server.git
cd talk-to-your-pc-mcp-server
pip install -e .

Configuration

LLM API Setup

Set up your preferred LLM provider by setting the appropriate environment variables:

OpenAI

export OPENAI_API_KEY="sk-..."
export OPENAI_MODEL="gpt-4"  # optional, defaults to gpt-3.5-turbo

Claude/Anthropic

export ANTHROPIC_API_KEY="sk-ant-..."
export ANTHROPIC_MODEL="claude-3-haiku-20240307"  # optional

Azure OpenAI

export AZURE_OPENAI_API_KEY="your-key"
export AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/"
export AZURE_OPENAI_DEPLOYMENT_NAME="gpt-35-turbo"
export AZURE_OPENAI_API_VERSION="2024-02-15-preview"  # optional

Claude Desktop Integration

Add to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "talk-to-pc": {
      "command": "talk-to-your-pc-mcp-server",
      "env": {
        "ANTHROPIC_API_KEY": "your-api-key-here"
      }
    }
  }
}

VS Code Integration

For VS Code with GitHub Copilot, add to your VS Code settings or MCP configuration:

{
  "mcp.servers": {
    "talk-to-pc": {
      "command": "talk-to-your-pc-mcp-server"
    }
  }
}

Usage Examples

Once configured, you can interact with your PC using natural language through your AI assistant:

System Diagnosis

  • "My computer is running slowly, can you diagnose the issue?"
  • "Check why my internet connection is unstable"
  • "Analyze my system performance"

PC Settings

  • "What WiFi networks are available?"
  • "Show me my current system specs"
  • "What's my battery level?"
  • "Check my audio volume settings"

Troubleshooting

  • "My WiFi isn't working, please fix it"
  • "Clear my DNS cache"
  • "Restart my audio services"
  • "Fix network connectivity issues"

Security Features

  • Command Validation: All commands are validated before execution
  • Dangerous Command Blocking: Prevents execution of potentially harmful commands like rm -rf, format, del /f
  • Timeout Protection: Commands are automatically terminated after 15 seconds
  • Cross-Platform Safety: OS-specific safety checks for Windows, macOS, and Linux
  • User Transparency: All executed commands and outputs are shown to users for verification

Platform-Specific Behavior

Windows

  • Uses PowerShell for command execution
  • Supports Windows-specific diagnostics (Event Viewer, WMI, etc.)
  • Network management via netsh commands

macOS/Linux

  • Uses bash for command execution
  • Supports Unix-style system tools (ps, netstat, iwconfig, etc.)
  • Package manager integration where appropriate

Development

Running from Source

# Clone the repository
git clone https://github.com/Irene-123/talk-to-your-pc-mcp-server.git
cd talk-to-your-pc-mcp-server

# Install dependencies
pip install -r requirements.txt

# Set your API key
export ANTHROPIC_API_KEY="your-key-here"

# Run the server
python server.py

Testing

# Test with MCP Inspector
npx @modelcontextprotocol/inspector python server.py

# Or test individual functions
python -c "
import asyncio
from server import get_pc_settings
result = asyncio.run(get_pc_settings('check WiFi status'))
print(result)
"

Troubleshooting

Common Issues

  1. Import Errors: Make sure all dependencies are installed with pip install -r requirements.txt
  2. LLM API Errors: Verify your API keys are set correctly and have sufficient credits
  3. Permission Errors: Some system commands may require elevated privileges
  4. Command Timeouts: Long-running diagnostics are automatically terminated after 15 seconds for safety

Debug Logging

Enable debug logging to troubleshoot issues:

export LOG_LEVEL=DEBUG
python server.py

Logs are written to ~/mcp_server.log for persistent debugging.

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes and test thoroughly
  4. Ensure all security checks pass
  5. Submit a pull request

Please ensure any new commands or features maintain the security-first approach and include appropriate safety checks.

License

GNU License - see LICENSE file for details.

Support

Changelog

v0.1.1

  • Initial release
  • Cross-platform system diagnosis, settings retrieval, and troubleshooting
  • Support for OpenAI, Claude, and Azure OpenAI
  • Built-in security features and command validation
  • Claude Desktop and VS Code integration

Note: This MCP server executes system commands on your local machine. While comprehensive safety measures are in place, always review the commands being executed and ensure you trust the AI assistant you're using with system-level access.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选