TypeScript Analyzer MCP Server - Enterprise Edition
LocalAbout TypeScript Analyzer MCP Server - Enterprise Edition
TypeScript Analyzer MCP Server - Enterprise Edition helps developers find and replace `any` types in TypeScript projects. It also supports batch fixes, React component interface generation, and runtime configuration and cache management.
Key features
- 01Scan files for `any` types
- 02Suggest and apply specific types
- 03Batch-process multiple files
- 04Generate React prop interfaces
- 05Configure server and manage cache
Use cases
- 01Audit a TypeScript codebase for `any`
- 02Replace `any` types across files
- 03Generate interfaces for React components
MCP support
Exposes tools to MCP clients for analysis and fixes, batch processing, React interface generation, server configuration, and cache clearing.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMETypeScript Analyzer MCP Server - Enterprise Edition
A high-performance MCP (Model Context Protocol) server for analyzing and fixing TypeScript any types in your codebase, with advanced error handling, caching, and intelligent type inference.
Features
- 🔍 Analyze TypeScript Files: Scan files for
anytypes and get suggested replacements - 🛠️ Fix TypeScript Files: Automatically replace
anytypes with more specific types - 📊 Batch Processing: Process multiple files at once
- 🧩 Component Interface Generation: Generate TypeScript interfaces for React components
- ⚙️ Server Configuration: Dynamically update server config (log level, caching, etc.)
- 🔧 Cache Management: Clear and manage analysis caches
Installation
- Clone this repository
- Install dependencies:
npm install - Build the project:
npm run build - Start the server:
ornpm run startnode dist/index.js
Using with Claude Desktop
To use this MCP server with Claude Desktop, add it to your .claude-app.json configuration file:
{
"mcpServers": {
"typescript-analyzer": {
"command": "node",
"args": ["/path/to/typescript-analyzer-mcp/dist/index.js"],
"env": {}
}
}
}
Tools
getServerInfo
Retrieves basic information about the analyzer server (name, version, description, features, configuration).
Example:
Please provide server info
configureServer
Updates server configuration (log levels, caching, etc.) at runtime.
Parameters:
config: A partial configuration object to merge with the current config
Example:
Please update the logLevel to 'debug' for the server
analyzeTypeScriptFile
Analyzes a TypeScript file for any types.
Parameters:
filePath: Path to the TypeScript file to analyzeskipCache: (optional) If true, forces a fresh analysis
Example:
Please analyze the TypeScript file src/components/Button.tsx for any types
fixTypeScriptFile
Fixes any types in a single TypeScript file.
Parameters:
filePath: Path to the TypeScript file to fixfixType: Default type to use for replacement (default: "unknown")dryRun: If true, show changes without applying themskipBackup: If true, do not create a backup file before modifying
Example:
Please fix the TypeScript file src/components/Button.tsx, using Record<string, unknown> as the default replacement
batchFixTypeScriptFiles
Batch fixes any types in multiple TypeScript files.
Parameters:
directory: Directory containing TypeScript filespattern: Glob pattern for files to process (e.g. "**/*.ts")fixType: Default type to use for replacementdryRun: If true, show changes without applying themconcurrency: (optional) How many files to process in parallel
Example:
Please fix all TypeScript files in the src/components directory
generateComponentInterface
Generates a proper TypeScript interface for React component props.
Parameters:
filePath: Path to the React component filecomponentName: Name of the component to analyzeoutputPath: (optional) Path where to save the generated interface
Example:
Please generate an interface for the Button component in src/components/Button.tsx
clearCache
Clears the analysis cache to force fresh analysis on subsequent operations.
Example:
Please clear the analysis cache
Type Mapping Strategy
The server uses a set of predefined mappings for common patterns:
| Pattern | Replacement |
|---|---|
e: any | e: React.SyntheticEvent |
event: any | event: React.SyntheticEvent |
onChange: any | onChange: (value: unknown) => void |
onClick: any | onClick: (event: React.MouseEvent<HTMLElement>) => void |
ref: any | ref: React.RefObject<HTMLElement> |
data: any | data: Record<string, unknown> |
options: any | options: Record<string, unknown> |
config: any | config: Record<string, unknown> |
props: any | props: Record<string, unknown> |
items: any[] | items: unknown[] |
results: any[] | results: unknown[] |
callback: any | callback: (...args: unknown[]) => unknown |
For patterns not covered by the mappings, it defaults to using unknown.
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.