Large Language Models (LLMs) have made incredible strides in code generation and developer productivity. However, they face a key limitation: they can only reliably use APIs and libraries they’ve seen during training. This creates a bottleneck for adopting new tools, SDKs, or internal APIs — LLMs simply don’t know how to use them effectively. While tools can be given source code access (when inter
Add this skill
npx mdskills install yWorks/mcp-typescribeProvides efficient TypeDoc-based API querying for LLMs via comprehensive tools and clear setup.
1> [!CAUTION]2> Public development is currently suspended as no active community formed. We are working on a follow-up project, specifically for the [yFiles](https://yfiles.com) API. You can read more, here: [yFiles MCP Server](https://www.yfiles.com/the-yfiles-sdk/web/yfiles-for-html/yfiles-mcp-server). yFiles developers can use the MCP to query API, development guides, source code snippets and recipes using those tools, instead. They work far better than the implementation in this repository.345[](https://www.npmjs.com/package/mcp-typescribe)67# MCP-Typescribe - an MCP Server providing LLMs API information89## The Problem1011Large Language Models (LLMs) have made incredible strides in code generation and developer productivity. However, they face a key limitation: they can only reliably use APIs and libraries they’ve seen during training. This creates a bottleneck for adopting new tools, SDKs, or internal APIs — LLMs simply don’t know how to use them effectively.1213While tools can be given source code access (when interacting with APIs for which the sources are available) or access to documentation files (e.g. typescript type definition files), this doesn't scale well for large APIs. LLMs need a more efficient way to learn more about an API. Putting all the documentation into context for every request is inefficient, unfeasible, and leads to poor results.1415## As a result:1617Larger new or internal APIs remain "invisible" to LLMs.1819Developers must manually guide LLMs or provide example usage.2021Innovation is slowed by the lag between an API’s release and its widespread understanding by AI tools.2223## The Idea2425This project is an open-source implementation of the Model Context Protocol (MCP)—a protocol designed to provide LLMs with contextual, real-time access to information. In this case it's the API documentation, and particularly for now in this project TypeScript definitions.2627## Our goal is to:2829Parse TypeScript (and other) definitions into a machine-readable format.3031Serve this context dynamically to LLMs through tools like Claude, Cline, Cursor, or Windsurf and other custom interfaces.3233Enable agentic behavior by letting LLMs query, plan, and adapt to unfamiliar APIs without retraining.3435## What This Enables3637Plug-and-play API support for LLM-based coding assistants.3839Faster onboarding for new or proprietary SDKs.4041A step toward more autonomous, context-aware coding agents.4243## Project Overview44454647This project provides a way for AI agents to efficiently explore and understand unknown TypeScript APIs. It loads TypeDoc-generated JSON documentation and exposes it through a set of query endpoints that allow agents to search for symbols, get detailed information about specific parts of the API, and understand relationships between different components.4849## Current Features5051- **TypeDoc Integration**: Loads and indexes TypeDoc JSON documentation for efficient querying52- **Comprehensive Query Capabilities**: Provides a wide range of tools for exploring TypeScript APIs53- **MCP Protocol**: Follows the Model Context Protocol for seamless integration with AI agents5455## Query Capabilities5657The server provides the following tools for querying the API:5859- `search_symbols`: Find symbols by name with optional filtering by kind60- `get_symbol_details`: Get detailed information about a specific symbol61- `list_members`: List methods and properties of a class or interface62- `get_parameter_info`: Get information about function parameters63- `find_implementations`: Find implementations of interfaces or subclasses64- `search_by_return_type`: Find functions returning a specific type65- `search_by_description`: Search in JSDoc comments66- `get_type_hierarchy`: Show inheritance relationships67- `find_usages`: Find where a type/function is used6869## Getting Started7071### Prerequisites7273- Node.js74- npm7576### Installation77781. Clone the repository792. Install dependencies:80 ```bash81 npm install82 ```8384### Usage85861. Generate TypeDoc JSON for your TypeScript API:8788 ```bash89 npx typedoc --json docs/api.json --entryPointStrategy expand path/to/your/typescript/files90 ```9192 If you (only) have an existing`.d.ts` file, you can create an api json file like so:9394 Create a separate `tsconfig.docs.json`:9596 ```json97 {98 "extends": "./tsconfig.json",99 "files": ["existing.d.ts"],100 "typedocOptions": {101 "entryPoints": ["existing.d.ts"],102 "json": "docs/api.json",103 "pretty": false104 }105 }106 ```107108 Then do109110 ```bash111 npx typedoc --tsconfig tsconfig.docs.json112 ```1131142. Build the project:115116 ```bash117 npm run build118 ```1191203. Explore the MCP server:121122 ```bash123 npx @modelcontextprotocol/inspector node ./dist/mcp-server/cli.js run-server docs/api.json124 ```1251264. Connect an AI agent to the server to query the API127128 E.g. with cline in VSCode, specify the following MCP server in `cline_mcp_settings.json`:129130 ```json131 {132 "mcpServers": {133 "typescribe": {134 "command": "npx",135 "args": [136 "-y",137 "mcp-typescribe@latest",138 "run-server",139 "<PATH_TO_API_DOT_JSON>"140 ],141 "env": {}142 }143 }144 }145 ```1461475. Enable the server and likely auto-approve the various tools. Tell the agent to use the "typescribe" tool to learn about your API.148149## Project Structure150151- `src/sample-api/`: A sample TypeScript API for testing - it uses a weird German-like dialect for the API names to test that the LLM does not hallucinate the API152- `src/mcp-server/`: The MCP server implementation153 - `utils/`: Utility functions154 - `schemas/`: JSON schemas for the MCP tools155 - `core/`: Core functionality156 - `server.ts`: The MCP server implementation157 - `index.ts`: Entry point for the library exports158 - `cli.ts`: the entry point for the CLI/binary159- `tests/`: Tests for the API functionality160161## Development162163### Running Tests164165```bash166npm test167```168169### Building170171```bash172npm run build173```174175## License176177MIT178179Copyright 2025 yWorks GmbH - https://www.yworks.com180
Full transparency — inspect the skill content before installing.