DotNetSearch logo

DotNetSearch

Searches codebases, decompiles NuGet types, compresses code, and extracts text, structure, images, and links from PDFs.

Install DotNetSearch

Run the project’s own setup commands, in order.

Setup steps from the project

DotNetSearch installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    dotnet tool install -g PuneethDC.DotNetSearch
    
  2. 2. Start the server
    /usr/local/bin/DotNetSearch
    
  3. 3. Configure
    chmod +x /usr/local/bin/DotNetSearch
    

Overview

DotNetSearch exposes token-efficient codebase search, .NET NuGet decompilation, code compression, and PDF inspection through MCP. It runs locally over stdio and can be installed as a global .NET tool, a self-contained executable, or launched with dnx. Reach for it when an agent needs targeted repository context, third-party C# type definitions, or structured and visual information from technical PDFs without loading entire files.

Use cases

  • Search a local repository for symbols, text, or natural-language concepts
  • Trace related implementations and callers from a known code location
  • Inspect C# APIs from referenced NuGet assemblies without source code
  • Extract targeted text, structure, and visuals from technical PDFs
  • Compress source before sending large code files to an agent

Key features

  • BM25 code search with CamelCase and snake_case expansion
  • Structural related-code search
  • NuGet assembly type decompilation
  • Whitespace-based code compression
  • Page-aware PDF text and metadata extraction
  • PDF images, links, bookmarks, forms, and attachment handling

Tools13

What DotNetSearch lets your agent do. Expand a tool for its parameters.

Self-reported~615 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

12/12 checks healthy over the last 45d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit1mo agoMost recent push to the default branch.
Tools exposed13Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How DotNetSearch works

What DotNetSearch does

DotNetSearch gives MCP-compatible agents focused tools for navigating local source trees, inspecting referenced .NET libraries, reducing code whitespace, and examining PDF documents. Its search workflow is designed to return matching lines rather than whole files, helping agents gather relevant context with fewer tokens. A related-code search can then expand from a known location to structurally similar chunks, callers, implementations, or recurring patterns.

The PDF functions cover both text and document structure. Agents can inspect metadata and page geometry, read selected page ranges, retrieve bookmarks and form fields, extract links and embedded attachments, or render pages and save embedded raster images for documents where text alone is insufficient.

How it works

The server communicates through MCP over standard input and output. A client starts the dotnetsearch command or a downloaded platform executable, then exposes the tools to an agent. Search accepts a local directory and a keyword or natural-language query; BM25 ranking and token expansion for CamelCase and snake_case identifiers help match common code naming patterns.

A typical repository workflow starts with search, follows with search_related or read_file, and uses optional line ranges when only part of a file is needed. For PDFs, get_pdf_info can be used before targeted extraction to inspect page counts, metadata, dimensions, and structure. render_pdf_page_as_image and extract_pdf_images write image output to disk.

Setup and configuration

Install the global .NET tool with:

bash
dotnet tool install -g PuneethDC.DotNetSearch

The resulting dotnetsearch command can be registered as an MCP stdio server:

config.json
{
  "servers": {
    "DotNetSearch": {
      "type": "stdio",
      "command": "dotnetsearch"
    }
  }
}

The project also publishes self-contained executables for Windows x64, Linux x64, and macOS ARM64, so a .NET installation is not required for those downloads. On Linux and macOS, the downloaded file must be made executable. An on-demand dnx configuration is another available installation path. The README gives configuration locations and examples for Claude Desktop, Cursor, Visual Studio, and VS Code with Copilot.

Tools and capabilities

  • search finds matching files and lines using keyword or natural-language queries.
  • search_related locates structurally similar code around a file position.
  • read_file returns a complete text file or a selected line range.
  • decompile_type reconstructs a C# class, interface, enum, struct, or delegate from a referenced NuGet assembly.
  • compress_code removes blank lines and reduces indentation, with configurable indentation support.
  • read_pdf_text extracts formatted PDF text with page markers and page-range support.
  • get_pdf_info reports PDF metadata, page count, dimensions, and layout details.
  • PDF tools also retrieve bookmarks, form fields, hyperlinks, attachments, and embedded images, or render individual pages as PNG files.

Limitations and notes

Code search and file reading operate on local paths. NuGet decompilation applies to assemblies referenced by a .NET project. Code compression changes whitespace rather than program semantics for the supported brace-scoped and keyword-scoped languages, but its output is intended to reduce context size rather than replace normally formatted source. Visual PDF inspection may require rendering a page or extracting its images when text extraction cannot represent diagrams, tables, or scanned content.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about DotNetSearch

DotNetSearch is an MCP server that connects AI agents to local code directories, referenced NuGet assemblies, and PDF files. Its main tools search and relate code, read files, decompile .NET types, compress code, extract PDF text and metadata, and inspect PDF images, bookmarks, forms, links, and attachments.

Install it with the global .NET tool command `dotnet tool install -g PuneethDC.DotNetSearch`. You can also download a self-contained executable for Windows x64, Linux x64, or macOS ARM64, or configure `dnx` to run it on demand.

Add a `DotNetSearch` entry with `type` set to `stdio` and `command` set to `dotnetsearch` in the client’s MCP configuration. If you downloaded an executable, use its absolute path as the command instead.

Yes. Use `render_pdf_page_as_image` to save a high-resolution PNG of a page, or `extract_pdf_images` to save embedded raster images. These tools complement `read_pdf_text` when diagrams, tables, or scans are not represented adequately as extracted text.

Call `decompile_type` for a class, interface, enum, struct, or delegate from an assembly referenced by a .NET project. It returns the corresponding C# definition, which helps inspect third-party APIs when source code is unavailable.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDotNetSearch AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/dotnetsearch?style=directory)](https://allmcps.com/mcp/dotnetsearch)
HTML Embed
<a href="https://allmcps.com/mcp/dotnetsearch"><img src="https://allmcps.com/api/badge/dotnetsearch?style=directory" alt="DotNetSearch on AllMCPs" /></a>