1. Conduid
  2. Developer Tools
  3. mcp
MCP server · Developer Tools

mcp

MCP server for Type Crafter - generate types from YAML specifications

Unclaimed devtools
39Low

Scored 5 months ago · breakdown

About mcp

mcp is an MCP server published by git+sinha-sahil in the Developer Tools category: mCP server for Type Crafter - generate types from YAML specifications.

Install

Install
npx @type-crafter/mcp
Claude Code
claude mcp add type-crafter -- npx -y @type-crafter/mcp
npx
npx -y @type-crafter/mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (5)

get-rules-sectionDeep-dive into specific topics

Parameters not published.

get-spec-infoView types in existing spec

Parameters not published.

get-writing-guideLearn YAML spec format (call first)

Parameters not published.

list-languagesShow supported languages

Parameters not published.

validate-specCheck specs for errors

Parameters not published.

Ask AI

✦

Ask AI about mcp

Powered by Claude · Grounded in docs

I know everything about mcp. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

4 checks have not been run yet.

README

Type Crafter

TypeCrafter is a CLI tool for generating types from a YAML types specification for any language. The tool is heavily inspired by OpenAPI Generator and aims to provide similar functionality for generating types with a simple YAML specification & more flexibility.

Installation

npm i -g type-crafter

Usage

type-crafter generate <language> <types-specification-file> <output-directory>

Example

type-crafter generate typescript types.yaml ./types

Example input specification file can be found here

Input Specification

The input specification is a YAML file that contains the types specification. Refer the following sample specification for the structure:

info:
  version: 0.0.0
  title: Title of your specification
types:
  SampleType:
    type: object
    properties:
      name:
        type: string
groupedTypes:
  SampleGroupedType:
    type: object
    properties:
      name:
        type: string

The input specification yaml file must be of following syntax:

  • info - The information about the specification. Specifying the version and title of your spec. This is required.
  • types - These are types that will be generated in flat structure.
  • groupedTypes - These are types that will be generated and grouped in a folder.

Note: Passing types or groupedTypes is up to your expected results. A valid spec file can contain either types or groupedTypes or both.

The syntax for writing different types can be referred from the OpenAPI Data Types Guide.

Supported Languages

  • [✔️] TypeScript
  • [✔️] TypeScript with Decoders (runtime validation)
  • More languages coming soon

MCP Server (AI Assistant Integration)

Type Crafter includes an MCP (Model Context Protocol) server that helps AI assistants write correct YAML specifications.

Installation

npm install -g @type-crafter/mcp-server

Configuration (Claude Desktop)

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "type-crafter": {
      "command": "type-crafter-mcp"
    }
  }
}

Available Tools

Tool Description
get-writing-guide Learn YAML spec format (call first)
get-rules-section Deep-dive into specific topics
validate-spec Check specs for errors
get-spec-info View types in existing spec
list-languages Show supported languages

Key Features

  • Session-based workflow - Guides LLMs to read documentation first
  • Educational errors - Explains what's wrong and how to fix it
  • Common mistake detection - Catches nullable: true, optional: true, wrong paths

See mcp/README.md for full documentation.

Contributing & Extending

Adding support for a new language

TypeCrafter uses Handlebars to template syntax for different languages.

To add support for a new language, you need to create a new folder in src/templates directory. The folder name will be the name of the language. The folder must implement following files:

  • index.ts - The main file that will be exporting the generator config.
  • object-syntax.hbs - This Handlebars template file that will be used to generate the object syntax.
  • type-file-syntax.hbs - This Handlebars template file that will be used to generate the syntax for file which contains the generated types & its imports.
  • exporter-module-syntax.hbs - This Handlebars template file that will be used to generate the syntax for the module that exports the generated types.

Development

To start developing type-crafter, you need to run following commands:

pnpm i
pnpm run dev

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About mcp

How do I install mcp?

Run npx @type-crafter/mcp, then add the server to your MCP client's configuration.

Is mcp safe to use with an AI agent?

Its trust score is 39 out of 100 (low). It passes 1 of the 2 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is mcp still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.