Cover image
Try Now
2025-04-04

An MCP server implementation enabling LLMs to work with new APIs and frameworks

3 years

Works with Finder

2

Github Watches

0

Github Forks

10

Github Stars

npm version

MCP-Typescribe - an MCP Server providing LLMs API information

The Problem

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 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.

As a result:

Larger new or internal APIs remain "invisible" to LLMs.

Developers must manually guide LLMs or provide example usage.

Innovation is slowed by the lag between an API’s release and its widespread understanding by AI tools.

The Idea

This 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.

Our goal is to:

Parse TypeScript (and other) definitions into a machine-readable format.

Serve this context dynamically to LLMs through tools like Claude, Cline, Cursor, or Windsurf and other custom interfaces.

Enable agentic behavior by letting LLMs query, plan, and adapt to unfamiliar APIs without retraining.

What This Enables

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

Faster onboarding for new or proprietary SDKs.

A step toward more autonomous, context-aware coding agents.

Project Overview

Image

This 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.

Current Features

  • 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

Query Capabilities

The server provides the following tools for querying the API:

  • search_symbols: Find symbols by name with optional filtering by kind
  • get_symbol_details: Get detailed information about a specific symbol
  • list_members: List methods and properties of a class or interface
  • get_parameter_info: Get information about function parameters
  • find_implementations: Find implementations of interfaces or subclasses
  • search_by_return_type: Find functions returning 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

Getting Started

Prerequisites

  • Node.js
  • npm

Installation

  1. Clone the repository
  2. Install dependencies:
    npm install
    

Usage

  1. Generate TypeDoc JSON for your TypeScript API:

    npx typedoc --json docs/api.json --entryPointStrategy expand path/to/your/typescript/files
    

    If you (only) have an existing.d.ts file, you can create an api json file like so:

    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 do

    npx typedoc --tsconfig tsconfig.docs.json
    
  2. Build the project:

    npm run build
    
  3. Explore the MCP server:

    npx @modelcontextprotocol/inspector node ./dist/mcp-server/index.js run-server docs/api.json
    
  4. Connect an AI agent to the server to query the API

    E.g. with 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": {}
        }
      }
    }
    
  5. Enable the server and likely auto-approve the 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 weird German-like dialect for the API names to test that the LLM does not hallucinate the API
  • src/mcp-server/: The MCP server implementation
    • utils/: Utility functions
    • schemas/: JSON schemas for the MCP tools
    • core/: Core functionality
    • server.ts: The MCP server implementation
    • index.ts: Entry point
  • tests/: Tests for the API functionality

Development

Running Tests

npm test

Building

npm run build

License

MIT

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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • albert tan
  • Japanese education, creating tailored learning experiences.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • ariofarmani
  • Test repository for GitHub MCP server functionality

  • GeyserMC
  • A library for communication with a Minecraft client/server.

  • 1Panel-dev
  • 💬 MaxKB is an open-source AI assistant for enterprise. It seamlessly integrates RAG pipelines, supports robust workflows, and provides MCP tool-use capabilities.

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

  • GLips
  • MCP server to provide Figma layout information to AI coding agents like Cursor

  • open-webui
  • User-friendly AI Interface (Supports Ollama, OpenAI API, ...)

    Reviews

    1 (1)
    Avatar
    user_xKWOGZco
    2025-04-15

    The MCP Documentation Search Server by PicardRaphael is fantastic! It’s streamlined and intuitive, making documentation searches a breeze. The search engine is fast and the results are accurate. I highly recommend this excellent tool to improve your productivity and efficiency. Check it out: https://mcp.so/server/mcp-server-documentation/PicardRaphael