概要
What is TypeScript Package Introspector (MCP Server)?
TypeScript Package Introspector (MCP Server) is a tool that extracts exported symbols (functions, classes, types, constants) and their type information from TypeScript packages and source code. It can be used as a library, a CLI tool, or as a Model Context Protocol (MCP) server to provide context to LLM applications.
How to use TypeScript Package Introspector (MCP Server)?
Clone the repository, install dependencies with npm install or pnpm install, and build with npm run build. Use the CLI with node dist/index.js <packageName>, the library via introspectFromPackage or introspectFromSource imports, or run the MCP server with npm start.
Key features of TypeScript Package Introspector (MCP Server)
- Extract exported symbols from npm packages using type definitions
- Analyze TypeScript source code directly
- Get detailed type signatures for all exported symbols
- Extract JSDoc comments as descriptions
- Run as an MCP server to provide context to LLMs
Use cases of TypeScript Package Introspector (MCP Server)
- Introspect npm packages to understand their exported API surface
- Analyze TypeScript source code for documentation or static analysis
- Provide package type information to LLMs via the MCP protocol
- Automatically extract type signatures and JSDoc from codebases
FAQ from TypeScript Package Introspector (MCP Server)
What symbols does the tool extract?
It extracts exported functions, classes, types, and constants along with their type signatures and JSDoc documentation.
How do I run it as an MCP server?
Build the project with npm run build, then start the MCP server with npm start. It provides two tools: introspect-package and introspect-source.
What MCP tools are available?
Two tools: introspect-package (introspects an npm package by name) and introspect-source (introspects TypeScript source code directly).
How do I install and set up the server?
Clone the repository, install dependencies using npm install or pnpm install, and build the project with npm run build.
What are the dependencies for installation?
The project requires a Node.js environment with npm or pnpm to install dependencies and run build commands.