شعار HandMirrorMcp

HandMirrorMcp

مؤسسة
askmirror

MCP server for inspecting .NET assemblies and NuGet packages to help AI coding agents.

الناشرaskmirror
المستودعHandMirrorMcp
اللغةC#
التفريعات
2
النجوم
14
الأدوات المتاحة
0
نوع نقل البياناتstdio
الفئات
الروابط
  • اربط الأدوات بسير عمل الذكاء الاصطناعي

    يتيح HandMirrorMcp إمكانات MCP التي يمكن لتطبيقات الذكاء الاصطناعي العميلة ووكلاء الذكاء الاصطناعي المتوافقة استخدامها.

  • الأدوات المتاحة: 0

    تصفّح الإجراءات القابلة للاستدعاء أدناه، بما في ذلك أسماؤها وأوصافها عندما يوفّرها الخادم.

  • إعدادات جاهزة للنسخ

    استخدم أمثلة إعداد التثبيت لتهيئة هذا الخادم في تطبيق MCP العميل المفضّل لديك.

  • مؤشرات الاهتمام بالمصدر المفتوح

    النجوم: 14، والنسخ المتفرعة: 2 في المستودع المرتبط.

HandMirror MCP Server

A Model Context Protocol (MCP) server for .NET assembly and NuGet package inspection. HandMirror helps AI coding agents understand .NET APIs accurately and resolve build errors by providing direct access to assembly metadata and NuGet package information.

🎯 Purpose

AI coding assistants often hallucinate or guess API details, leading to build errors and wasted development iterations. HandMirror solves this by:

  • Providing accurate, version-specific API information directly from assemblies
  • Enabling verification of method signatures, types, and namespaces before writing code
  • Helping diagnose and fix .NET build errors quickly
  • Supporting analysis of native interop (P/Invoke, COM) dependencies

✨ Features

Assembly Inspection

  • inspect_assembly - Full analysis of all public types, members, and attributes with XML documentation
  • list_namespaces - List all namespaces in an assembly
  • get_type_info - Get detailed information about a specific type

NuGet Package Exploration

  • search_nuget_packages - Search for packages by keyword
  • get_nuget_package_info - Get package metadata and dependencies
  • get_nuget_package_versions - List all available versions
  • inspect_nuget_package - Analyze assemblies in a package
  • inspect_nuget_package_type - Get detailed type info from a package
  • list_nuget_sources - List configured NuGet package sources
  • clear_nuget_cache - Clear the local NuGet package cache
  • get_nuget_vulnerabilities - Check for known security vulnerabilities
  • inspect_nupkg_contents - Inspect contents of a .nupkg file
  • extract_nupkg_file - Extract specific files from a .nupkg

Native Interop Analysis

  • inspect_native_dependencies - Find P/Invoke (DllImport/LibraryImport) and COM types in an assembly

Project Analysis

  • analyze_csproj - Analyze .NET project files and identify issues
  • analyze_solution - Analyze solution files
  • explain_build_error - Get explanations for common build errors
  • analyze_file_based_app - Analyze file-based apps
  • analyze_config_file - Analyze configuration files
  • analyze_packages_config - Analyze packages.config files

System Information

  • get_system_info - Get system information (OS, .NET runtime, hardware)
  • get_dotnet_info - Get detailed .NET installation information

📋 Prerequisites

  • .NET 8.0 SDK or later
  • MCP-compatible client (e.g., Claude Desktop, VS Code with Copilot)

🚀 Installation

Build from Source

bash
git clone https://github.com/rkttu/HandMirrorMcp.git
cd HandMirrorMcp
dotnet build

Run the Server

bash
dotnet run --project HandMirrorMcp

⚙️ Configuration

Claude Desktop

Add the following to your Claude Desktop configuration file:

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

json
{
  "mcpServers": {
    "handmirror": {
      "command": "dotnet",
      "args": ["run", "--project", "C:\\path\\to\\HandMirrorMcp"]
    }
  }
}

Or if you've built the project:

json
{
  "mcpServers": {
    "handmirror": {
      "command": "C:\\path\\to\\HandMirrorMcp\\bin\\Debug\\net8.0\\HandMirrorMcp.exe"
    }
  }
}

VS Code with GitHub Copilot

Add to your VS Code settings or workspace settings:

