プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

SharpLens

作者:pzalutski-pixelバージョン 1.5.3i★ –iパソコンで動く
レジストリ名io.github.pzalutski-pixel/sharplens

インストール

概要

作者による説明(英語の原文)

67 semantic C#/.NET analysis tools via Roslyn: navigation, refactoring, codegen, audit.

PopNx MCPの3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: その他

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • 自分で入力するもの: DOTNET_SOLUTION_PATH, ROSLYN_LOG_LEVEL, ROSLYN_TIMEOUT_SECONDS

必要なもの

  • npmNode.jsのインストール(npxコマンドに必要)

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます

{
  "mcpServers": {
    "sharplens": {
      "command": "npx",
      "args": [
        "-y",
        "sharplens-mcp"
      ],
      "env": {
        "DOTNET_SOLUTION_PATH": "your-value",
        "ROSLYN_LOG_LEVEL": "your-value",
        "ROSLYN_TIMEOUT_SECONDS": "your-value"
      }
    }
  }
}

ターミナルでこれを実行します

claude mcp add sharplens --env DOTNET_SOLUTION_PATH=your-value --env ROSLYN_LOG_LEVEL=your-value --env ROSLYN_TIMEOUT_SECONDS=your-value -- npx -y sharplens-mcp

動かす前に、空欄の値を入力してください。

Cursorで開く

または、設定を自分でコピーする

プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます

