Skip to main content
Glama

preact-mcp

MCP server for querying Preact documentation and ecosystem.

Installation

npm install -g preact-mcp

Related MCP server: scoutdocs-mcp

Usage with Claude

Add the server using Claude's MCP command:

claude mcp add preact-mcp

Usage with Cursor

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

{
  "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

pnpm install
pnpm build
pnpm start

License

MIT License - see LICENSE file for details.

Available Tools

3 tools
get_preact_readmeB

Get the README content from a specific Preact repository

ParametersJSON Schema
NameRequiredDescriptionDefault
repositoryYesThe repository to get README from

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the operation is a read (implied by 'Get') and returns README content, but doesn't cover output format, size, rate limits, or any authentication requirements. Adequate for a simple read, but no extra behavioral context.

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?

One efficient sentence, front-loaded with the action and resource. No wasted words. Could be improved by adding sibling differentiation, but as is, it's concise.

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

Completeness3/5

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

For a simple read tool with a single enum parameter and no output schema, the description should explain return value (e.g., raw text) and usage context relative to siblings. It's minimally complete but lacks differentiation from query_preact_docs.

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?

Schema coverage is 100%, and the single parameter is a well-documented enum with a clear description. The tool description adds no information beyond the schema about parameter semantics, so baseline 3 applies.

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

Purpose4/5

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

States a specific verb+resource: fetching README content from a Preact repository. It's clear what the tool does, but it doesn't differentiate from siblings like query_preact_docs which likely returns documentation content, creating potential ambiguity about when to use README fetch vs. doc query.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus query_preact_docs or list_preact_repositories. The description implies it fetches README for a single repository, but doesn't state when that's preferable to searching docs.

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

list_preact_repositoriesA

List all available Preact repositories that can be queried, this allows you to have information about the Preact ecosystem.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden, but for a zero-parameter enumeration tool the risk surface is small. It conveys that this is a read-style listing of queryable repositories but says nothing about the return shape, ordering, or whether the list is static or dynamic. Adequate but thin.

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?

One sentence, front-loaded with the verb and resource, with no filler. The comma splice and the trailing justification clause are slightly loose but cost little.

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

Completeness3/5

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

There is no output schema and no annotations, so the description is the only source of information about results, and it only vaguely gestures at 'information about the Preact ecosystem'. For such a simple tool this is nearly enough, but it leaves the agent guessing what the listed repositories look like.

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?

The tool takes zero parameters and has an empty schema, so there is nothing for the description to disambiguate. Baseline 4 applies.

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

Purpose4/5

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

States a specific verb (list) plus resource (Preact repositories) and adds scope ('that can be queried'), so an agent knows this is a discovery/enumeration tool. It doesn't name the sibling tools (query_preact_docs, get_preact_readme) to differentiate explicitly, which keeps it short of a 5.

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

Usage Guidelines3/5

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

The phrase 'this allows you to have information about the Preact ecosystem' hints at why you'd call it, but gives no when-to-use condition or when to prefer the siblings query_preact_docs / get_preact_readme. Usage is only implied.

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

query_preact_docsB

Query Preact documentation from multiple repositories.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query for the Preact documentation
repositoryNoWhich repository to search in (default: preact)

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral burden. Beyond stating that it queries documentation, it does not disclose whether the search is keyword or semantic, how results are returned, whether it is read-only, or any rate/auth constraints.

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 a single, front-loaded sentence with no wasted words. It is appropriately sized for a simple two-parameter query tool.

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

Completeness3/5

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

For a simple query tool with only two parameters, the description is minimally adequate. However, with no output schema and no annotations, it omits what kind of results are returned or any operational context that would help an agent invoke it confidently.

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?

Schema description coverage is 100%, so the schema already documents both the query string and the repository enum with its default. The description adds no further parameter meaning, syntax, or format details beyond what the schema provides, so the baseline 3 is appropriate.

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

Purpose4/5

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

The description gives a specific verb (query) and resource (Preact documentation) and indicates a multi-repository scope. It is clear enough to distinguish from reading a single README or listing repositories, but it does not explicitly name or contrast with the sibling tools.

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

Usage Guidelines2/5

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

No when-to-use guidance is provided. It does not explain when to choose this tool over get_preact_readme or list_preact_repositories, nor does it mention any prerequisites or exclusions.

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. 3 tool updatesv0.1.1
    • First observedget_preact_readme
    • First observedlist_preact_repositories
    • First observedquery_preact_docs

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

Related MCP Connectors

Related MCP Servers