mcpField
T
TypeScript Package Introspector (MCP Server)

TypeScript Package Introspector (MCP Server)

Local
github.com/t3taDeveloper Tools5Updated 81w ago

About TypeScript Package Introspector (MCP Server)

TypeScript Package Introspector is an MCP server for extracting exported symbols and type information from npm packages and TypeScript source. It is for LLM applications that need API details, including JSDoc descriptions.

Key features

  1. 01Extract npm package exports
  2. 02Analyze TypeScript source
  3. 03Return detailed type signatures
  4. 04Extract JSDoc comments

Use cases

  1. 01Inspect a package's public API
  2. 02Analyze functions and types in source
  3. 03Provide type details to LLM applications

MCP support

It provides introspect-package and introspect-source tools for MCP clients to query exports from npm packages or TypeScript source.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"ts-introspect": {
"command": "npx",
"args": [
"-y",
"@t3ta/ts-introspect-mcp-server"
]
}
}
}
Run commandnpx -y @t3ta/ts-introspect-mcp-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@t3ta/ts-introspect-mcp-server

Tools

3

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
packageNamestringYesName of the npm package to introspect (e.g. 'zod')
searchPathsarrayNoOptional paths to search for the package
searchTermstringNoFilter exports by search term (supports regex)
cachebooleanNoEnable/disable caching for faster repeat lookups
cacheDirstringNoDirectory to store cache files (default: .ts-morph-cache)
limitnumberNoLimit the number of exports returned

Details

From the project README

TypeScript Package Introspector (MCP Server)

This tool introspects TypeScript packages and source code to extract exported symbols (functions, classes, types, constants) and their type information. It runs as a Model Context Protocol (MCP) server.

Features

  • Extract exported symbols from npm packages using their type definitions
  • Analyze TypeScript source code directly
  • Get detailed type signatures for all exported symbols
  • Extract JSDoc comments as descriptions
  • Provide type information to LLMs through MCP

Usage

This tool can be run as an MCP server to provide TypeScript package introspection capabilities to LLM applications like Claude for Desktop. You can start it using npx:

npx ts-introspect-mcp-server

To integrate it with your project, create a .roo/mcp.json configuration file:

{
  "mcpServers": {
    "ts-introspect": {
      "command": "npx",
      "args": ["-y", "ts-introspect-mcp-server"]
    }
  }
}
MCP Tools

The MCP server provides the following tools:

introspect-package

Introspects an npm package and returns its exported symbols.

Parameters:

  • packageName: Name of the npm package to introspect (e.g., 'zod')
introspect-source

Introspects TypeScript source code and returns the exported symbols.

Parameters:

  • source: TypeScript source code to analyze

Development

# Run tests
npm test

# Start the MCP server in development mode
npm run start:mcp

License

MIT

Comments

Markdown supported

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.