MCP-Typescribe logo

MCP-Typescribe

by yWorks

MCP-Typescribe is an open-source implementation of the Model Context Protocol (MCP) designed to provide LLMs with contextual, real-time access to API documentation, particularly TypeScript definitions. It enables LLMs to efficiently explore and understand unknown TypeScript APIs without retraining.

View on GitHub

Last updated: N/A

What is MCP-Typescribe?

MCP-Typescribe is an MCP server that parses TypeScript definitions into a machine-readable format and serves this context dynamically to LLMs. It leverages TypeDoc-generated JSON documentation and exposes it through query endpoints, allowing agents to search for symbols, get detailed information about specific parts of the API, and understand relationships between different components.

How to use MCP-Typescribe?

To use MCP-Typescribe, first generate TypeDoc JSON for your TypeScript API. Then, build the project and run the MCP server, providing the path to the generated JSON file. Finally, connect an AI agent to the server, configuring it to use the 'typescribe' tool to query the API.

Key features of MCP-Typescribe

  • TypeDoc Integration: Loads and indexes TypeDoc JSON documentation for efficient querying.

  • Comprehensive Query Capabilities: Provides a wide range of tools for exploring TypeScript APIs.

  • MCP Protocol: Follows the Model Context Protocol for seamless integration with AI agents.

  • Dynamic API Context: Provides real-time API information to LLMs.

Use cases of MCP-Typescribe

  • Plug-and-play API support for LLM-based coding assistants.

  • Faster onboarding for new or proprietary SDKs.

  • Enabling more autonomous, context-aware coding agents.

  • Making new or internal APIs accessible to LLMs.

  • Improving developer productivity by allowing LLMs to effectively use unfamiliar APIs.

FAQ from MCP-Typescribe

What is the Model Context Protocol (MCP)?

MCP is a protocol designed to provide LLMs with contextual, real-time access to information.

What type of documentation does MCP-Typescribe support?

Currently, MCP-Typescribe primarily supports TypeScript definitions through TypeDoc-generated JSON documentation.

How does MCP-Typescribe help LLMs?

It helps LLMs by providing a structured and efficient way to access and understand API documentation, enabling them to use APIs they haven't been trained on.

What query capabilities does the server provide?

The server provides capabilities such as searching symbols, getting symbol details, listing members, getting parameter info, finding implementations, searching by return type, searching by description, getting type hierarchy, and finding usages.

How do I connect an AI agent to the MCP-Typescribe server?

You can connect an AI agent by configuring it to use the 'typescribe' tool and providing the command to run the server with the path to the API JSON file.