{
  "mcpServers": {
    "sharplens": {
      "command": "npx",
      "args": [
        "-y",
        "sharplens-mcp"
      ],
      "env": {
        "DOTNET_SOLUTION_PATH": "your-value",
        "ROSLYN_LOG_LEVEL": "your-value",
        "ROSLYN_TIMEOUT_SECONDS": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

VS Codeで開く

または、設定を自分でコピーする

プロジェクトの .vscode/mcp.json に貼り付けます

{
  "servers": {
    "sharplens": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "sharplens-mcp"
      ],
      "env": {
        "DOTNET_SOLUTION_PATH": "your-value",
        "ROSLYN_LOG_LEVEL": "your-value",
        "ROSLYN_TIMEOUT_SECONDS": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

自分で入力する値

  • DOTNET_SOLUTION_PATH env
    Path to .sln or .slnx file to auto-load on startup
  • ROSLYN_LOG_LEVEL env
    Logging verbosity: Trace, Debug, Information, Warning, Error
  • ROSLYN_TIMEOUT_SECONDS env
    Timeout for long-running operations

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月9日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント pzalutski-pixel で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

その他のほかのサーバーとの比較i

  • このカテゴリのほかの18725件のうち0%よりスターが多い
  • このカテゴリのほかの18725件のうち8%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの18725件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

SharpLensは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(1.5.3)がレジストリに届いたのは6 か月前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.js, .NETも必要です。

代わりに使えるものは?

同じカテゴリには:Spec Driven Development, Remote Desktop Commander, WCS Points

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Spec Driven Development

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

作者:formulahendry初期↓ 66/週★ 44014 か月前更新

パソコンで動く

Remote Desktop Commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

作者:desktop-commander成長中★ 2114 日前更新

クラウドで動く✓ desktopcommander.app

WCS Points

West Coast Swing WSDC points registry: dancer points, divisions, level-ups, event results and rules.

作者:akarakotov初期今日更新

クラウドで動く✓ wcspoints.com

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

SharpLensMcp

A Model Context Protocol (MCP) server providing 92 AI-optimized tools for .NET/C# semantic code analysis, navigation, refactoring, and code generation using Microsoft Roslyn.

Built for AI coding agents - provides compiler-accurate code understanding that AI cannot infer from reading source files alone.

Installation

Via NuGet (Recommended)
dotnet tool install -g SharpLensMcp

Then run with:

sharplens
Via npm
npx -y sharplens-mcp
Build from Source
dotnet build -c Release

dotnet publish -c Release -o ./publish

Claude Code Setup

  1. Install the tool (pick one):
dotnet tool install -g SharpLensMcp

or

npx -y sharplens-mcp

  1. Create `.mcp.json` in your project root:
{

"mcpServers": { "sharplens": { "type": "stdio", "command": "npx", "args": ["-y", "sharplens-mcp"], "env": { "DOTNET_SOLUTION_PATH": "/path/to/your/Solution.sln (or .slnx)" } } } }

  1. Restart Claude Code to load the MCP server
  1. Verify by asking Claude to run a health check on the Roslyn server
Why Use This with Claude Code?

Claude Code has native LSP support for basic navigation (go-to-definition, find references). SharpLensMcp adds deep semantic analysis:

CapabilityNative LSPSharpLensMcp
Go to definition✅✅
Find references✅✅
Find async methods missing CancellationToken❌✅
Impact analysis (what breaks?)❌✅
Dead code detection❌✅
Complexity metrics❌✅
Safe refactoring with preview❌✅
Batch operations❌✅

Configuration

Environment VariableDescriptionDefault
DOTNET_SOLUTION_PATHPath to a .sln, .slnx or .slnf file (or a directory holding exactly one) to auto-load on startup; the load runs beside the request loop, so initialize answers immediatelyNone (must call load_solution)
SHARPLENS_ABSOLUTE_PATHSUse absolute paths instead of relativefalse (relative paths save tokens)
SHARPLENS_LOG_LEVELLogging verbosity: Trace, Debug, Information, Warning, ErrorInformation
SHARPLENS_TIMEOUT_SECONDSTimeout for long-running operations30
SHARPLENS_MAX_DIAGNOSTICSMaximum diagnostics to return100
SHARPLENS_ENABLE_SEMANTIC_CACHECache the file-path to document lookuptrue (set to false to disable)

The pre-1.6.0 ROSLYN_* spellings of these variables are still read as a fallback; the SHARPLENS_* spelling wins when both are set. Boolean values are case-insensitive. A number that does not parse or is below its minimum falls back to the default, and one above its maximum is capped; each case logs a warning to stderr.

Multi-targeted projects

A project built for several target frameworks is one project to every tool: each result is reported once, with a targetFrameworks list where it exists only under some frameworks. projectName accepts the plain name (MyLib) for all frameworks, or a framework-qualified name (MyLib(net8.0)) for one.

If DOTNET_SOLUTION_PATH is not set, you must call the load_solution tool before using other tools.

Migrating from 1.5.x tool names

Tool names no longer carry the roslyn: prefix — the colon violates the MCP tool-name pattern (^[a-zA-Z0-9_-]{1,64}$), which some clients enforce. Every tool keeps its name minus the prefix:

1.5.x name1.6.0 name
roslyn:load_solutionload_solution
roslyn:get_diagnosticsget_diagnostics
roslyn:rename_symbolrename_symbol
...same rule for all tools...drop the roslyn: prefix

tools/list publishes only the new names. Calls using the old prefixed names are still accepted as aliases for one release and will be removed in the following one.

AI Agent Configuration Tips

AI models may have trained bias toward using their native tools (Grep, Read, LSP) instead of MCP server tools, even when SharpLensMcp provides better capabilities.

To ensure optimal tool usage:

  1. Claude Code: Add to your project's CLAUDE.md:
   For C# code analysis, prefer SharpLensMcp tools over native tools:
  • Use search_symbols instead of Grep for finding symbols
  • Use get_method_source instead of Read for viewing methods
  • Use find_references for semantic (not text) references
  1. Other MCP clients: Configure tool priority in your agent's system prompt

The semantic analysis from Roslyn is more accurate than text-based search, especially for overloaded methods, partial classes, and inheritance hierarchies.

Agent Responsibility: Document Synchronization

Important: SharpLensMcp maintains an in-memory representation of your solution for fast queries. When files are modified externally (via Edit/Write tools), the agent is responsible for synchronizing changes.

When to call sync_documents:
ActionCall sync_documents?
Used Edit tool to modify .cs files✅ Yes
Used Write tool to create new .cs files✅ Yes
Deleted .cs files✅ Yes
Used SharpLensMcp refactoring tools (rename, extract, etc.)❌ No (auto-updated)
Modified .csproj files❌ No (use load_solution instead)
Usage:
# After editing specific files

sync_documents(filePaths: ["src/MyClass.cs", "src/MyService.cs"])

After bulk changes - sync all documents

sync_documents()

A full sync also picks up new .cs files the project's compile items include. SharpLensMcp's apply tools write only the files an edit changes, keep each file's encoding and line endings, and refuse with STALE_DOCUMENT when a target file changed on disk since it was read — run sync_documents, then retry. They also refuse with UNSUPPORTED_ENCODING to write a file whose bytes its encoding cannot reproduce (a BOM-less file that is not valid UTF-8 on a system whose fallback code page is UTF-8, such as Linux); save it as UTF-8 first.

Why this design?

This mirrors how LSP (Language Server Protocol) works - the client (editor) notifies the server of changes. This approach:

  • Eliminates race conditions (agent controls timing)
  • Avoids file watcher complexity and platform quirks
  • Is faster than full solution reload
  • Gives agents explicit control over workspace state

If you don't sync: Queries may return stale data (old method signatures, missing new files, etc.)

Features

  • 92 Semantic Analysis Tools - Navigation, refactoring, code generation, diagnostics, discovery, audit/quality
  • AI-Optimized Descriptions - Clear USAGE/OUTPUT/WORKFLOW patterns
  • Structured Responses - Consistent success/error/data format with suggestedNextTools
  • Zero-Based Coordinates - Clear warnings to prevent off-by-one errors
  • Preview Mode - Safe refactoring with preview before apply
  • Batch Operations - Multiple lookups in one call to reduce context usage

Tool Categories

Navigation & Discovery (24 tools)
ToolDescription
get_symbol_infoSemantic info at position
go_to_definitionJump to symbol definition
find_referencesAll references; each classified read/write/invocation/cast/typeof/nameof/attribute; optional kind filter
find_implementationsInterface/abstract implementations
find_callersImpact analysis - who calls this?
get_call_graphMulti-hop callers/callees graph with depth bound + cycle detection
find_path_betweenReachability + the connecting call path(s) between two methods; follows dispatch, with barriers and a checkpoint
get_type_hierarchyInheritance chain
search_symbolsGlob pattern search (*Handler, Get*)
semantic_queryMulti-filter search (async, public, etc.)
get_type_membersAll members by type name
get_type_members_batchMultiple types in one call
get_method_signatureDetailed signature by name
get_derived_typesFind all subclasses
get_base_typesFull inheritance chain
get_attributesList attributes on a symbol
get_containing_memberEnclosing symbol at position
get_method_overloadsAll overloads of a method
find_attribute_usagesFind types/members by attribute
get_external_type_infoInspect NuGet/BCL/external assembly types — members + XML docs
resolve_stack_traceMap a pasted stack trace to file/line/symbol, mangling undone
get_extension_methodsExtensions applying to a type — classic and C# 14 blocks
get_documentationFull XML docs for a symbol with expanded
get_super_methodNavigate to the base member / interface members a member implements
Analysis (17 tools)
ToolDescription
get_diagnosticsCompiler errors/warnings + configured analyzer findings (StyleCop, Roslynator, NetAnalyzers); matches CI
diff_api_surfacePublic-API breaking-change report vs a git ref
get_exception_flowWhich exceptions can escape a method, and where they're caught
find_similar_codeStructural similarity search (token-shingle fingerprints)
remove_unused_codeCompute dead-code removals + newly unused usings (generation-only)
find_dead_branchesUnreachable basic blocks per method (real CFG, not heuristics)
add_missing_importsCompute the usings that fix CS0246/CS0103 (generation-only)
analyze_data_flowVariable assignments and usage
analyze_control_flowBranching/reachability
analyze_change_impactWhat breaks if changed?
check_type_compatibilityCan A assign to B?
get_outgoing_callsWhat does this method call?
find_unused_codeDead code detection
validate_codeCompile check without writing
get_complexity_metricsCyclomatic, nesting, LOC, cognitive
find_circular_dependenciesProject and namespace cycle detection
get_missing_membersUnimplemented interface/abstract members
Refactoring (16 tools)
ToolDescription
rename_symbolSafe rename across solution
change_signatureAdd/remove/reorder parameters
extract_methodExtract with data flow analysis
extract_interfaceGenerate interface from class
generate_constructorFrom fields/properties
move_type_to_fileCompute the contents to move a type into its own file (generation-only)
split_typeCompute a partial-class split for selected members (generation-only)
organize_usingsSort and remove unused
organize_usings_batchBatch organize multiple files
format_document_batchBatch format files in project
get_code_actions_at_positionAll Roslyn refactorings at position
apply_code_action_by_titleApply any refactoring by title
implement_missing_membersGenerate interface stubs
encapsulate_fieldField to property
inline_variableInline temp variable
extract_variableExtract expression to variable
Code Generation (3 tools)
ToolDescription
add_null_checksGenerate ArgumentNullException guards
generate_equality_membersEquals/GetHashCode/operators
generate_test_stubCompilable test skeleton for a method (framework auto-detected)
Compound Tools (7 tools)
ToolDescription
get_type_overviewFull type info in one call

| analyze_method | Signature + callers + outgoing calls

冒頭だけを表示しています。続きはリポジトリで読めます

PopNxに聞く