npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@syntext/mcp

v0.1.4

Published

MCP server for Syntext documentation - enables AI assistants to generate valid Syntext docs

Readme

Syntext MCP Server

npm version License: MIT

Model Context Protocol (MCP) server that enables AI assistants (GitHub Copilot, Cursor, Claude Desktop) to generate valid Syntext documentation.

What is this?

When you're using an AI coding assistant to write documentation for your Syntext-powered docs site, the AI needs to know:

  • Which MDX components are available (<Card>, <CodeGroup>, <Note>, etc.)
  • What props each component accepts
  • How to structure frontmatter for different page types
  • How to configure syntext.config.json

This MCP server provides that knowledge to your AI assistant, so it can generate correct, valid Syntext documentation without hallucinating component names or props.

Installation

npm install -g @syntext/mcp

Or with npx:

npx @syntext/mcp

Configuration

The server runs over stdio and requires no arguments, environment variables, or API keys — it is a fully offline, project-agnostic authoring assistant. (To let an AI agent query a deployed doc site's content — search, pages, Q&A — use that site's remote MCP endpoint at https://{slug}-docs.syntext.dev/_mcp instead; that is separate from this package.)

VS Code (Copilot/Claude)

Add to .vscode/mcp.json in your workspace (or your user-level mcp.json):

{
  "servers": {
    "syntext": {
      "type": "stdio",
      "command": "npx",
      "args": ["@syntext/mcp"]
    }
  }
}

Cursor

Add to your Cursor MCP config:

{
  "mcpServers": {
    "syntext": {
      "command": "npx",
      "args": ["@syntext/mcp"]
    }
  }
}

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "syntext": {
      "command": "npx",
      "args": ["@syntext/mcp"]
    }
  }
}

Usage Example

Once configured, your AI assistant can generate valid Syntext docs:

You: "Create a getting started guide for my API"

AI: (uses get_frontmatter to get guide schema, get_components to find available components)

---
title: Getting Started
description: Get up and running with our API in 5 minutes
icon: rocket
---

# Getting Started

<Note>
You'll need an API key to follow along. [Get one here](/dashboard).
</Note>

<Steps>
  <Step title="Install the SDK">
    ```bash
    npm install @acme/sdk
    ```
  </Step>
  <Step title="Initialize the client">
    ```typescript
    import { Acme } from '@acme/sdk'
    const client = new Acme({ apiKey: process.env.ACME_API_KEY })
    ```
  </Step>
</Steps>

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api-reference">
    Explore all endpoints
  </Card>
  <Card title="Examples" icon="lightbulb" href="/examples">
    See working code samples
  </Card>
</CardGroup>

The AI knows the exact props, syntax, and nesting rules because it queried the MCP server.

Tools

get_components

Get available MDX components with syntax, props, and examples.

Parameters:

  • name (optional): Specific component name to get details for
  • category (optional): Filter by category (layout, code, callouts, interactive, api, media, steps)

Example response:

{
  "name": "Card",
  "description": "Display content in a card with optional link",
  "props": [
    { "name": "title", "type": "string", "required": true, "description": "Card title" },
    { "name": "icon", "type": "string", "required": false, "description": "Icon name" },
    { "name": "href", "type": "string", "required": false, "description": "Link URL" }
  ],
  "syntax": "<Card title=\"...\">content</Card>",
  "example": "<Card title=\"Quick Start\" icon=\"rocket\" href=\"/getting-started\">\n  Get up and running in 5 minutes\n</Card>"
}

get_frontmatter

Get frontmatter schema for different page types.

Parameters:

  • pageType (optional): Type of page (guide, api-reference, changelog, landing, sdk). Omit to get all page types plus the icon list.

Example response for api-reference:

---
title: Create User
description: Create a new user account
method: POST
endpoint: /api/users
auth: required
---

get_config

Get syntext.config.json schema with field descriptions.

Parameters:

  • example (optional): "full" or "minimal" — return an example config instead of the schema

validate_mdx

Validate MDX content for errors and warnings.

Parameters:

  • content: The MDX content to validate

Example response (markdown):

❌ **Invalid Syntext MDX**

### Errors

- Missing required frontmatter field: title (line 1)

### Warnings

- <CardGroup> found without any <Card> children (line 8)

create_page

Generate a page template for a specific page type.

Parameters:

  • pageType: Type of page (guide, api-reference, quickstart, landing)
  • title: Page title
  • description (optional): Page description

Resources

syntext://components

Full component reference including all components, their props, syntax, and examples.

syntext://config

Configuration schema with example configs.

Available Components

The MCP server provides schemas for these Syntext MDX components:

| Category | Components | |----------|------------| | Layout | Card, CardGroup, Hero | | Code | CodeGroup | | Callouts | Note, Tip, Warning, Danger | | Interactive | Tabs, Expandable | | API Reference | ParamField, ResponseField | | Media | Frame, Video | | Steps | Steps, Step |

Development

npm install
npm run dev        # Run in development mode
npm test           # Run tests
npm run build      # Build for production

Structure

src/
├── index.ts              # stdio entry point
├── server.ts             # MCP server factory (tools + resources)
└── schemas/
    ├── components.ts     # Component definitions
    ├── frontmatter.ts    # Page type schemas
    ├── config.ts         # syntext.config.json schema
    └── validator.ts      # MDX validation

Troubleshooting

MCP server not connecting:

  • Ensure npx @syntext/mcp runs without errors in your terminal
  • Restart your editor after updating MCP config
  • Check that Node.js 18+ is installed

AI not using Syntext components:

  • Mention "Syntext" or "use Syntext components" in your prompt
  • The AI should automatically query get_components for available options

Validation errors:

  • Use the validate_mdx tool to check your content before saving
  • Common issues: missing frontmatter title, unclosed components

License

MIT