Token导航 LogoToken导航TokenDH.com
Fluentui MCP logo
开发工具未说明官方级别未说明来源级核验

Fluentui MCP

MCP Server

为AI助手提供微软FluentUI组件库的智能文档查询服务,通过12种专用工具实现高效准确的组件文档检索与建议。

工具数

12

提示词数

0

GitHub Stars

1

资源数

0
TypeScriptClaude开发工具ClaudeCursorCline

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

blendsdk

提供方

blendsdk

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

FluentUI MCP服务器

](https://www.npmjs.com/package/fluentui-mcp) ![License: MIT](https://opensource.org/licenses/MIT) ](https://nodejs.org/)

模型上下文协议(MCP)服务器 为AI助手提供智能、上下文高效的访问 Microsoft FluentUI文档。

使用FluentUI构建生产级React UI——由真正了解组件库的AI提供支持。

______________________________________________________________________

这是什么?

这是一个MCP服务器,它为AI助手(Claude、Cline、Cursor等)提供了对 微软FluentUI 组件库。而不是AI猜测组件API或 令人产生幻觉的道具,它质疑 真实文件 通过专门的工具。

问题

AI助手经常:

  • ❌ 不存在的Hallucinate FluentUI组件道具
  • ❌ 需要v9时使用过时的v8模式
  • ❌ 加载整个文档集,浪费上下文窗口
  • ❌ 缺少最佳实践、可访问性要求和模式

解决方案

此MCP服务器提供 12个专用工具 为AI助手提供:

  • ✅ 准确、最新的组件文档
  • ✅ 在100多个文档页面上进行智能搜索
  • ✅ 按需提供引用、代码示例和模式
  • ✅ 基于UI描述的组件建议
  • ✅ 结合文档+模式+示例的实施指南
  • ✅ ~与加载所有文档相比,上下文窗口减少了90%

______________________________________________________________________

快速开始

安装

npm install -g fluentui-mcp

配置Cline(VS代码)

添加到您的Cline MCP设置中:

{
    "mcpServers": {
        "fluentui-docs": {
            "command": "fluentui-mcp"
        }
    }
}

设置文件位置:

  • macOS:

~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

  • 窗户: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

配置Claude桌面

增添 claude_desktop_config.json:

{
    "mcpServers": {
        "fluentui-docs": {
            "command": "fluentui-mcp"
        }
    }
}

就是这样! 🎉

重新启动您的AI助手,您将可以访问所有FluentUI文档工具。

______________________________________________________________________

多版本支持

服务器支持多个FluentUI版本。将版本作为参数传递:

{
    "mcpServers": {
        "fluentui-v9": {
            "command": "fluentui-mcp",
            "args": ["v9"]
        }
    }
}

您甚至可以同时运行多个版本:

{
    "mcpServers": {
        "fluentui-v9": {
            "command": "fluentui-mcp",
            "args": ["v9"]
        },
        "fluentui-v10": {
            "command": "fluentui-mcp",
            "args": ["v10"]
        }
    }
}

自定义文档路径

指向您自己的文档文件夹:

{
    "mcpServers": {
        "fluentui-docs": {
            "command": "fluentui-mcp",
            "env": {
                "FLUENTUI_DOCS_PATH": "/path/to/your/docs"
            }
        }
    }
}

______________________________________________________________________

可用工具(12)

核心文档工具

工具说明
query_component获取特定组件的完整文档。支持模糊名称匹配。
search_docs搜索所有文档(组件、模式、企业)。返回排名结果。
list_by_category列出类别中的所有组件(按钮、窗体、导航等)。
get_foundation获取设置、主题、样式和架构文档。
get_pattern获取UI模式文档(表单、布局、导航、模态、状态管理)。
get_enterprise获取企业级模式(仪表板、管理UI、数据密集型应用程序、可访问性)。

情报工具

工具说明
suggest_components给出UI描述,建议使用哪些FluentUI组件以及为什么使用。
get_implementation_guide将相关文档+模式+示例组合成一个分步实现指南。
get_component_examples仅从组件的文档中提取代码示例(尽量减少上下文使用)。
get_props_reference仅从组件的文档中提取props表(快速查找)。

实用工具

工具说明
list_all_docs列出所有可用的文档及其说明。
reindex重新扫描文档文件夹并重建搜索索引。

______________________________________________________________________

运作原理

建筑

┌──────────────────────────────────────────────────┐
│               MCP Server (stdio)                 │
│    Receives tool calls from AI assistants        │
├──────────────────────────────────────────────────┤
│            12 Specialized Tools                  │
│   query │ search │ suggest │ guide │ ...         │
├──────────────────────────────────────────────────┤
│         In-Memory Document Store                 │
│   ┌───────────┐ ┌────────────┐ ┌──────────┐      │
│   │ Documents │ │ Categories │ │  Search  │      │
│   │   Map     │ │   Index    │ │  Index   │      │
│   └───────────┘ └────────────┘ └──────────┘      │
├──────────────────────────────────────────────────┤
│   Scanner │ Metadata Extractor │ Search Engine   │
├──────────────────────────────────────────────────┤
│         Bundled Documentation (Markdown)         │
│  Foundation │ Components │ Patterns │ Enterprise │
└──────────────────────────────────────────────────┘

指数化策略

  1. 初创公司:服务器递归扫描docs文件夹(\<1秒)
  2. 索引:使用TF-IDF评分构建内存搜索索引
  3. 服务:从内存提供的所有工具调用(即时,无磁盘I/O)
  4. 重新索引:The reindex 该工具可以按需刷新索引

文件覆盖范围

模块内容文件
基础设置、主题、样式、架构、可访问性7
组件47+包含道具、示例和最佳实践的组件文档50+
模式表单模式、布局模式、导航、模态、状态管理30+
企业应用程序外壳、仪表板、管理UI、数据密集型应用程序、WCAG合规性15+

______________________________________________________________________

使用示例

AI工作流程:构建登录表单

User: "Create a login form with email and password"

AI uses tools:
1. suggest_components({ uiDescription: "login form with email and password" })
   → Suggests: Input, Field, Button, Card

2. get_implementation_guide({ goal: "login form" })
   → Returns combined docs + form patterns + code examples

3. AI implements the form with accurate props and patterns

AI工作流:构建数据表

User: "Create a sortable data table with selection"

AI uses tools:
1. search_docs({ query: "table sorting selection" })
   → Finds: Table, DataGrid, sorting patterns

2. query_component({ componentName: "DataGrid" })
   → Full DataGrid documentation

3. get_component_examples({ componentName: "DataGrid" })
   → Just the code examples for reference

4. AI implements with correct DataGrid API

______________________________________________________________________

发展

设置

git clone https://github.com/blendsdk/fluentui-mcp.git
cd fluentui-mcp
yarn install

构建

yarn build          # Compile TypeScript
yarn watch          # Watch mode

测试

yarn test           # Run tests
yarn test:watch     # Watch mode
yarn test:coverage  # Coverage report

项目结构

fluentui-mcp/
├── src/
│   ├── index.ts                # MCP server entry point
│   ├── config.ts               # Configuration resolver
│   ├── types/
│   │   └── index.ts            # TypeScript type definitions
│   ├── indexer/
│   │   ├── scanner.ts          # Recursive docs directory scanner
│   │   ├── metadata-extractor.ts # Markdown metadata extraction
│   │   ├── document-store.ts   # In-memory document store
│   │   ├── search-engine.ts    # TF-IDF search engine
│   │   └── index-builder.ts    # Orchestrates indexing at startup
│   ├── tools/
│   │   ├── query-component.ts
│   │   ├── search-docs.ts
│   │   ├── list-by-category.ts
│   │   ├── get-foundation.ts
│   │   ├── get-pattern.ts
│   │   ├── get-enterprise.ts
│   │   ├── suggest-components.ts
│   │   ├── get-implementation-guide.ts
│   │   ├── get-component-examples.ts
│   │   ├── get-props-reference.ts
│   │   ├── list-all-docs.ts
│   │   └── reindex.ts
│   └── __tests__/
│       ├── indexer/
│       ├── tools/
│       └── e2e/
├── docs/
│   └── v9/                     # Bundled FluentUI v9 documentation
│       ├── 00-overview.md
│       ├── 01-foundation/
│       ├── 02-components/
│       ├── 03-patterns/
│       └── 04-enterprise/
├── package.json
├── tsconfig.json
└── vitest.config.ts

______________________________________________________________________

配置

来源优先级示例
CLI参数最高fluentui-mcp v9
FLUENTUI_VERSION env var中等FLUENTUI_VERSION=v9
FLUENTUI_DOCS_PATH env var最高(覆盖版本)FLUENTUI_DOCS_PATH=/my/docs
默认最低捆绑v9文档

______________________________________________________________________

为新版本添加文档

要为新的FluentUI版本添加文档,请执行以下操作:

  1. 创建新文件夹: docs/v10/ (或任何版本)
  2. 遵循与以下相同的文件夹结构 docs/v9/:
   docs/v10/
   ├── 00-overview.md
   ├── 01-foundation/
   ├── 02-components/
   ├── 03-patterns/
   └── 04-enterprise/
  1. 服务器自动发现并索引所有markdown文件
  2. 使用 fluentui-mcp v10 为新版本服务

______________________________________________________________________

故障排除

服务器未加载

  1. 验证安装: which fluentui-mcp
  2. 手动测试: fluentui-mcp (应输出到stderr:“FluentUI MCP服务器在stdio上运行”)
  3. 检查MCP设置JSON语法
  4. 重新启动VS代码/AI助手

工具错误

  1. “找不到文档路径”:检查版本是否存在于 docs/ 文件夹
  2. “找不到组件”:试试 search_docs 用更宽泛的术语
  3. 搜索未返回任何结果:试试 reindex 重建搜索索引

演出

  • 第一个查询:\<100ms(启动索引后从内存中提供)
  • 搜索查询:\<50ms(预构建TF-IDF索引)
  • 启动索引:对于约100个markdown文件,\<1秒

______________________________________________________________________

贡献

欢迎投稿!特别是:

  • FluentUI新版本的文档
  • 附加工具和智能功能
  • 搜索引擎改进
  • Bug报告和修复

______________________________________________________________________

许可证

麻省理工学院——见 许可证 了解详情。

______________________________________________________________________

另见

目录标签

目录标签

TypeScriptClaude开发工具React组件库本地部署AI辅助开发文档检索前端开发工具微软技术栈

支持客户端

ClaudeCursorCline

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

session

工具数量(toolCount,工具数)

12

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明session部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP