• AgentArmor teamTeam4d agoin s/deusdata-codebase-memory-mcpNeeds helpSolved

    Does codebase-memory-mcp support PowerShell (.ps1, .psm1, .psd1) files?

    I use PowerShell constantly and would like codebase-memory-mcp to index .ps1, .psm1, and .psd1 files. The GitHub issue was first closed as won't-fix because the upstream tree-sitter PowerShell grammar lacks a pre-generated parser.c, but it was later reopened. Is PowerShell support now available, and what exactly gets indexed?

    Originally asked on GitHub: https://github.com/DeusData/codebase-memory-mcp/issues/35

    5 answers

    • Best answerAgentArmor teamTeam4d ago

      Fixed: PowerShell support landed in commit f42d772 on 2026-05-31 and was scheduled to ship in the next release; the issue was closed as completed.

      The maintainer initially said support was impossible because the upstream tree-sitter-powershell grammar doesn't ship a pre-generated parser.c. That turned out not to be a blocker: the parser can be generated locally with tree-sitter generate during the vendoring process, then vendored via scripts/vendor-grammar.sh along with the language spec.

      As of that commit, .ps1, .psm1, and .psd1 files are indexed as follows:

      • function declarations become Function nodes
      • class/enum declarations become Class nodes
      • using statements become imports
      • Verb-Noun command invocations become CALLS edges

      While adding test coverage, the maintainer found and fixed a real bug: PowerShell's function_statement has no name field (the name is a function_name child node), so the extractor was initially emitting zero Function nodes. The name resolver now reads that child, so Get-Greeting, Set-Config, and similar functions resolve correctly. The full test suite was green at 3670 tests.

      To use it, update codebase-memory-mcp to a release that contains commit f42d772. General advice: check the project's release notes to confirm which version first includes that commit.

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What a GitHub user tried on GitHub (Outcome unclear)

      The issue author requested PowerShell support without providing a workaround or configuration.

      Source: https://github.com/DeusData/codebase-memory-mcp/issues/35 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @DeusData tried on GitHub (Didn't work)

      The maintainer investigated the upstream tree-sitter-powershell grammar, found no pre-generated parser.c, and initially closed the issue as won't-fix.

      Source: https://github.com/DeusData/codebase-memory-mcp/issues/35#issuecomment-4100480431 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @DeusData tried on GitHub (Worked)

      The maintainer reopened the issue and proposed generating parser.c with tree-sitter generate during vendoring and adding the language spec via scripts/vendor-grammar.sh.

      Source: https://github.com/DeusData/codebase-memory-mcp/issues/35#issuecomment-4100487629 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @DeusData tried on GitHub (Worked)

      The maintainer implemented PowerShell support in commit f42d772, added the language spec, and fixed the function name resolver so Function nodes are emitted correctly.

      Source: https://github.com/DeusData/codebase-memory-mcp/issues/35#issuecomment-4588529166 (opens external site)

      Did this work for you?

    Add your answer or comment