json
{
  "servers": {
    "handmirror": {
      "command": "dotnet",
      "args": ["run", "--project", "/path/to/HandMirrorMcp"]
    }
  }
}

📖 Usage Examples

Verify API Before Writing Code

When you need to use an unfamiliar .NET API:

text
Use inspect_nuget_package_type to show me the HttpClient class from System.Net.Http

Diagnose Build Errors

When you encounter errors like CS0246, CS1061, or CS7036:

text
I'm getting CS1061 error. Use inspect_nuget_package to check the Newtonsoft.Json package 
and show me the available methods on JObject

Explore NuGet Packages

text
Search for packages related to "json serialization" and show me the top results

Check Package Vulnerabilities

text
Check if there are any known vulnerabilities in System.Text.Json version 6.0.0

Analyze Project Issues

text
Analyze my .csproj file at C:\MyProject\MyProject.csproj and identify any issues

🏗️ Architecture

text
HandMirrorMcp/
├── Constants/
│   └── Emoji.cs              # Unicode emoji constants for output formatting
├── Prompts/
│   ├── AssemblyInspectorPrompts.cs
│   └── NuGetInspectorPrompts.cs
├── Services/
│   ├── NuGetService.cs       # NuGet package operations
│   ├── PeAnalyzerService.cs  # PE file analysis
│   ├── RepositoryService.cs  # Repository operations
│   └── XmlDocService.cs      # XML documentation parsing
├── Tools/
│   ├── AssemblyInspectorTool.cs
│   ├── InteropInspectorTool.cs
│   ├── NuGetInspectorTool.cs
│   ├── ProjectAnalyzerTool.cs
│   └── SystemInfoTool.cs
└── Program.cs

🧪 Testing

Run the test suite:

bash
dotnet test

The tests use MSTest and connect to the actual MCP server for integration testing.

📦 Dependencies

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

🙏 Acknowledgments

💖 Support This Project

If you find HandMirror helpful in your development workflow, please consider supporting the project!

Your sponsorship helps maintain and improve this project, add new features, and keep it free for everyone. Every contribution, no matter how small, is greatly appreciated! ⭐


HandMirror - Look before you code 🪞

استخدم MCP الخاص بـ HandMirrorMcp مع نماذج ذكاء اصطناعي متعددة

يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا بمجرد توصيل HandMirrorMcp، يمكنك استخدامه مع نماذج ذكاء اصطناعي مختلفة في TypingMind بدلًا من إعداده لكل نموذج على حدة. يعمل تكامل MCP هذا محليًا عبر موصل MCP الخاص بـ TypingMind على جهازك.

دليل الإعداد لاستخدام الموصل المحلي

استخدم هذا الخيار عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات أو موارد خاصة على جهاز الكمبيوتر لديك.

1

فتح إعدادات MCP

في TypingMind، انتقل إلى «الإعدادات»، ثم «الإعدادات المتقدمة»، ثم «بروتوكول سياق النموذج»، واختر «إعداد الموصل».

  1. افتح TypingMind في متصفحك.
  2. انقر على أيقونة الإعدادات.
  3. انتقل إلى الإعدادات المتقدمة.
  4. افتح قسم بروتوكول سياق النموذج.
  5. انقر على «إعداد الموصل» واختر «هذا الجهاز».
شاشة إعداد موصل MCP في TypingMind مع تحديد «هذا الجهاز»
2

تنفيذ أمر الموصل

اختر «هذا الجهاز»، وانسخ الأمر من TypingMind وشغّله في Terminal. أبقِ العملية قيد التشغيل أثناء استخدام MCP.

  1. انسخ أمر الإعداد الذي يعرضه TypingMind.
  2. افتح Terminal على macOS أو Windows Terminal على Windows.
  3. الصق الأمر ونفّذه.
  4. وافق على تثبيت الحزمة إذا طلب منك Terminal تأكيد المتابعة.
  5. أبقِ نافذة Terminal والعملية التي تعمل فيها قيد التشغيل أثناء استخدام أدوات MCP.
3

أضف HandMirrorMcp كخادم

عندما تظهر حالة الموصل «جاهز»، انقر على «تعديل الخوادم» والصق إعدادات خادم MCP.

  1. انتظر حتى تظهر حالة الموصل «جاهز».
  2. انقر على «تعديل الخوادم».
  3. الصق إعدادات خادم MCP الخاص بـ HandMirrorMcp.
  4. احفظ قائمة الخوادم.
  5. حدّث الحالة إذا أردت التأكد من أن الموصل لا يزال جاهزًا.
