Skip to main content
Glama
README.md
# preact-mcp

MCP server for querying Preact documentation and ecosystem.

## Installation

```bash
npm install -g preact-mcp
```

## Usage with Claude

Add the server using Claude's MCP command:

```bash
claude mcp add preact-mcp
```

## Usage with Cursor

Add to your Cursor settings (Settings → Extensions → MCP):

```json
{
  "mcpServers": {
    "preact": {
      "command": "npx",
      "args": ["preact-mcp"]
    }
  }
}
```

Or add to your `.cursorrules` file:

```
MCP Server: preact-mcp
Command: npx preact-mcp
Description: Query Preact documentation and ecosystem
```

## Available Tools

- **query_preact_docs** - Search Preact documentation
- **get_preact_readme** - Get README from any Preact repository  
- **list_preact_repositories** - List all available Preact packages

## Supported Repositories

- **preact** - Core Preact library with React compatibility
- **preact-iso** - Isomorphic router and SSR utilities  
- **@preact/signals-core** - Core reactive state management
- **@preact/signals** - Preact-specific signals implementation
- **@preact/signals-react** - React compatibility for signals
- **@preact/preset-vite** - Vite preset for Preact
- **create-preact** - Project scaffolding tool
- **playwright-ct** - Component testing with Playwright
- **vitest-browser-preact** - Browser testing with Vitest
- **htm** - JSX alternative using template literals

## Configuration Paths

- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Linux**: `~/.config/Claude/claude_desktop_config.json`

## Development

```bash
pnpm install
pnpm build
pnpm start
```

## License

MIT License - see [LICENSE](LICENSE) file for details.

TDQS

A3.6/5.0

Scored across 3 tools

Disambiguation4/5

The three tools have mostly distinct purposes: listing repositories, querying docs, and fetching a README. However, query_preact_docs and get_preact_readme could overlap conceptually since a README is documentation, creating minor ambiguity about which to use for repo-specific content.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with the same preact prefix: query_preact_docs, get_preact_readme, and list_preact_repositories. The convention is predictable and easy to parse.

Tool Count5/5

With only 3 tools, the set is well-scoped for a focused Preact documentation server. Each tool earns its place by covering discovery, querying, and README retrieval without unnecessary extras.

Completeness4/5

The surface covers the core documentation workflow: list available repositories, query docs across them, and fetch a repository README. Minor gaps remain, such as fetching a specific document by path or listing files within a repository, but agents can likely work around these via the query tool.

Maintenance

ActivityInactive
ResponsivenessNo issues