api-linter

api-linter is a skill for Claude Code from cyanheads/openfda-mcp-server. It costs 86 tokens per session (16,931 once invoked), scanned A, a copy of api-linter, Apache-2.0.

A reference for controlling access to MCP tools and resources. Authentication checks who is calling, authorization checks what they may use, and multi-tenancy keeps different organizations' data separated.

In plain words
What is it for?
Use it to require permissions on tools or resources, configure no-auth, JWT, or OAuth modes, and handle permissions that depend on a team or resource ID.
Why use it?
It removes the need to build the same permission checks by hand in every handler.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Part of the openfda-mcp-server plugin — 33 skills, 1 MCP server shipped together

Good fit Use it to require permissions on tools or resources, configure no-auth, JWT, or OAuth modes, and handle permissions that depend on a team or resource ID.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cyanheads/openfda-mcp-server/api-linter
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cyanheads/openfda-mcp-server --skill api-linter
Clone the repo
git clone --depth 1 https://github.com/cyanheads/openfda-mcp-server

Made for: Claude Code.

Or install openfda-mcp-server, the plugin that ships this one along with the rest of its 33 skills, 1 MCP server.

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 api-linter

README.md
[![agentmods](https://agentmods.dev/badge/skills/cyanheads/openfda-mcp-server/api-linter/github.svg)](https://agentmods.dev/skills/cyanheads/openfda-mcp-server/api-linter)
Your own site
<a href="https://agentmods.dev/skills/cyanheads/openfda-mcp-server/api-linter"><img src="https://agentmods.dev/badge/skills/cyanheads/openfda-mcp-server/api-linter/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 api-linter

Your own site · 80×15
<a href="https://agentmods.dev/skills/cyanheads/openfda-mcp-server/api-linter"><img src="https://agentmods.dev/badge/skills/cyanheads/openfda-mcp-server/api-linter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 16,931 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.
Origin 100% copy Near-identical to another mod 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.00086 $0.16931
Opus 5.5 $0.00034 $0.06772
Sonnet 5.5 $0.00017 $0.03386
Haiku 4.5 $0.00009 $0.01693

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

Security

Grade A, and why

api-linter 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 8d 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.

Origin

This is a copy

100% identical to api-linter — 21 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

framework-skills/api-linter/SKILL.md · 1,144 lines

How it starts

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

Overview

The linter validates tool, resource, and prompt definitions against the MCP spec and framework conventions. It is build-time only — not invoked at server startup. It runs in two places:

Entry point When On failure
bun run lint:mcp Manual or CI Imports every definition file, prints errors + warnings, exits non-zero on errors. A file that fails to import is an error (definition-import-failed), never a skip.
bun run devcheck Pre-commit workflow Wraps lint:mcp alongside typecheck, format, bun audit, bun outdated.

Both surface the same LintReport from validateDefinitions() (exported from @cyanheads/mcp-ts-core/linter), plus two load errors the CLI raises itself, because validateDefinitions() only receives what already loaded: definition-import-failed and server-json-parse. Each diagnostic has a stable rule ID — that's the anchor you land on via the See: framework-skills/api-linter/SKILL.md#<rule> breadcrumb appended to every message.

Severity:

  • error — MUST-level spec violation; blocks devcheck.
  • warning — SHOULD-level or quality issue; logged but devcheck continues.

Imports (if you need to run the linter programmatically):

import { validateDefinitions } from '@cyanheads/mcp-ts-core/linter';
import type { LintReport, LintDiagnostic } from '@cyanheads/mcp-ts-core/linter';

const report = validateDefinitions({ tools, resources, prompts, serverJson, packageJson });
if (!report.passed) process.exit(1);

Rule index

Grouped by family. Jump to any rule ID via its anchor.

Family Rules Section
Definition definition-invalid, definition-import-failed Definition rules
Format parity format-parity, format-parity-threw, format-parity-walk-failed, format-parity-depth-limit Format parity
Schema schema-is-object, describe-on-fields, schema-serializable, schema-unsatisfiable, header-param-designation, schema-root-meta-discarded Schema rules
Portability schema-format-portability, schema-anyof-needs-type, schema-no-discriminator-keyword, schema-no-defs, schema-root-oneof-portability, schema-dialect-tag Portability rules
Names name-required, name-format, name-unique Name rules
Tools description-required, handler-required, auth-type, auth-scope-format, annotation-type, annotation-coherence, input-alias-conflict, meta-ui-type, meta-ui-resource-uri-required, meta-ui-resource-uri-scheme, app-tool-resource-pairing, canvas-consumer-missing Tool rules
Resources uri-template-required, uri-template-valid, resource-name-not-uri, template-params-align Resource rules
Landing landing-* (23 rules — shape, tagline, logo, links, repo, envExample, connectSnippets, theme) Landing config rules
Prompts generate-required Prompt rules
Handler body prefer-mcp-error-in-handler, prefer-error-factory, preserve-cause-on-rethrow, no-stringify-upstream-error Handler body rules
Error contract (structural) error-contract-type, error-contract-empty, error-contract-entry-type, error-contract-code-type, error-contract-code-unknown, error-contract-code-unknown-error, error-contract-reason-required, error-contract-reason-format, error-contract-reason-unique, error-contract-when-required, error-contract-retryable-type, error-contract-severity-unknown, error-contract-recovery-required, error-contract-recovery-empty, error-contract-recovery-min-words Error contract rules
Error contract (conformance) error-contract-conformance, error-contract-prefer-fail, error-contract-unthrown Error contract rules
Enrichment enrichment-type, enrichment-empty, enrichment-field-type, enrichment-output-collision, enrichment-prefer-block, enrichment-trailer-render, enrichment-trailer-orphan, enrichment-trailer-unknown-field, capped-list-no-truncation Enrichment rules
server.json ~40 rules prefixed server-json-* server.json rules

Read the full file on GitHub · 1,144 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. 8d ago Changed · +1 lines f37eb9148e64
  2. 17d ago Changed · -1 lines 8c44d9d0ebf5
  3. 28d ago Changed · +160 lines 352a46f60bca
  4. 1mo ago Changed 6f6aa0d94299
  5. 1mo ago First seen · 984 lines · 86 tokens per session scan A 8f2c3de62558

Subscribe to this mod's changes

api-linter is a skill published in the GitHub repository cyanheads/openfda-mcp-server (4 stars, last pushed 3d ago), licensed Apache-2.0. It adds 86 tokens to every session and 16,931 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to api-linter, differing in 21 lines, and is treated as a copy.

Related

Other skills, from other repositories

opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — Diagnostics issues first, then errors, failed tool calls, latency, regressions, and low online-eval scores. With the Opik MCP connected it lists the project's agentinsightsissue entities, offers to turn Diagnostics on when the project has it…

comet-ml/opik-mcp · 187 tokens

opik-test

Turn a failing Opik trace (or a described failure) into a repeatable regression check — a test-suite item with the trace's input and one or two binary assertions — so a fix can be verified by the compare skill. Works over the SDK; uses the MCP write tool when connected. Returns the suite, the item, and the assertion.…

comet-ml/opik-mcp · 141 tokens

qmclaw-workbench

A local simulator for superconducting quantum-bit experiments, including measurements used to study and tune a qubit. It produces bounded synthetic results without connecting to laboratory hardware or quantum cloud services.

xi-zhao/OpenQuantum · 124 tokens

cortex-explore-memory

Explore the memory system's state, find gaps in knowledge, assess coverage, and get diagnostic information. Use when the user asks 'what does my memory look like', 'show me memory stats', 'what am I missing', 'how good is my knowledge', 'memory health', 'show coverage', 'find gaps', 'what topics are weak', or when you…

cdeust/Cortex · 91 tokens

quantum-fermi-hubbard-vqe

A variational quantum simulation of the open-boundary Fermi–Hubbard chain, a model of particles hopping between sites and interacting when they occupy the same system. It maps the model to qubits with the Jordan–Wigner transformation and searches for a low-energy state.

xi-zhao/OpenQuantum · 67 tokens

quantum-grover

A Qiskit implementation of Grover's algorithm, a quantum search method that increases the chance of finding a marked item. It can explain the method, build an explicit quantum circuit, or run it with chosen inputs.

xi-zhao/OpenQuantum · 62 tokens