Skip to main content
Glama
MauricioPerera

content-contracts-mcp-server

content-contracts-mcp-server

Build and test

MCP server que expone como tools la validación de los protocolos de "content contracts" — SEO.md, PRODUCTHUNT.md, LINKEDIN.md — para que cualquier agente pueda verificar contenido generado por IA contra reglas duras concretas, sin tener que clonar/mantener los linters de referencia él mismo.

Mismo patrón que el protocolo del que viene: un techo/piso duro verificable + prosa, nunca piso duro por presencia literal — evita el keyword stuffing sin sacrificar la posibilidad de verificar el contenido de forma automática. Ver el repo del protocolo para el razonamiento completo de cada regla.

Por qué existe

El protocolo (SEO.md/PRODUCTHUNT.md/LINKEDIN.md + los linters de referencia en Node) es open source y gratis — pero un equipo que genera contenido con IA a escala no quiere clonar 3 repos y mantener su propia copia del linter actualizada. Este server es esa capa: los mismos 4 tools de validación, disponibles por MCP para que cualquier agente (Claude, u otro cliente MCP) los llame directo, sin filesystem compartido — el config y el contenido viajan como parámetros del tool call, no como rutas de archivo.

Related MCP server: agentvet-mcp

Tools

Tool

Qué valida

lint_web_content

Páginas HTML contra un SEO.md (título/descripción, keywords, links, JSON-LD)

lint_producthunt_post

Tagline/descripción/galería contra un PRODUCTHUNT.md

lint_linkedin_content

Copy de feed y/o artículo de newsletter contra un LINKEDIN.md

export_json_ld

Genera el <script type="application/ld+json"> desde schema: — templating puro, sin LLM

Cada tool recibe config como el YAML de frontmatter tal cual (el bloque entre los --- de tu .md), y el contenido a validar como parámetros estructurados — no rutas de archivo, para que funcione igual de local que remoto.

Instalar y correr

npm install
npm run build
npm start          # corre por stdio

Probarlo

npm test           # build + smoke test real: levanta el server como
                    # subproceso, se conecta como cliente MCP de verdad,
                    # llama a los 4 tools con fixtures que sabemos que
                    # pasan/fallan — no son mocks del server.

Usarlo como MCP server

Configuración típica (claude_desktop_config.json o equivalente):

{
  "mcpServers": {
    "content-contracts": {
      "command": "node",
      "args": ["/ruta/a/content-contracts-mcp-server/dist/index.js"]
    }
  }
}

Relación con seo-md

