MCP Server for Find Reference
by Menabar
The MCP Server provides tools for finding text matches and extracting parse tree metadata from files within a specified directory. It supports recursive searching and allows for follow-up prompts based on the extracted information.
Last updated: N/A
What is MCP Server for Find Reference?
The MCP Server is a tool designed to analyze code within a given directory. It currently supports two primary functions: finding exact text matches within files and extracting metadata from the parse tree of a given string.
How to use MCP Server for Find Reference?
To use the MCP server, first add it to AMP using http://localhost:3001
and name it get-text-matches
. Then, run the server using node server.js
. You can then prompt the server with commands like use the get-text-match tool to find temp_x, specify the full path
or use the get-parse-tree tool to find temp_x, specify the full path
.
Key features of MCP Server for Find Reference
Finds exact text matches in files
Extracts metadata from parse trees
Recursively searches directories
Supports follow-up prompts for further analysis
Can be configured to avoid specific tools
Use cases of MCP Server for Find Reference
Finding all occurrences of a variable in a codebase
Determining the type of a variable in a specific scope
Analyzing the structure of code
Identifying the definition location of a variable
Understanding the different node types of a variable
FAQ from MCP Server for Find Reference
How do I start the server?
How do I start the server?
Add the server to AMP using http://localhost:3001
and name it get-text-matches
. Then, run the server using node server.js
.
What tools are currently supported?
What tools are currently supported?
The server currently supports the get-text-matches
and get-parse-tree
tools.
How do I specify which tool to use?
How do I specify which tool to use?
Use commands like use the get-text-match tool...
or use the get-parse-tree tool...
in your prompt.
What if the server selects the wrong tool?
What if the server selects the wrong tool?
You can explicitly tell it to not use a specific tool, for example: use the parse tree tool, not get text, to find temp_x, specify the full path
.
Why do I need to specify the full path?
Why do I need to specify the full path?
Occasionally the server will default to using .
as the directory instead of the full path, which the server needs for accurate analysis.