lai-gen-mcp

lai-gen-mcp is a skill for Claude Code from eclipse-langium/langium-ai. It costs 43 tokens per session (3,740 once invoked), scanned A, original, MIT.

Instructions for generating a Model Context Protocol server for a Langium-based domain-specific language. The server gives compatible AI clients a validation tool that parses the language and reports errors, warnings, hints and information.

In plain words
What is it for?
Adding live validation to clients such as Claude Code, Cursor or VS Code after a Langium project has a working grammar and generated TypeScript code.
Why use it?
They create a feedback loop for checking generated language code instead of relying only on manual review.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions Claude Code.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { create__DSL_NAME__Services } from '../src/__module_path__';.

Good fit Adding live validation to clients such as Claude Code, Cursor or VS Code after a Langium project has a working grammar and generated TypeScript code.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/eclipse-langium/langium-ai
agentmods
npx agentmods add skills/eclipse-langium/langium-ai/lai-gen-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lai-gen-mcp

README.md
[![agentmods](https://agentmods.dev/badge/skills/eclipse-langium/langium-ai/lai-gen-mcp/github.svg)](https://agentmods.dev/skills/eclipse-langium/langium-ai/lai-gen-mcp)
Your own site
<a href="https://agentmods.dev/skills/eclipse-langium/langium-ai/lai-gen-mcp"><img src="https://agentmods.dev/badge/skills/eclipse-langium/langium-ai/lai-gen-mcp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lai-gen-mcp

Your own site · 80×15
<a href="https://agentmods.dev/skills/eclipse-langium/langium-ai/lai-gen-mcp"><img src="https://agentmods.dev/badge/skills/eclipse-langium/langium-ai/lai-gen-mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,740 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 285
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 339
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.03740
Opus 5 $0.00022 $0.01870
Sonnet 5 $0.00009 $0.00748
Haiku 4.5 $0.00004 $0.00374

Measured 11d ago against content hash a63cde788ab0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

lai-gen-mcp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/lai-gen-mcp/SKILL.md · 421 lines

How it starts

The opening of the file, as written. The whole thing — 421 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate MCP Server

This guide instructs an agent on how to generate a Model Context Protocol (MCP) server for an arbitrary Langium-based DSL. The generated server exposes a validate tool that accepts DSL source code and returns diagnostics (errors, warnings, hints, information) by running the input through the DSL's actual Langium parser and validator. Any MCP-compatible client (Claude Code, Cursor, VS Code, etc.) can then validate DSL code on the fly.

You may also use the lai and langium skills to achieve a better understanding of langium-ai and the Langium-based DSL in question.

When to Use

  • After a Langium project has been initialized with lai init and a descriptor exists
  • When you want to give an MCP-compatible AI assistant the ability to validate code written in your DSL
  • When building a feedback loop where an LLM generates DSL code and can self-check it via MCP

Prerequisites

The target Langium project must have:

  1. A working Langium grammar (.langium file) and generated TypeScript artifacts (ast.ts, grammar.ts, module file)
  2. A service creation function — every Langium project has a create<Name>Services function in its module file (e.g., createMyDslServices in src/my-dsl-module.ts). This is the entry point for all language services.
  3. Node.js and npm available in the project

Inputs

Gather the following from the project before generating:

  1. Language descriptor (language.descriptor.yml) or lai.config.jsonc — to find the grammar path, service paths, and language name
  2. The module file — contains the create<Name>Services(...) function. Typically located at src/<name>-module.ts or src/language/<name>-module.ts. The descriptor's services.module field points to it if present; otherwise search for createServices or create.*Services in the src/ directory.
  3. The language metadata — the LanguageMetaData export (usually in generated/ast.ts or generated/module.ts) tells you the language's file extensions

Read the full file on GitHub · 421 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 421 lines · 43 tokens per session scan A a63cde788ab0

Subscribe to this mod's changes

lai-gen-mcp is a skill published in the GitHub repository eclipse-langium/langium-ai (30 stars, last pushed 14d ago), licensed MIT. It adds 43 tokens to every session and 3,740 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

build-and-test

How to build and test .NET projects in the Agent Framework repository. Use this when verifying or testing changes.

microsoft/agent-framework · 26 tokens

python-feature-lifecycle

Guidance for package and feature lifecycle in the Agent Framework Python codebase, including stage meanings, feature-stage decorators, feature enums, and how to move APIs from one stage to the next.

microsoft/agent-framework · 43 tokens

python-code-quality

Code quality checks, linting, formatting, and type checking commands for the Agent Framework Python codebase. Use this when running checks, fixing lint errors, or troubleshooting CI failures.

microsoft/agent-framework · 40 tokens

python-development

Coding standards, conventions, and patterns for developing Python code in the Agent Framework repository. Use this when writing or modifying Python source files in the python/ directory.

microsoft/agent-framework · 35 tokens

azure-resource-manager-postgresql-dotnet

Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…

microsoft/skills · 97 tokens

azure-identity-py

Azure Identity SDK for Python authentication with Microsoft Entra ID. Use for DefaultAzureCredential, managed identity, service principals, and token caching. Triggers: "azure-identity", "DefaultAzureCredential", "authentication", "managed identity", "service principal", "credential".

microsoft/skills · 60 tokens