Get the FREE Ultimate OpenClaw Setup Guide →

ts-introspect

MCP server from t3ta/ts-introspect-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio t3ta-ts-introspect-mcp-server npx -y ts-introspect-mcp-server

How to use

The TypeScript Package Introspector MCP server provides tools to analyze TypeScript packages and source code to enumerate exported symbols (functions, classes, types, constants) along with their type information and JSDoc descriptions. It exposes two MCP tools: introspect-package, which analyzes an npm package by name and returns its exported symbols and types, and introspect-source, which analyzes a snippet of TypeScript source code to extract the exported symbols present. You can run the server using npx ts-introspect-mcp-server, then invoke the tools through your MCP client by specifying the appropriate tool name and parameters. This is useful for supplying precise type and symbol information to LLM workflows when integrating with models like Claude for Desktop or other copilots.

How to install

Prerequisites:

  • Node.js and npm (or pnpm/yarn as preferred).
  • Access to the internet to fetch the MCP server package via npm.

Installation steps:

  1. Ensure you have Node.js and npm installed. You can verify with: node -v npm -v

  2. You can run the MCP server directly without a local install by using npx (recommended for quick start): npx -y ts-introspect-mcp-server

  3. If you prefer a local setup (e.g., for development or offline usage), clone the repository or install the package locally: npm install ts-introspect-mcp-server

    Then start (if a start script is provided in package.json, e.g. npm run start:mcp):

    npm run start:mcp

  4. To configure your MCP client, create or edit your .roo/mcp.json to reference the server, for example: { "mcpServers": { "ts-introspect": { "command": "npx", "args": ["-y", "ts-introspect-mcp-server"] } } }

Additional notes

Tips:

  • The server analyzes both npm packages (introspect-package) and raw TypeScript source (introspect-source) to return exported symbols with type information and JSDoc descriptions, suitable for feeding to LLMs.
  • If the target package has extensive types, expect longer responses; consider limiting results or streaming data if supported by your MCP client.
  • The configuration example uses the default npx invocation. If you publish the server with a different entry point or package name, adjust the command/args accordingly.
  • Ensure your environment allows network access for npm registry lookups when using npx or installing dependencies.
  • The server is designed to be started as part of an MCP workflow and is compatible with MCP clients that support the standard tools introspect-package and introspect-source.

Related MCP Servers

Sponsor this space

Reach thousands of developers