Skip to main content
Glama
htshongany

Baseline Checker

by htshongany
README.md
# Baseline Checker MCP Server

MCP server to check web feature compatibility with Baseline standards.

**Baseline Tooling Hackathon** - Accelerate availability of modern web features

## Installation

```bash
npm install
npm run build
```

## MCP Configuration

### VSCode
```json
{
  "servers": {
    "baseline-checker": {
      "command": "node",
      "args": ["/<absolute path to your project>/dist/index.js"]
    }
  }
}
```

### Cursor / Other editors
```json
{
  "mcpServers": {
    "baseline-checker": {
      "command": "node",
      "args": ["/<absolute path to your project>/dist/index.js"]
    }
  }
}
```

## Test with MCP Inspector

You can test this MCP server with the inspection tool:

```bash
npx @mcpjam/inspector@latest
```

More info: https://github.com/MCPJam/inspector

## Available Tools

### 1. `check_baseline`
Analyzes complete HTML/CSS/JavaScript code for Baseline compatibility.

**Input**: Complete code to analyze
**Output**: Detailed compatibility report with:
- Compatibility percentage
- Detected web features grouped by status (Baseline, Non-Baseline, Discouraged)
- Browser support warnings
- Specific recommendations and alternatives

**Usage**: "Analyze this code for Baseline compatibility: [paste your code]"

### 2. `check_baseline_from_selection` 
Automatic code retrieval tool.

**Input**: Source type (`selection`, `active_file`, or `clipboard`)
**Output**: Instructions for the AI agent to:
- Use editor tools to access the selected/active code
- Pass the retrieved code to the `check_baseline` tool
- Provides guidance for proper workflow integration

**Purpose**: Directs AI agents to use proper workflow for code analysis 


## Usage Examples

- "Analyze this code for Baseline compatibility: [your code]"
- "Check if this HTML/CSS/JS is Baseline compatible"
- Use `check_baseline` tool with your code for immediate analysis

## Resources

- [MCP Documentation](https://modelcontextprotocol.io/docs/develop/build-server#node)
- [Web Features](https://web.dev/articles/baseline-tools-web-features)

TDQS

A3.7/5.0

Scored across 2 tools

Disambiguation4/5

Both tools perform Baseline compatibility analysis, but their input mechanisms are clearly distinguished: one takes explicit code, the other auto-retrieves the current selection/file. The descriptions make the intended use cases distinct enough to avoid most misselection.

Naming Consistency5/5

Both tools use a consistent snake_case verb_noun pattern with a shared 'check_baseline' prefix. The suffix clearly denotes the variant.

Tool Count4/5

Two tools is on the low end, but appropriate for a narrow single-purpose checker. One tool handles explicit code and the other handles automatic editor retrieval, so each earns its place without redundancy.

Completeness4/5

The server covers the core workflow of checking Baseline compatibility, both for pasted code and current editor context. Minor gaps like batch or directory-level checks exist, but the primary use cases are well covered.

Maintenance

ActivityInactive
ResponsivenessNo issues