Back to MCP directory
publicPublicdnsLocal runtime

WCAG

一个提供WCAG内容访问的MCP服务器

article

README

🚀 WCAG MCP 服务器

WCAG MCP 服务器借助 MCP 资源,为用户提供对 WCAG(Web 内容可访问性指南)内容的便捷访问。通过该服务器,用户能够轻松获取原则和指南、成功标准、理解文档以及相关技术等重要信息。

🚀 快速开始

此 MCP 服务器通过 MCP 资源提供对 WCAG(Web 内容可访问性指南)内容的访问。

✨ 主要特性

  • 提供对 WCAG 原则和指南、成功标准、理解文档以及技术的访问。

📦 安装指南

  1. 确保已安装 Node.js。
  2. 克隆此仓库。
  3. 安装依赖项:
cd wcag-server
npm install
  1. 构建服务器:
npm run build

📚 详细文档

配置

该服务器需要访问 WCAG 仓库。您可以通过 WCAG_PATH 环境变量指定 WCAG 仓库的路径。

MCP 配置

在您的 MCP 设置文件中添加以下配置:

{
  "mcpServers": {
    "wcag-server": {
      "command": "node",
      "args": [
        "${PROJECT_PATH}/wcag-server/build/index.js"
      ],
      "env": {
        "WCAG_PATH": "${PROJECT_PATH}/wcag"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

${PROJECT_PATH} 替换为您实际的项目目录路径。

可用资源

静态资源

  • wcag://principles-guidelines - WCAG 原则和指南

资源模板

  • wcag://criteria/{criterion-id} - WCAG 成功标准
    • 示例:wcag://criteria/accessible-authentication-minimum
  • wcag://understanding/{criterion-id} - WCAG 理解文档
    • 示例:wcag://understanding/accessible-authentication-minimum
  • wcag://techniques/{technique-id} - WCAG 技术
    • 示例:wcag://techniques/H44

💻 使用示例

基础用法

访问原则和指南

const response = await client.readResource('wcag://principles-guidelines');
console.log(response.contents[0].text);

访问成功标准

const response = await client.readResource('wcag://criteria/accessible-authentication-minimum');
console.log(response.contents[0].text);

访问理解文档

const response = await client.readResource('wcag://understanding/accessible-authentication-minimum');
console.log(response.contents[0].text);

访问技术

const response = await client.readResource('wcag://techniques/H44');
console.log(response.contents[0].text);

📄 许可证

该项目根据 MIT 许可证发布。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client