Code Reference Optimizer MCP Server
The Code Reference Optimizer MCP Server is an advanced tool that optimizes code context for AI assistants through intelligent extraction, analysis, and optimization.
Smart Context Extraction: Uses AST parsing to extract minimal, relevant code sections for specified symbols while managing imports automatically
Multi-language Support: Compatible with TypeScript/JavaScript, Python, Go, Rust, Java, C++, and more
Intelligent Caching: Retrieves previously extracted code context for fast access without re-parsing
Token Optimization: Filters unnecessary code while maintaining semantic completeness, reducing token usage for AI assistants
Diff Analysis: Analyzes code differences with semantic understanding and provides minimal update suggestions
Import Optimization: Eliminates redundant imports and improves code efficiency by analyzing used symbols
Configuration Management: Allows retrieval, updating, and resetting of server settings including cache behavior, extraction parameters, and token limits
Simple Integration: Operates as a stdio-based MCP server for easy integration with any MCP client
Provides code analysis and optimization tools for JavaScript files, including context extraction, diff analysis, and import optimization to reduce token usage
Provides code analysis and optimization tools for Python files, including context extraction, diff analysis, and import optimization to reduce token usage
Provides code analysis and optimization tools for Rust files, including context extraction, diff analysis, and import optimization to reduce token usage
Provides code analysis and optimization tools for TypeScript files, including context extraction, diff analysis, and import optimization to reduce token usage
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Code Reference Optimizer MCP Serverextract the relevant context from my React component file"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Code Reference Optimizer MCP Server
An advanced MCP (Model Context Protocol) server that intelligently extracts minimal, relevant code context using AST parsing, analyzes code differences, and optimizes imports to dramatically reduce token usage for AI assistants.
Key Features
Smart Context Extraction: Uses AST parsing to identify and extract only relevant code sections
Multi-language Support: TypeScript/JavaScript, Python, Go, Rust, Java, C++, and more
Intelligent Caching: LRU cache with configurable persistence and customizable storage paths
Token Optimization: Filters unnecessary code while maintaining semantic completeness
Diff Analysis: Provides minimal, focused code differences with semantic understanding
Import Optimization: Eliminates unused imports and suggests consolidation opportunities
Configurable: Runtime configuration via tools with persistent settings
Simple Integration: stdio-based server and optional HTTP server, easy to integrate with any MCP client
Related MCP server: Ambiance MCP Server
Quick Start (STDIO)
One-off (recommended):
npx -y @fosterg4/mcpsaverYou should see: Code Reference Optimizer MCP server running on stdio.
Global (optional):
npm i -g @fosterg4/mcpsaver
mcpsaverHTTP Mode
Start the HTTP server on port 8081 (default):
npx -y @fosterg4/mcpsaver mcpsaver-http
# or after build
npm run start:httpConfigure your MCP client to use the HTTP binary if supported, e.g.:
{
"mcpServers": {
"mcpsaver": { "command": "mcpsaver-http", "env": { "PORT": "8081", "LOG_LEVEL": "info" } }
}
}Use with an MCP client
Add to your MCP client config (example mcpServers.json):
{
"mcpServers": {
"mcpsaver": {
"command": "npx",
"args": ["-y", "@fosterg4/mcpsaver"],
"env": {}
}
}
}Available Tools
The server provides 7 powerful tools for code analysis and optimization:
π extract_code_context
Extracts minimal, focused code context using AST parsing. Intelligently identifies relevant code sections, imports, and dependencies for specific symbols.
{
"filePath": "path/to/file.ts",
"targetSymbols": ["myFunc", "MyClass"],
"includeImports": true,
"maxTokens": 1000
}Required: filePath | Optional: targetSymbols, includeImports, maxTokens
πΎ get_cached_context
Retrieves previously extracted and cached code context for fast access without re-parsing.
{ "filePath": "path/to/file.ts", "cacheKey": "optional-key" }Required: filePath | Optional: cacheKey
π analyze_code_diff
Performs intelligent analysis of code differences with semantic understanding and minimal update suggestions.
{
"filePath": "path/to/file.ts",
"oldContent": "export function a() { return 1 }",
"newContent": "export function a() { return 2 }"
}Required: filePath, oldContent, newContent
π§Ή optimize_imports
Analyzes and optimizes import statements to eliminate redundancy and improve code efficiency.
{ "filePath": "path/to/file.ts", "usedSymbols": ["useEffect", "useMemo"] }Required: filePath | Optional: usedSymbols
βοΈ get_config
Retrieves current configuration settings for cache behavior, extraction parameters, and more.
{ "section": "cache" }Optional: section (cache, extraction, imports, diff, performance, languages, logging, security)
π§ update_config
Updates configuration settings including cache policies, token limits, and performance thresholds.
{
"config": {
"cache": { "enablePersistence": true, "persistencePath": "/custom/cache/path" },
"extraction": { "maxTokens": 2000 }
}
}Required: config
π reset_config
Resets all configuration settings to default values.
{}No parameters required
Note: Tool results are returned as MCP content with a single text item containing JSON of the result, e.g.
{
"content": [{ "type": "text", "text": "{\n \"...\": true\n}" }]
}Additional MCP Capabilities
Prompts: listed but empty;
get_promptreturns MethodNotFound.Resources: listed but empty; reading a resource returns MethodNotFound.
Roots: exposes the current working directory as a single root
workspace.Sampling: stubbed;
sampling/createMessagereturns MethodNotFound.
Examples
See docs/EXAMPLES.md for endβtoβend request examples of each tool.
Configuration
Call
get_config,update_config,reset_configto manage runtime settings.You may also set environment variables via your MCP client if supported (e.g.,
LOG_LEVEL).
Structured Logging
The server uses a lightweight structured logger. Configure via get_config/update_config or env:
Level:
config.logging.level(trace|debug|info|warn|error)File logging:
config.logging.enableFileLoggingandconfig.logging.logPath
Development
npm ci
npm run build
npm start # run built server (stdio)
npm run start:http # run built server (http)
npm run dev # tsc --watch
npm test
npm run lint
npm run type-checkPublishing (maintainers)
npm login
npm run clean && npm run build
npm version patch
npm publish --access publicLicense
MIT β see LICENSE.
Available Tools
7 toolsanalyze_code_diffC
Analyze differences between code versions and provide minimal updates
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the source file | |
| newContent | Yes | Current version of the code | |
| oldContent | Yes | Previous version of the code |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'analyzes differences' and 'provides minimal updates', implying a read-only analysis with output generation, but lacks details on what 'minimal updates' entails (e.g., format, scope), whether it modifies files, error handling, or performance considerations. This is inadequate for a tool with 3 parameters and no output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core action ('analyze differences') and outcome ('provide minimal updates'). There is zero waste, making it easy for an AI agent to parse quickly without unnecessary details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of code diff analysis, 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the output format (e.g., patch, summary), error cases, or how 'minimal updates' are derived, leaving significant gaps for an AI agent to use the tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with clear descriptions for each parameter (filePath, newContent, oldContent). The description adds no additional meaning beyond the schema, such as explaining how parameters interact (e.g., oldContent vs. newContent comparison) or usage nuances. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'analyze' and the resource 'differences between code versions', with the specific outcome 'provide minimal updates'. It distinguishes from siblings like 'extract_code_context' or 'optimize_imports' by focusing on diff analysis rather than extraction or optimization. However, it doesn't explicitly differentiate from all siblings (e.g., 'update_config' might also involve updates), keeping it from a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing old and new code versions), exclusions, or compare to siblings like 'get_cached_context' for historical analysis. Usage is implied by the action but not explicitly defined, leaving gaps for an AI agent to infer context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extract_code_contextC
Extract minimal code context from files using AST parsing
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the source file | |
| includeImports | No | Whether to include relevant imports | |
| maxTokens | No | Maximum tokens to return | |
| targetSymbols | No | Specific symbols/functions to extract context for |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'minimal code context' and 'AST parsing', which hints at read-only, non-destructive behavior, but fails to specify critical details like error handling, performance implications, or what 'minimal' entails (e.g., token limits, scope). This leaves significant gaps for a tool with 4 parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose ('extract minimal code context') and method ('using AST parsing'). Every word earns its place with no redundancy or fluff, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (4 parameters, AST parsing), lack of annotations, and no output schema, the description is incomplete. It doesn't explain return values, error cases, or behavioral nuances, leaving the agent under-informed for effective use. This is inadequate for a tool with moderate complexity and no structured support.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 4 parameters. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain how 'targetSymbols' interacts with 'includeImports' or clarify 'maxTokens' units). This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('extract minimal code context') and method ('using AST parsing'), which is specific and distinguishes it from siblings like 'analyze_code_diff' or 'get_cached_context'. However, it doesn't explicitly differentiate from all siblings (e.g., 'optimize_imports' also deals with code structure), keeping it from a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'get_cached_context' or 'analyze_code_diff'. It lacks context about prerequisites, typical scenarios, or exclusions, leaving the agent with minimal usage direction beyond the basic purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_cached_contextB
Retrieve cached code context for a file
| Name | Required | Description | Default |
|---|---|---|---|
| cacheKey | No | Optional cache key for specific context | |
| filePath | Yes | Path to the source file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action is to 'retrieve' cached context, implying a read-only operation, but doesn't clarify if this requires specific permissions, what happens if the cache is missing, or any rate limits. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it efficient and easy to parse for an AI agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It explains what the tool does but lacks details on behavioral traits, usage context, and output format, which are important for a retrieval operation. This leaves room for improvement without being incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema already documents both parameters ('cacheKey' and 'filePath') with descriptions. The description adds no additional meaning beyond implying that 'filePath' is the primary identifier for retrieving context, which aligns with the schema but doesn't provide extra value. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'retrieve' and the resource 'cached code context for a file', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'extract_code_context' or 'analyze_code_diff', which might involve similar file operations, so it falls short of a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, exclusions, or comparisons to sibling tools such as 'extract_code_context', leaving the agent to infer usage from context alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_configC
Get current configuration settings
| Name | Required | Description | Default |
|---|---|---|---|
| section | No | Specific configuration section to retrieve (optional) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Get' implies a read operation, the description doesn't specify whether this requires special permissions, what format the configuration returns in, whether it's cached or real-time data, or any rate limits. For a configuration tool with zero annotation coverage, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at just four words, which is efficient for a simple retrieval tool. However, it could benefit from slightly more context to help distinguish it from sibling tools. The single sentence is front-loaded with the core purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a configuration retrieval tool with no annotations and no output schema, the description is too minimal. It doesn't explain what 'current configuration settings' means in practice, what format they're returned in, or how this differs from the 'get_cached_context' sibling tool. Given the complexity of configuration systems and the lack of structured output documentation, more descriptive context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents the single optional parameter with its enum values. The description doesn't add any parameter semantics beyond what's in the schema - it doesn't explain what happens when no section is specified, or provide context about the different configuration sections. Baseline 3 is appropriate when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool's purpose as 'Get current configuration settings', which is a clear verb+resource combination. However, it doesn't distinguish this from sibling tools like 'get_cached_context' or 'update_config', leaving ambiguity about what specifically makes this tool different from other configuration-related tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'update_config' and 'reset_config' available, there's no indication of when retrieval versus modification is appropriate, nor any mention of prerequisites or typical use cases for configuration access.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
optimize_importsC
Analyze and optimize import statements to reduce redundancy
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the source file | |
| usedSymbols | No | Symbols actually used in the context |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'analyzes and optimizes' but doesn't clarify whether this is a read-only analysis or a destructive modification, what permissions are needed, how optimization is performed, or what side effects might occur. This leaves critical behavioral traits unspecified.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core purpose and avoids unnecessary elaboration, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of code optimization, lack of annotations, and no output schema, the description is insufficient. It doesn't explain what 'optimize' entails (e.g., removing unused imports, merging duplicates), what the output looks like, or any constraints like supported file types. This leaves the agent with significant gaps in understanding the tool's behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema, such as explaining how 'usedSymbols' interacts with optimization or providing examples. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('analyze and optimize') and resource ('import statements'), and distinguishes its scope ('to reduce redundancy'). However, it doesn't explicitly differentiate from sibling tools like 'analyze_code_diff' or 'extract_code_context', which might have overlapping code analysis functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context requirements, or compare it to sibling tools like 'analyze_code_diff' or 'extract_code_context'. The agent must infer usage from the purpose alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reset_configB
Reset configuration to default values
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It states 'reset' implies mutation, but doesn't disclose if this requires permissions, is reversible, affects other settings, or has side effects. For a mutation tool with zero annotation coverage, this is inadequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words. It's front-loaded and gets straight to the point, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with no annotations and no output schema, the description is too sparse. It doesn't explain what 'default values' are, what gets reset, or the response format, leaving significant gaps in understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add param info, but that's fine given the baseline for zero params is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('reset') and target ('configuration to default values'), making the purpose immediately understandable. It doesn't distinguish from siblings like 'update_config' or 'get_config', but it's not vague or tautological.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'update_config' or 'get_config'. The description implies a destructive reset but doesn't specify prerequisites, warnings, or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_configC
Update configuration settings
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Configuration updates to apply |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. 'Update' implies a mutation operation, but it doesn't specify whether this requires special permissions, if changes are reversible, what happens to existing settings not mentioned, or any rate limits. This leaves significant behavioral gaps for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description 'Update configuration settings' is a single, efficient sentence with zero wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that this is a mutation tool with no annotations, no output schema, and a nested object parameter, the description is incomplete. It lacks details on what configuration settings can be updated, the format of the 'config' object, or what the tool returns, leaving the agent with insufficient context for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the parameter 'config' documented as 'Configuration updates to apply' of type 'object'. The description adds no additional meaning beyond this, such as examples of valid configuration fields or structure. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Update configuration settings' states a clear verb ('Update') and resource ('configuration settings'), which provides basic purpose understanding. However, it doesn't differentiate this tool from its sibling 'reset_config' or specify what types of configuration settings are involved, making it somewhat vague.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'get_config' (for reading) or 'reset_config' (for resetting). There's no mention of prerequisites, appropriate contexts, or exclusions, leaving the agent without usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
7 tool updates
v1.0.0- First observed
analyze_code_diff - First observed
extract_code_context - First observed
get_cached_context - First observed
get_config - First observed
optimize_imports - First observed
reset_config - First observed
update_config
TDQS
Each tool has a clearly distinct purpose with no ambiguity: analyze_code_diff handles code version comparisons, extract_code_context and get_cached_context manage code context retrieval (one for extraction, one for caching), get_config, update_config, and reset_config handle configuration operations, and optimize_imports focuses on import optimization. The descriptions clearly differentiate their functions, making misselection unlikely.
All tools follow a consistent verb_noun pattern using snake_case, such as analyze_code_diff, extract_code_context, and optimize_imports. This uniformity makes the tool set predictable and easy to understand, with no deviations in naming conventions.
With 7 tools, the count is well-scoped for a code reference optimizer server. Each tool serves a specific role in code analysis, context management, and configuration, with no apparent bloat or missing essential functions, fitting the server's purpose appropriately.
The tool set covers core areas like code analysis, context extraction/caching, and configuration management, providing good lifecycle coverage. A minor gap exists in direct code editing or refactoring tools beyond imports, but agents can work around this using the provided tools for most optimization tasks.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Provide your AI coding tools with token-efficient access to up-to-date technical documentation forβ¦
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides AI coding assistants with context optimization tools including targeted file analysis, intelligent terminal command execution with LLM-powered output extraction, and web research capabilities. Helps reduce token usage by extracting only relevant information instead of processing entire files and command outputs.52262TypeScriptMIT
- AlicenseAqualityDmaintenanceProvides intelligent code context and analysis through semantic compression, AST parsing, and multi-language support. Offers 60-80% token reduction while enabling AI assistants to understand codebases through local analysis, OpenAI-enhanced insights, and GitHub repository integration.6223MIT

Code Scalpelofficial
AlicenseNot gradedqualityCmaintenanceEnables AI assistants to surgically extract and analyze code, reducing token usage and costs by up to 200x compared to reading entire files.17MIT- AlicenseAqualityBmaintenanceSelects the minimum code context an LLM needs to understand a git diff: graph-based fragment selection under a token budget, deterministic output, 30+ tree-sitter languages.13Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/FosterG4/mcpsaver'
If you have feedback or need assistance with the MCP directory API, please join our Discord server