Skip to content

Repository files navigation

ScatGirl ci ScatGirl.Cli NuGet ScatGirl.Mcp NuGet ScatGirl.Core NuGet

ScatGirl logo

Improvising over unfamiliar codebases since 2026.

A good jazz musician doesn't need the score to know where the melody goes — they hear a phrase and follow it anywhere. ScatGirl does the same with source code: drop it a symbol name, and it riffs back with every definition, every caller, every implementation.

What it is: An MCP server for symbolic C# source code navigation. Point it at a repository, ask it where IUserService is implemented or who calls ProcessPayment — and get semantic answers, not text matches.

How it works: Roslyn's syntax APIs parse raw .cs files without requiring compilation or dotnet restore. Fast, always available, degrades gracefully.

Sister project to ScatMan: ScatMan answers "what can I call on this NuGet package?" — ScatGirl answers "how is it actually used here?" Together they cover the full loop from external API discovery to local implementation exploration.

Tools

find_declarations

Find all declarations of a named symbol across a C# codebase.

Search modes:

  • Exact (default): Finds only exact symbol matches.
  • Regex (--regex or regex: true): Interprets the symbol name as a regular expression for pattern-based search.
  • Fuzzy (--fuzzy/fuzzy: true): Enables fuzzy search for symbol names. Optionally set the maximum allowed distance with --fuzzy <n> (CLI) or maxDistance: n (MCP).

File filter:

  • In-file (--in-file <glob> or inFile: <glob>): Restricts the search to files matching the given glob pattern (e.g. **/*Service.cs).

Note: Only one search mode can be active at a time. Regex and fuzzy cannot be combined. The tool validates input and returns an error if both are set.

Examples:

Fuzzy search for a symbol name (default distance):

scatgirl find . MeatCommand --fuzzy --json

Result:

{
  "root": ".",
  "symbolName": "MeatCommand",
  "kind": null,
  "count": 1,
  "results": [
    {
      "file": "src/ScatGirl.Cli/Commands/MetaCommand.cs",
      "hits": [
        {
          "name": "MetaCommand",
          "kind": "class",
          "type": null,
          "line": 10
        }
      ]
    }
  ]
}

Regex search for all commands matching 'Me.*Command' in files ending with 'mmand.cs':

scatgirl find . "Me.*Command" --regex --in-file "**/*mmand.cs" --json

Result:

{
  "root": ".",
  "symbolName": "Me.*Command",
  "kind": null,
  "count": 2,
  "results": [
    {
      "file": "src/ScatGirl.Cli/Commands/MembersCommand.cs",
      "hits": [
        {
          "name": "MembersCommand",
          "kind": "class",
          "type": null,
          "line": 10
        }
      ]
    },
    {
      "file": "src/ScatGirl.Cli/Commands/MetaCommand.cs",
      "hits": [
        {
          "name": "MetaCommand",
          "kind": "class",
          "type": null,
          "line": 10
        }
      ]
    }
  ]
}

kind filter (optional): class interface record struct enum delegate method constructor property field event

find_references

Find all references to a named symbol across a C# codebase. Returns file, line, and the matching source line for each hit. Results are tagged [syntactic] — no compilation required, name-based matching.

Search modes:

  • Exact (default): Finds only exact symbol matches.
  • Regex (--regex or regex: true): Interprets the symbol name as a regular expression for pattern-based search.
  • Fuzzy (--fuzzy/fuzzy: true): Enables fuzzy search for symbol names. Optionally set the maximum allowed distance with --fuzzy <n> (CLI) or maxDistance: n (MCP).

Note: Only one search mode can be active at a time. Regex and fuzzy cannot be combined. The tool validates input and returns an error if both are set.

Find references to a symbol (e.g., using regex):

scatgirl refs . "RefsC.*" --regex --json

Result:

{
  "root": ".",
  "symbolName": "RefsC.*",
  "kind": null,
  "inFile": null,
  "analysis": "syntactic",
  "count": 2,
  "results": [
    {
      "file": "src/ScatGirl.Cli/Program.cs",
      "hits": [
        {
          "line": 16,
          "col": 23,
          "text": "config.AddCommand<RefsCommand>(\"refs\")",
          "kind": "type-argument"
        }
      ]
    },
    {
      "file": "src/ScatGirl.Cli/Commands/RefsCommand.cs",
      "hits": [
        {
          "line": 10,
          "col": 36,
          "text": "sealed class RefsCommand : Command<RefsCommand.Settings>",
          "kind": "identifier"
        }
      ]
    }
  ]
}

kind filter (optional): identifier typeof nameof attribute implementation invocation object-creation type-argument inFile (optional): glob pattern, e.g. **/*Service.cs

find_members

List all members declared directly in a named type — fields, properties, constructors, methods, and events. Only own members are shown (no inherited members).

Example:

scatgirl members . MembersCommand --kind field --json

Result:

{
  "root": ".",
  "typeName": "MembersCommand",
  "kind": "field",
  "inFile": null,
  "count": 1,
  "results": [
    {
      "file": "src/ScatGirl.Cli/Commands/MembersCommand.cs",
      "hits": [
        {
          "kind": "field",
          "sig": "static readonly string[] KindOrder",
          "line": 12
        }
      ]
    }
  ]
}

kind filter (optional): field property constructor method event inFile (optional): glob pattern — useful when the type name is ambiguous across namespaces

MCP Server

ScatGirl ships as an MCP stdio server — use it directly from Claude Code, Claude Desktop, or any MCP-compatible client without ever opening a terminal.

dotnet tool install --global ScatGirl.Mcp

Claude Code

claude mcp add ScatGirl --scope user -- scatgirl-mcp

--scope user is required so the server is available globally, not just within one project directory.

Claude Desktop

~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "ScatGirl": {
      "command": "scatgirl-mcp"
    }
  }
}

Available tools

Tool Description
find_declarations Find all declarations of a named symbol (rootPath, symbolName, kind?, regex?, fuzzy?, maxDistance?)
find_references Find all references to a named symbol (rootPath, symbolName, kind?, inFile?, regex?, fuzzy?, maxDistance?)
find_members List all members of a named type (rootPath, typeName, kind?, inFile?)
meta Show build and runtime metadata for ScatGirl MCP/CLI

About

MCP server for symbolic C# navigation — find declarations, references, and members without compilation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages