SuperAPI AI Directory

mcp-typescribe

Provides TypeScript API information so agents can work with APIs not in their training data.

Open website

About this tool

MCP-Typescribe is an MCP server implementation designed to provide API information to large language models (LLMs), enabling LLMs to use new APIs and frameworks not included in their training data.

Background and Purpose LLMs have made tremendous progress in code generation and developer productivity, but there is a key limitation: they can only reliably use APIs and libraries they have seen during training. This creates a bottleneck for adopting new tools, SDKs, or internal APIs. Although this can be mitigated by giving tools access to source code or documentation files (such as TypeScript type definition files), this approach scales poorly for large APIs. Putting all documentation into the context of every request is inefficient, infeasible, and leads to poor results. Larger new APIs or internal APIs remain "invisible" to LLMs, developers must manually guide the LLM or provide usage examples, and the lag between API release and broad understanding by AI tools also slows innovation.

This project is an open-source implementation of the Model Context Protocol (MCP), a protocol designed to provide LLMs with contextual access to real-time information. In this project, that information is API documentation, currently specifically for TypeScript definitions.

Goals

  • Parse TypeScript (and other) definitions into a machine-readable format.
  • Dynamically provide context to LLMs through tools such as Claude, Cline, Cursor, Windsurf, and other custom interfaces.
  • Enable agent behavior by letting LLMs query, plan, and adapt to unfamiliar APIs without retraining.

Main Capabilities

  • TypeDoc integration: Load and index TypeDoc JSON documentation for efficient querying.
  • Comprehensive query capabilities: Provide a variety of tools for exploring TypeScript APIs.
  • MCP protocol: Follows the Model Context Protocol and can integrate seamlessly with AI agents.

Query Capabilities (tools provided by the server)

  • search_symbols: Find symbols by name, optionally filtered by kind.
  • get_symbol_details: Get detailed information about a specific symbol.
  • list_members: List the methods and properties of a class or interface.
  • get_parameter_info: Get function parameter information.
  • find_implementations: Find implementations or subclasses of an interface.
  • search_by_return_type: Find functions that return a specific type.
  • search_by_description: Search in JSDoc comments.
  • get_type_hierarchy: Show inheritance relationships.
  • find_usages: Find where a type/function is used.

Usage

  1. Clone the repository.
  2. Install dependencies: npm install
  3. Generate TypeDoc JSON for your TypeScript API: npx typedoc --json docs/api.json --entryPointStrategy expand path/to/your/typescript/files If you have (only) existing .d.ts files, you can create the api json file like this: Create a separate tsconfig.docs.json: { "extends" : " ./tsconfig.json " , "files" : [ " existing.d.ts " ], "typedocOptions" : { "entryPoints" : [ " existing.d.ts " ], "json" : " docs/api.json " , "pretty" : false } } Then run npx typedoc --tsconfig tsconfig.docs.json
  4. Build the project: npm run build
  5. Explore the MCP server: npx @modelcontextprotocol/inspector node ./dist/mcp-server/cli.js run-server docs/api.json
  6. Connect an AI agent to the server to query the API. For example, using cline in VSCode, specify the following MCP server in cline_mcp_settings.json: { "mcpServers" : { "typescribe" : { "command" : "npx" , "args" : [ "-y" , "mcp-typescribe@latest" , "run-server" , "<PATH_TO_API_DOT_JSON>" ], "env" : {} } } } Enable this server, and possibly auto-approve various tools. Tell the agent to use the "typescribe" tool to learn about your API.

Project structure

  • src/sample-api/: A sample TypeScript API for testing—it uses a strange German-like dialect to name the API, to test that the LLM does not hallucinate the API.
  • src/mcp-server/: MCP server implementation
    • utils/: utility functions
    • schemas/: JSON schemas for MCP tools
    • core/: core functionality
    • server.ts: MCP server implementation
    • index.ts: entry point for library exports
    • cli.ts: entry point for the CLI/binary
  • tests/: tests for API functionality

Enabled scenarios

  • Provide plug-and-play API support for LLM-based programming assistants.
  • Get started faster with new or proprietary SDKs.
  • Move toward more autonomous, context-aware programming agents.

Current status Public development is currently paused because no active community has formed. The team is advancing a follow-up project specifically targeting the yFiles API. yFiles developers can use that MCP to query the API, development guides, source code snippets, and recipes; these tools work far better than the implementation in this repository.

License and copyright Copyright 2025 yWorks GmbH - https://www.yworks.com