api-linter

Analyze MCP tool, resource, and prompt definitions against specification rules.

148|28|Updated Mar 20, 2025
One-click install
npx skills add https://github.com/cyanheads/mcp-ts-core --skill api-linter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-linter
Source: https://github.com/cyanheads/mcp-ts-core/tree/main/skills/api-linter
Command: npx skills add https://github.com/cyanheads/mcp-ts-core --skill api-linter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The MCP linter provides clear guidance on the rules and expectations for tool, resource, and prompt definitions, helping teams diagnose and fix configuration issues that prevent startup or violate the MCP spec.

Core Features & Use Cases

  • Reference: explains each rule emitted by the linter, including severity and how to fix it.
  • Start-to-ship: helps CI and pre-commit checks catch and surface issues before deployment.
  • Use Case: when startup reports a lint error or a warning like format-parity or name-format, refer to the corresponding entry to understand the rule and remediation steps.

Quick Start

Install the MCP TS core linter and run bun run lint:mcp to validate your definitions and see actionable diagnostics.

Frequently Asked Questions about api-linter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate MCP tool definitions against schema specifications?

To validate MCP tool definitions, use an MCP linter to analyze z.object schemas against MCP specifications, surfacing errors and warnings with stable rule IDs to ensure schema integrity and high-quality tooling definitions.

What is an MCP linter and how does it work?

An MCP linter analyzes tool, resource, and prompt definitions to ensure they conform to MCP specifications and framework conventions. It surfaces errors and warnings with stable rule IDs during startup, manual linting, and pre-commit checks.

Why does my MCP startup report a lint error like name-format?

MCP startup reports lint errors like name-format or format-parity when tool, resource, or prompt definitions violate MCP specifications. Refer to the corresponding linter rule entry to understand the specific rule and remediation steps.

Can I use the MCP linter for pre-commit checks in CI?

Yes, the MCP linter supports pre-commit checks and CI pipelines. Running bun run lint:mcp validates your definitions and produces LintReport diagnostics that can be programmatically consumed to catch issues before deployment.

Does the MCP linter support resource and prompt definitions or just tools?

The MCP linter analyzes tool, resource, and prompt definitions equally. It ensures all three definition types conform to MCP specifications and framework conventions, surfacing any configuration issues with stable rule IDs.

What are the limitations of using an MCP linter for schema validation?

The MCP linter expects input definitions to be strictly z.object schemas. Definitions not structured as z.object schemas cannot be analyzed, and the linter focuses on MCP spec compliance rather than general TypeScript type checking.