KS

kooshi/sharptoolsmcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

229 stars 37 forks 质量 62 趋势 22MIT

kooshi/sharptoolsmcp 是从 https://github.com/kooshi/sharptoolsmcp. 导入的 MCP 服务器候选服务器。

概览

kooshi/sharptoolsmcp 是从 https://github.com/kooshi/sharptoolsmcp. 导入的 MCP 服务器候选服务器。

概述(AI 翻译)

SharpTools 是一个强大的服务,旨在赋能 AI 代理理解、分析和修改 C# 代码库的高级能力。它利用 .NET 编译器平台(Roslyn)提供深度静态分析和精确代码操作,远超简单的文本操作。

SharpTools 旨在为 AI 提供与人类开发者相同的洞察和工具,从而实现更智能、更可靠的代码辅助。它实际上是一个简单的集成开发环境(IDE),专为 AI 用户设计。

由于套件的全面性,几乎可以完全独立使用来编辑现有的C#解决方案。如果你使用SSE服务器并端口转发路由器,我认为甚至可以让Claude的网页聊天界面连接到它,让它作为完整的编码助手。

提示

附带的身份提示词是我个人的C#编程助手提示,与该套件搭配使用效果很好。你可以直接使用它,修改以符合你的偏好,或者完全省略它。

在 VS Code 中,设置为你的 copilot-instructions.md 以保证每次交互都包含它。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

SharpTools: Roslyn Powered C# Analysis & Modification MCP Server

SharpTools is a robust service designed to empower AI agents with advanced capabilities for understanding, analyzing, and modifying C# codebases. It leverages the .NET Compiler Platform (Roslyn) to provide deep static analysis and precise code manipulation, going far beyond simple text-based operations.

SharpTools is designed to give AI the same insights and tools a human developer relies on, leading to more intelligent and reliable code assistance. It is effectively a simple IDE, made for an AI user.

Due to the comprehensive nature of the suite, it can almost be used completely standalone for editing existing C# solutions. If you use the SSE server and port forward your router, I think it’s even possible to have Claude’s web chat ui connect to this and have it act as a full coding assistant.

Prompts

The included Identity Prompt is my personal C# coding assistant prompt, and it works well in combination with this suite. You’re welcome to use it as is, modify it to match your preferences, or omit it entirely.

In VS Code, set it as your copilot-instructions.md to have it included in every interaction.

The Tool Use Prompt is fomulated specifically for Github Copilot’s Agent mode. It overrides specific sections within the Copilot Agent System Prompt so that it avoids the built in tools.

It is available as an MCP prompt as well, so within Copilot, you just need to type /mcp, and it should show up as an option.

Something similar will be necessary for other coding assistants to prevent them from using their own default editing tools.

I recommend crafting custom tool use prompts for each agent you use this with, based on their individual system prompts.

Note

This is a personal project, slapped together over a few weeks, and built in no small part by its own tools. It generally works well as it is, but the code is still fairly ugly, and some of the features are still quirky (like removing newlines before and after overwritten members).

I intend to maintain and improve it for as long as I am using it, and I welcome feedback and contributions as a part of that.

Features

  • Dynamic Project Structure Mapping: Generates a “map” of the solution, detailing namespaces and types, with complexity-adjusted resolution.
  • Contextual Navigation Aids: Provides simplified call graphs and dependency trees for local code understanding.
  • Token Efficient Operation Designed to provide only the highest signal context at every step to keep your agent on track longer without being overwhelmed or requiring summarization.
    • All indentation is omitted in returned code, saving roughly 10% of tokens without affecting performance on the smartest models.
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →