# DotNetSearch [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/puneethdc99/DotNetSearch  
**GitHub Stars:** 0  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/dotnetsearch

## Description
Token-efficient MCP server for codebase search, NuGet decompilation, and deep PDF reading.

## Tools
Capabilities this server exposes over MCP:

- **search** — Searches a local directory for files whose content matches a keyword or natural-language query. Uses BM25 ranking with CamelCase and snake_case token expansion.
- **search_related** — Finds code chunks structurally similar to a specific location in a file. Use after `search` to explore related implementations, callers, or patterns.
- **read_file** — Reads a text file from disk and returns its contents. Use it after `search` when you already know the target file and need the full context. Supports an absolute or relative path plus optional `start_line` and `end_line` range arguments.
- **read_pdf_text** — Extracts clean, formatted text from a PDF file with page markers. Ideal for documentation, technical specifications, papers, and architecture guides. Supports whole-document extraction or targeted page ranges.
- **get_pdf_info** — Retrieves comprehensive metadata and physical layout information about a PDF file without reading its full text content. Use this first to plan targeted extractions.
- **render_pdf_page_as_image** — Rasterizes a specific PDF page into a high-resolution PNG image on disk. Essential for pages with complex graphical diagrams, architectural flowcharts, schematics, tables, or scanned documents where raw text extraction is insufficient.
- **extract_pdf_images** — Extracts all embedded raster images (e.g., photos, diagrams, embedded JPEGs/PNGs) from a PDF page and saves them directly to disk.
- **get_pdf_bookmarks** — Extracts the hierarchical bookmark outline (Table of Contents tree) from a PDF. Helps agents understand the complete document structure before requesting specific chapters or pages.
- **get_pdf_form_fields** — Reads all interactive AcroForm form fields embedded in a PDF document.
- **extract_pdf_attachments** — Extracts files embedded directly inside the PDF catalog (e.g., attached source code, sample data, schemas, or companion files) and writes them to disk.
- **get_pdf_hyperlinks** — Extracts all hyperlinks and clickable annotations present on PDF pages.
- **decompile_type** — Decompiles a .NET type (class, interface, enum, struct, or delegate) from NuGet package assemblies referenced by a .NET project. Useful when you need to understand third-party APIs without source code.
- **compress_code** — Reduces code indentation from 4-space (or configurable) to 1-space per indent level and removes blank lines. Saves 10–20% tokens with zero semantic change — safe because brace-scoped and keyword-scoped languages treat indentation as cosmetic. Accepts either an absolute file path or a raw code strin…

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/puneethdc99/DotNetSearch), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
dotnet tool install -g PuneethDC.DotNetSearch
```

2. Start the server:

```sh
/usr/local/bin/DotNetSearch
```

3. Configure:

```sh
chmod +x /usr/local/bin/DotNetSearch
```

## Documentation

## 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:

```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.

_Full upstream README: https://allmcps.com/mcp/dotnetsearch/readme_