إعدادات MCP في TypingMind تعرض خادمًا نشطًا وزر «تعديل الخوادم»
{
  "mcpServers": {
    "handmirrormcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

استخدام الاتصال مع نماذج مختلفة

احفظ قائمة الخوادم، وافتح «الإضافات»، وفعّل أدوات MCP الخاصة بـ HandMirrorMcp، ثم اختر أي نموذج ذكاء اصطناعي مدعوم في TypingMind واستخدم الأدوات في المحادثة أو أسندها إلى وكيل ذكاء اصطناعي.

  1. افتح صفحة الإضافات في TypingMind.
  2. فعّل أدوات MCP الخاصة بـ HandMirrorMcp.
  3. ابدأ محادثة واختر نموذج الذكاء الاصطناعي الذي تريد استخدامه.
  4. استخدم أدوات MCP في المحادثة أو عيّنها لوكيل ذكاء اصطناعي.
  5. انتقل إلى نموذج ذكاء اصطناعي آخر عند الحاجة دون إعادة الاتصال بـ MCP.
محادثة في TypingMind تستخدم أدوات MCP المفعّلة مع نموذج ذكاء اصطناعي محدّد
هل يمكنك استخدام HandMirrorMcp لمساعدتي في هذه المهمة؟
HandMirrorMcp
بالتأكيد. قرأته.
إليك ما وجدته باستخدام HandMirrorMcp.

الأسئلة الشائعة

ما استخدامات خادم MCP HandMirrorMcp؟

HandMirrorMcp هو خادم MCP يتيح لتطبيقات الذكاء الاصطناعي المتوافقة الاتصال بأدوات ومصادر سياق خارجية. في TypingMind، يمكنك إضافة خادم MCP هذا مرة واحدة وإتاحة أدواته في مساحة عملك للذكاء الاصطناعي.

هل يمكنني استخدام خادم MCP HandMirrorMcp مع نماذج ذكاء اصطناعي متعددة في TypingMind؟

نعم. يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا يمكنك استخدام HandMirrorMcp مع نماذج ذكاء اصطناعي مختلفة مثل Claude أو ChatGPT أو Gemini أو غيرها من النماذج التي أعددتها في TypingMind، دون إعداد خادم MCP لكل نموذج على حدة.

لماذا تستخدم موصل MCP HandMirrorMcp مع TypingMind؟

يُعد TypingMind من أفضل واجهات المحادثة مع النماذج اللغوية الكبيرة، إذ يجمع نماذج ذكاء اصطناعي متعددة ومطالبات وإضافات ووكلاء ذكاء اصطناعي ومفاتيح API وأدوات MCP في مساحة عمل واحدة. بعد توصيل HandMirrorMcp، يمكنك استخدام أدوات MCP الخاصة به عبر نماذجك المفضلة مع الحفاظ على سير عمل محادثاتك منظمًا في TypingMind.

كيف أوصّل خادم MCP HandMirrorMcp بـ TypingMind؟

يعمل HandMirrorMcp عبر موصل MCP المحلي في TypingMind. هذا هو الخيار الأنسب عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات سطح المكتب أو أدوات سطر الأوامر أو موارد خاصة على حاسوبك.

ما الأدوات التي يوفّرها خادم MCP HandMirrorMcp في TypingMind؟

يتيح HandMirrorMcp إمكانات MCP يمكنك تفعيلها من صفحة الإضافات في TypingMind واستخدامها في المحادثات أو تعيينها لوكلاء ذكاء اصطناعي.

هل أحتاج إلى مشاركة مفاتيح API الخاصة بي مع TypingMind لاستخدام خادم MCP HandMirrorMcp؟

لا. يعطي TypingMind الأولوية للعمل المحلي ويُبقي مزوّدي النماذج ومفاتيح API والمطالبات وإعدادات MCP تحت تحكمك. إذا كان HandMirrorMcp يتطلب مصادقة، فأضف الترويسات أو إعدادات OAuth أو الإعدادات المحلية المطلوبة لخادم MCP هذا عند إنشاء الاتصال.

خوادم MCP ذات صلة

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