Este repo porta la lógica de validación de seo-md (src/validators/*.ts es una traducción a TypeScript de lint/*.js, sin I/O de archivos — recibe contenido en memoria, no rutas), en vez de depender de él en runtime. Es duplicación deliberada: seo-md es la implementación de referencia mínima para uso local/CLI; este repo es la capa de servicio, pensada para invocación remota. Un cambio de regla en el protocolo general debe reflejarse en los dos lugares — están, a propósito, desacoplados en release.

Licencia

MIT.

Available Tools

4 tools
export_json_ldGenerar JSON-LD desde schema: de un SEO.mdA
Read-onlyIdempotent

Genera el bloque JSON-LD () a partir del bloque schema: de un SEO.md — templating puro sobre el YAML, sin LLM de por medio, cero ambigüedad posible (SEO.md, regla 6).

Requiere que schema: tenga default_type, name y description — sin esos dos últimos no hay JSON-LD válido que generar, y el tool falla con un mensaje claro en vez de generar algo incompleto. applicationCategory/operating_system son opcionales.

Args:

  • config (string): frontmatter YAML de tu SEO.md.

  • url (string, opcional): URL de la página específica, se agrega como campo "url" del JSON-LD.

Returns: el objeto JSON-LD y el string del completo, listo para pegar en el .

ParametersJSON Schema
NameRequiredDescriptionDefault
urlNoURL de la página, si se quiere incluir un campo url en el JSON-LD.
configYesFrontmatter YAML de un SEO.md con bloque schema:.

Output Schema

ParametersJSON Schema
NameRequiredDescription
jsonLdYes
scriptTagYes

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds behavioral context beyond annotations: it is 'templating puro sobre el YAML, sin LLM', failure behavior is specified ('el tool falla con un mensaje claro'), and required input fields are listed. Annotations already declare readOnlyHint and idempotentHint, and the description does not contradict them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with args and returns, but includes slightly verbose phrasing like 'cero ambigüedad posible (SEO.md, regla 6)'. It remains efficient and each sentence serves a purpose, earning a 4 rather than lower.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists and annotations are present, the description is complete: it covers prerequisites, parameter semantics, behavior, and output. No important gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds extra semantics by explaining that config must contain a `schema:` block with specific fields (default_type, name, description) and that url is optional to add a "url" field. This enriches understanding beyond the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Genera el bloque JSON-LD (<script type="application/ld+json">) a partir del bloque `schema:` de un SEO.md'. This uses a specific verb (genera) and resource (JSON-LD block from SEO.md), and it is clearly differentiated from sibling lint tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool (to generate JSON-LD from SEO.md), including required fields and failure conditions. However, it does not explicitly mention alternatives or when not to use it, but the context is strong enough to avoid confusion with the lint siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lint_linkedin_contentLint de contenido de LinkedIn contra LINKEDIN.mdA
Read-onlyIdempotent

Valida un copy de feed y/o un artículo de newsletter de LinkedIn contra los techos duros de un LINKEDIN.md. Los dos formatos son schemas separados (feed_copy / newsletter_article) porque casi no comparten restricciones reales — mandá al menos uno de los dos, podés mandar ambos.

El contenido del artículo es estructurado (title, seoDescription, hook, contextParagraph, sections: [{heading, body}], closing), no texto libre a re-parsear con regex de headings — contar secciones es leer la longitud del array.

forbidden_structure en LinkedIn SÍ chequea "table", "raw_html" y "literal_markdown" (a diferencia de lint_web_content, donde el medio ya es HTML y solo "table" aplica) — el editor de LinkedIn no renderiza ninguno de los tres.

Args:

  • config (string): frontmatter YAML de tu LINKEDIN.md.

  • feedCopy (opcional): { text, hashtags? }.

  • newsletter (opcional): { title, seoDescription, hook?, contextParagraph?, sections: [{heading, body}], closing? }.

Returns: texto "PASS"/"FAIL" con el detalle de cada pieza enviada, más structuredContent.

ParametersJSON Schema
NameRequiredDescriptionDefault
configYesFrontmatter YAML de un LINKEDIN.md.
feedCopyNoCopy corto de feed a validar.
newsletterNoArtículo de newsletter a validar.

Output Schema

ParametersJSON Schema
NameRequiredDescription
passYes
feedCopyNo
newsletterNo

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that article content is structured ('El contenido del artículo es estructurado...') and warns against regex parsing, plus specifies the return format ('PASS'/'FAIL' with structuredContent). Annotations already declare read-only and idempotent, so this adds valuable behavioral context without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every sentence earns its place: validation scope, structured-content expectation, sibling differentiation, and parameter recap are all tightly packed. The description is well-organized and appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the rich schema and annotations, the description covers all necessary aspects: purpose, usage boundaries, behavioral quirks, return format, and parameter relationships. No significant information is missing for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Beyond the near-complete schema, the description clarifies that the two formats share almost no real restrictions, requires at least one of feedCopy/newsletter, and explains that counting sections is reading the array length. These operational details greatly help correct invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Valida un copy de feed y/o un artículo de newsletter de LinkedIn contra los techos duros de un LINKEDIN.md', using a specific verb and resource, and explicitly distinguishes itself from lint_web_content via the forbidden_structure difference. This clearly identifies the tool's scope and sets it apart from siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly contrasts with lint_web_content ('a diferencia de lint_web_content'), indicating when to use this tool for LinkedIn-specific structural checks. It also gives clear parameter guidance: 'mandá al menos uno de los dos, podés mandar ambos', which is not captured in the schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lint_producthunt_postLint de post de Product Hunt contra PRODUCTHUNT.mdA
Read-onlyIdempotent

Valida un tagline + descripción de lanzamiento de Product Hunt contra los techos duros declarados en un PRODUCTHUNT.md.

A diferencia de lint_web_content, los términos prohibidos (negative.terms) se bloquean en TODO el post, no solo en una superficie corta — no existe un uso legítimo de "votá por nosotros" en tu propio tagline o descripción (Product Hunt lo prohíbe sin matices y remueve el post).

Args:

  • config (string): frontmatter YAML de tu PRODUCTHUNT.md.

  • tagline (string), description (string): el contenido a validar.

  • imageCount (number, opcional): cantidad de imágenes en la galería, para chequear contra gallery.min_images.

Returns: texto "PASS"/"FAIL" con el detalle, más structuredContent.

ParametersJSON Schema
NameRequiredDescriptionDefault
configYesFrontmatter YAML de un PRODUCTHUNT.md.
taglineYesTagline del lanzamiento.
imageCountNoCantidad de imágenes en la galería.
descriptionYesDescripción del lanzamiento.

Output Schema

ParametersJSON Schema
NameRequiredDescription
passYes
durosYes
blandosYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that prohibited terms are enforced on the entire post without exceptions, and explains the real-world consequence (Product Hunt removes the post), adding behavioral context beyond the read-only/idempotent annotations. It does not contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the primary purpose, followed by differentiation, parameter list, and return value. The Args section is somewhat redundant with the schema, but it is the only minor waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose, usage, differences from a sibling, parameters, and return behavior ('PASS'/'FAIL' with structuredContent). Combined with annotations and an existing output schema, it provides sufficient context for the agent to decide and invoke correctly. It could mention edge cases like invalid config, but that is not critical for basic usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All 4 parameters have schema descriptions (100% coverage), so the input schema already provides clear semantics. The description's Args section briefly reiterates the parameters but adds no new meaning beyond the schema, e.g., 'imageCount' is already described as checking gallery.min_images in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool validates a Product Hunt tagline and description against hard limits in PRODUCTHUNT.md, using a specific verb ('Valida'). It explicitly contrasts with lint_web_content, distinguishing the tool's scope (whole post vs short surface).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides an explicit usage guideline by distinguishing this tool from lint_web_content: it explains that prohibited terms are blocked across the entire post, not just a short surface, which tells the agent when this tool is appropriate over the sibling. However, it does not explicitly address alternatives like lint_linkedin_content, so it is a bit incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lint_web_contentLint de contenido web contra SEO.mdA
Read-onlyIdempotent

Valida una o más páginas HTML contra los techos/pisos duros declarados en un SEO.md (protocolo: github.com/MauricioPerera/seo-md).

No escribe contenido — solo verifica lo que ya se escribió. Chequea: / dentro de sus presupuestos de caracteres (max_chars, y min_chars si está declarado), contra locale, que cada página no-pilar linkee a una pillar_page, títulos duplicados entre páginas, términos prohibidos bloqueados en / (informados, no bloqueados, si aparecen en el body — evita falsos positivos en frases comparativas), techo de densidad de keywords (nunca exige presencia), forbidden_structure (solo "table" tiene sentido en HTML), y validez del JSON-LD si está presente.

Args:

  • config (string): el bloque YAML de frontmatter de tu SEO.md, tal cual (sin los ---).

  • pages (array): páginas a validar, cada una { ruta, html }.

Returns: texto "PASS"/"FAIL" seguido del detalle por página (✗ = gate duro que bloquea, · = señal blanda informativa que nunca bloquea), más structuredContent con el resultado crudo.

Errores: si config no es YAML válido, o si a una página le falta /, se reporta como violación de gate duro, no como excepción — sigue devolviendo PASS/FAIL sobre el resto.

ParametersJSON Schema
NameRequiredDescriptionDefault
pagesYesPáginas a validar.
configYesFrontmatter YAML de un SEO.md (sin los delimitadores ---).

Output Schema

ParametersJSON Schema
NameRequiredDescription
passYes
pagesYes

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Even with annotations declaring readOnlyHint, idempotentHint, and destructiveHint, the description adds deep behavioral detail: hard vs. soft gates, 'términos prohibidos' handling in body vs. title/meta, density never requiring presence, forbidden_structure, JSON-LD validation, and error handling as violations. This goes far beyond the structured annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every sentence carries substantive information. It is front-loaded with the core purpose, then organized into validation checks, arguments, return value, and error behavior. No fluff or redundancy undermines its usefulness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, the description is remarkably complete: it covers return format ('PASS'/'FAIL' plus detailed per-page output), structuredContent, error conditions, and edge cases like false-positive prevention for forbidden terms in body. The existence of an output schema further reduces the burden, but the description is still thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% coverage with descriptions for both config and pages. The description mostly restates this info (e.g., 'config (string): el bloque YAML de frontmatter', 'pages (array): páginas a validar') without adding significant new semantic detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action: 'Valida una o más páginas HTML contra los techos/pisos duros declarados en un SEO.md'. It names the resource (HTML pages, SEO.md) and distinguishes from siblings like lint_producthunt_post and lint_linkedin_content by targeting web content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context: it is a read-only validation tool for HTML pages against SEO.md rules, and explicitly says 'No escribe contenido — solo verifica lo que ya se escribió'. However, it does not explicitly name alternative tools or state when not to use it versus the sibling linters.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedexport_json_ld
    • First observedlint_linkedin_content
    • First observedlint_producthunt_post
    • First observedlint_web_content

TDQS

A4.6/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct platform or purpose: web content, Product Hunt posts, LinkedIn content, and JSON-LD export. There is no overlap in what they validate or generate, making selection unambiguous.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern: lint_* for validation across three different content types, and export_json_ld for generation. The naming is predictable and clearly denotes the action and target.

Tool Count5/5

With exactly 4 tools, the set is well-scoped and avoids redundancy. Each tool covers a necessary function for content contract validation and schema export without excess.

Completeness5/5

The tool surface fully covers the stated domain: validating against SEO.md, PRODUCTHUNT.md, and LINKEDIN.md, plus generating JSON-LD. There are no obvious missing operations that would cause agent failures or dead ends.

Related MCP Connectors

Related MCP Servers