GovBR-DS MCP
GovBR DS MCP
Сервер Model Context Protocol (MCP) с открытым исходным кодом для Дизайн-системы Федерального правительства Бразилии (GovBR-DS).
govbr-ds-mcp предоставляет ИИ-агентам структурированный доступ к документации GovBR-DS, её компонентам, рекомендациям по доступности, поиску, Resources и переиспользуемым рабочим процессам для разработки.
Цель — позволить таким инструментам, как Codex, Claude Code, Kiro и другим клиентам, совместимым с MCP, понимать и использовать GovBR Design System на основе его синхронизированной официальной документации, а не только полагаться на предварительные знания модели.
Пакет опубликован в npm как govbr-ds-mcp и может запускаться напрямую с помощью:
npx -y govbr-ds-mcpЭто общественный и независимый проект. Он не является официальным проектом Федерального правительства Бразилии или команды, ответственной за GovBR-DS.
Зачем нужен этот проект?
ИИ-агенты умеют быстро генерировать фронтенд-код, но не всегда знают:
какой компонент GovBR-DS следует использовать;
как должен вести себя тот или иной компонент;
какие рекомендации по доступности применимы;
какие паттерны использования рекомендуются;
где в документации GovBR-DS находится конкретная информация.
govbr-ds-mcp призван решить эту проблему, предоставляя документацию GovBR-DS через Model Context Protocol.
Agente de IA
│
▼
govbr-ds-mcp
│
├── Tools
├── Resources
├── Prompts
└── Busca
│
▼
Dados estruturados locais
▲
│
Sincronização da documentação
▲
│
Repositório oficial GovBR-DSСервер MCP не использует LLM внутри себя и не выполняет внешних запросов во время обычной работы.
Related MCP server: PortOne Global MCP Server
Возможности
Синхронизация документации
Документация получается из официального репозитория GovBR-DS и преобразуется в локальные структурированные данные.
GitLab GovBR-DS
│
▼
GitLab API
│
▼
Parser Markdown
│
▼
Componentes estruturados
│
▼
components.generated.tsСгенерированные данные хранятся локально, что позволяет серверу MCP работать без доступа к интернету после синхронизации.
В настоящее время проект синхронизирует 37 документированных компонентов GovBR-DS.
MCP Tools
list_components
Выводит список доступных компонентов GovBR-DS в локальном индексе документации.
Пример:
{}Ответ:
[
{
"name": "Button",
"slug": "button",
"description": "..."
},
{
"name": "Input",
"slug": "input",
"description": "..."
}
]get_component
Возвращает полную структурированную документацию конкретного компонента GovBR-DS.
Пример:
{
"name": "button"
}Поиск не различает прописные и строчные буквы.
Следующие вызовы эквивалентны:
button
Button
BUTTONsearch_docs
Выполняет поиск по локально синхронизированной документации GovBR-DS.
Пример:
{
"query": "como usar um botão",
"limit": 5
}Поисковый механизм поддерживает:
поиск без учёта регистра;
поиск без учёта диакритических знаков;
удаление стоп-слов на португальском языке;
алиасы компонентов;
канонизацию морфологических вариаций;
приоритизацию идентифицированного компонента;
ранжирование по релевантности разделов;
генерацию релевантных сниппетов;
фильтр по компоненту.
Пример:
{
"query": "acessibilidade aria",
"component": "button",
"limit": 5
}Поиск полностью выполняется в памяти.
Не используются:
эмбеддинги;
векторная база данных;
Elasticsearch;
LLM;
внешние поисковые сервисы.
MCP Resources
Документация GovBR-DS также доступна через MCP Resources.
Каталог компонентов
govbr-ds://catalogПредоставляет индекс всех синхронизированных компонентов.
Документация компонента
govbr-ds://components/{slug}Пример:
govbr-ds://components/buttonВозвращает полную документацию компонента в формате Markdown.
Документация по доступности
govbr-ds://components/{slug}/accessibilityПример:
govbr-ds://components/button/accessibilityВозвращает доступные рекомендации по доступности для компонента.
Не все компоненты GovBR-DS имеют специальную документацию по доступности.
Resources полностью генерируются из локально синхронизированных данных.
MCP Prompts
Сервер предоставляет переиспользуемые Prompts для типовых рабочих процессов разработки с GovBR-DS.
implement_govbr_component
Предоставляет официальную синхронизированную документацию компонента и инструкции для помощи в его реализации.
Пример:
{
"component": "button",
"requirements": "Preciso de uma ação principal para confirmar o formulário."
}Prompt предоставляет модели релевантную документацию компонента, чтобы реализация была основана на GovBR-DS.
review_govbr_component
Предоставляет документацию компонента вместе с фрагментом кода, который необходимо проверить.
Пример:
{
"component": "button",
"code": "<button class=\"br-button\">Enviar</button>"
}Проверка может затем сравнить предоставленную реализацию с рекомендациями, доступными в синхронизированной документации.
check_govbr_accessibility
Предоставляет рекомендации по доступности компонента для помощи в проверке реализации.
Пример:
{
"component": "button",
"code": "<button class=\"br-button circle\"><i class=\"fas fa-plus\"></i></button>"
}Сервер MCP не выполняет и не интерпретирует полученный код.
Код обрабатывается только как текст и предоставляется в качестве контекста для подключённой модели.
Архитектура
src/
├── data/
│ ├── components.ts
│ └── components.generated.ts
│
├── ingestion/
│ ├── gitlab-client.ts
│ ├── component-parser.ts
│ └── component-sync.ts
│
├── services/
│ ├── component.service.ts
│ └── search.service.ts
│
├── tools/
│ ├── list-components.ts
│ ├── get-component.ts
│ └── search-docs.ts
│
├── resources/
│ ├── register-resources.ts
│ ├── component.resource.ts
│ └── accessibility.resource.ts
│
├── prompts/
│ ├── register-prompts.ts
│ ├── implement-component.prompt.ts
│ ├── review-component.prompt.ts
│ └── accessibility-review.prompt.ts
│
├── formatters/
│ └── component-markdown.ts
│
├── types/
│
└── index.ts
scripts/
└── sync-components.tsОсновной поток приложения:
Cliente MCP
│
▼
govbr-ds-mcp
│
┌─────────────┼─────────────┐
│ │ │
Tools Resources Prompts
│ │ │
└─────────────┼─────────────┘
▼
Services locais
│
▼
Dados sincronizados
▲
│
sync:components
▲
│
GovBR-DS oficialБыстрый старт
Node.js 22+
npm
Нет необходимости клонировать или устанавливать пакет глобально. MCP-клиенты могут запускать опубликованный сервер напрямую через npx:
npx -y govbr-ds-mcpСервер использует MCP-транспорт stdio и работает с данными GovBR-DS, включёнными в пакет, без HTTP-вызовов во время запросов.
Настройка в MCP-клиентах
Claude Desktop
Добавьте сервер в файл конфигурации Claude Desktop:
{
"mcpServers": {
"govbr-ds": {
"command": "npx",
"args": ["-y", "govbr-ds-mcp"]
}
}
}После сохранения файла перезапустите Claude Desktop.
См. также документацию MCP для Claude.
Claude Code
Зарегистрируйте сервер через терминал:
claude mcp add govbr-ds -- npx -y govbr-ds-mcpИспользуйте claude mcp list, чтобы подтвердить регистрацию.
Codex
Добавьте в файл ~/.codex/config.toml:
[mcp_servers.govbr-ds]
command = "npx"
args = ["-y", "govbr-ds-mcp"]Также можно зарегистрировать через терминал:
codex mcp add govbr-ds -- npx -y govbr-ds-mcpПерезапустите Codex после ручного изменения конфигурации.
См. также документацию MCP для Codex.
Kiro
В Kiro откройте или создайте .kiro/settings/mcp.json в рабочей области. Чтобы сделать сервер доступным глобально, используйте ~/.kiro/settings/mcp.json:
{
"mcpServers": {
"govbr-ds": {
"command": "npx",
"args": ["-y", "govbr-ds-mcp"],
"disabled": false,
"autoApprove": []
}
}
}После сохранения откройте панель MCP в Kiro и убедитесь, что govbr-ds подключён.
См. также документацию MCP для Kiro.
Локальная разработка
Клонируйте репозиторий и установите зависимости:
git clone https://github.com/FelipeVergaraChico/govbr-ds-mcp.git
cd govbr-ds-mcp
npm installЗапуск сервера MCP
Запустите сервер в режиме разработки:
npm run devСервер использует MCP-транспорт stdio.
Поскольку stdout зарезервирован для связи по протоколу MCP, логи приложения должны отправляться в stderr.
Избегайте:
console.log("Servidor iniciado");Предпочитайте:
console.error("Servidor iniciado");MCP Inspector
Проект можно протестировать с помощью MCP Inspector.
Выполните:
npx @modelcontextprotocol/inspector npx -y govbr-ds-mcpВ Inspector можно протестировать доступные функции.
Tools
list_components
get_component
search_docsResources
govbr-ds://catalog
govbr-ds://components/{slug}
govbr-ds://components/{slug}/accessibilityPrompts
implement_govbr_component
review_govbr_component
check_govbr_accessibilityСинхронизация документации GovBR-DS
Для обновления локального индекса:
npx tsx scripts/sync-components.tsПроцесс синхронизации:
обращается к публичному репозиторию GovBR-DS через API GitLab;
определяет документированные компоненты;
загружает Markdown-файлы каждого компонента;
загружает документацию по доступности, если она доступна;
интерпретирует Markdown-файлы;
нормализует данные;
генерирует локальный набор данных, используемый MCP.
Сгенерированные данные хранятся в:
src/data/components.generated.tsФайл генерируется автоматически и не должен редактироваться вручную.
Во время обычной работы сервер MCP не обращается к GitLab.
Это позволяет использовать Tools, Resources, Prompts и поиск даже без подключения к интернету.
Запуск тестов
Выполните:
npm testНабор тестов покрывает такие области, как:
разбор Markdown;
поиск компонентов;
поиск без учёта регистра;
нормализация диакритических знаков;
алиасы;
канонизация;
ранжирование поиска;
генерация сниппетов;
MCP Tools;
MCP Resources;
MCP Prompts;
форматирование документации;
обработка несуществующих компонентов.
Модульные тесты не зависят от доступности GitLab.
Разработка
Установите зависимости:
npm installЗапустите сервер:
npm run devЗапустите тесты:
npm testОбновите локальную документацию:
npx tsx scripts/sync-components.tsОткройте MCP Inspector:
npx @modelcontextprotocol/inspector npx tsx src/index.tsИсточник данных
Документация, используемая этим проектом, получена из официального репозитория GovBR Design System:
Текущий процесс загрузки в основном использует:
ds/componentes/Документация компонентов обычно имеет структуру, похожую на:
ds/componentes/button/
├── button.md
├── button-access.md
└── imagens/Основной файл обычно содержит такую информацию, как:
описание;
использование;
анатомия;
типы;
поведение;
спецификации.
Если доступен, файл *-access.md содержит специальные рекомендации по доступности.
Не все компоненты имеют одинаковый набор файлов.
Процесс синхронизации разработан для обработки этих различий без прерывания генерации набора данных.
Принципы проекта
Сначала официальная документация
Когда это возможно, информация, предоставляемая MCP, должна основываться на синхронизированной официальной документации GovBR-DS.
Цель — уменьшить ситуации, когда ИИ-агент выдумывает правило или поведение, которого нет в Дизайн-системе.
Независимость от LLM
Сервер MCP не зависит от:
OpenAI;
Anthropic;
Google;
локальных моделей;
любого другого поставщика ИИ.
Модель является ответственностью подключённого MCP-клиента.
Локальный рантайм
Внешние запросы используются во время синхронизации документации, а не во время обычных запросов к MCP.
npx tsx scripts/sync-components.ts
│
└── Internet necessária
npm run dev
│
└── Documentação localПростой поиск вместо сложной инфраструктуры
Текущий поиск использует детерминированное текстовое ранжирование.
Проект не зависит от:
эмбеддингов;
векторной базы данных;
RAG-инфраструктуры;
внешнего поискового сервиса.
Для текущего объёма документации хорошо структурированный локальный поиск сохраняет проект более простым, предсказуемым и лёгким.
Небольшие ответы
Tool search_docs возвращает релевантные сниппеты вместо отправки целых документов модели.
Это помогает уменьшить:
объём контекста;
потребление токенов;
нерелевантную информацию;
чрезмерно большие ответы.
Когда необходим полный документ, агент может использовать get_component или MCP Resources.
Дорожная карта
Завершено
сервер MCP с транспортом
stdioсписок компонентов
индивидуальный запрос компонентов
синхронизация документации GovBR-DS
структурированный парсер Markdown
автоматическая генерация локального набора данных
локальный поиск по документации
ранжирование по релевантности
нормализация запросов на португальском языке
MCP Resources
Resources по доступности
каталог компонентов
MCP Prompts
автодополнение компонентов в Prompts
Запланировано
официальные примеры реализации HTML и CSS
интеграция с
@govbr-ds/coreдокументация GovBR Web Components
документация GovBR React Components
примеры реализации по компонентам
валидация кода GovBR-DS
помощники для валидации доступности
публикация в npm
публикация в MCP Registry
HTTP-транспорт
Связанный проект
Этот MCP был разработан как дополнение к навыку govbr-design-system.
У двух проектов разные обязанности:
govbr-design-system
│
└── Instruções, regras e boas práticas
para orientar agentes de IA
govbr-ds-mcp
│
└── Documentação, busca, Resources,
Tools e PromptsИх можно использовать вместе с совместимыми агентами.
Концептуально:
Agente de IA
│
┌───────────┴───────────┐
│ │
Skill MCP
│ │
Como se comportar O que a documentação diz
Boas práticas Componentes
Regras de uso Acessibilidade
Orientações Busca
ResourcesКак внести вклад
Вклад приветствуется.
Некоторые интересные области для вклада:
улучшение парсера документации;
улучшение релевантности поиска;
создание новых тестов;
поддержка новых официальных источников GovBR-DS;
улучшение совместимости с MCP-клиентами;
поддержка официальных библиотек;
выявление недокументированных компонентов;
исправление некорректно интерпретированных данных.
Перед отправкой Pull Request:
npm testТакже убедитесь, что проект продолжает проходить typecheck/build, используемый в репозитории.
Предупреждение
govbr-ds-mcp — это независимый проект с открытым исходным кодом.
Он не поддерживается, не одобряется и не является официально поддерживаемым Федеральным правительством Бразилии или командой, ответственной за GovBR Design System.
Документация и ресурсы GovBR-DS, используемые проектом, по-прежнему подпадают под действие лицензий и условий соответствующих оригинальных проектов.
Лицензия
См. файл LICENSE для получения информации о лицензии этого проекта.
Available Tools
3 toolsget_componentA
Obtém a documentação oficial sincronizada completa de um componente do GovBR Design System. Use quando já souber qual componente GovBR-DS precisa consultar.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The tool name and description imply a read-only operation without side effects, but it does not explicitly state that the operation is safe or what the response format will be. Since no annotations are provided, the description carries the burden but remains reasonably transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, consisting of one functional sentence and a usage note. It is well-structured and directly addresses the tool's purpose without unnecessary verbosity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description provides sufficient context for a simple retrieval tool, indicating the source (GovBR Design System) and the condition for use (knowing the component). It does not detail the output structure, but given the lack of an output schema and the straightforward nature of the operation, it is adequately complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter 'name' is defined in the schema with type and minLength but no description. The tool description implies that 'name' should be the component name, but does not provide explicit format or examples. The parameter semantics are only partially conveyed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves complete official documentation for a specific GovBR Design System component, and explicitly notes it should be used when the component name is already known, distinguishing it from the sibling tools list_components and search_docs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use the tool: 'Use quando já souber qual componente GovBR-DS precisa consultar.' This clearly indicates it is for direct retrieval by name, contrasting with listing or searching.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_componentsA
Lista os componentes documentados do GovBR Design System disponíveis neste servidor. Use para descobrir quais componentes GovBR-DS podem ser consultados.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden. It discloses an important scope constraint (components 'available on this server'), but does not describe output format, ordering, pagination, or confirm the read-only nature beyond the verb 'list'. Adequate for a simple operation, but lacks richer 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary action and resource, and every sentence adds value. No fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless listing tool with no output schema, the description is sufficiently complete: it states what is listed, the scope (this server), and the intended use case. While it doesn't specify the return shape, the simplicity of a list tool makes this an acceptable gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema covers 100% (empty schema). Baseline for 0 params is 4. The description adds no parameter-specific meaning, but none is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool 'Lists the documented components of GovBR Design System available on this server' with a specific verb and resource. It also distinguishes itself from siblings by framing this as the discovery gateway for which GovBR-DS components can be queried, contrasting with get_component and search_docs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage context: 'Use to discover which GovBR-DS components can be consulted.' This tells the agent when to invoke the tool, though it does not explicitly name alternatives or exclusionary conditions. A clear, non-exhaustive guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_docsA
Pesquisa na documentação oficial sincronizada do GovBR Design System (GovBR-DS). Use esta ferramenta sempre que precisar responder perguntas sobre componentes, uso, comportamento, acessibilidade, padrões ou recomendações do GovBR-DS. Prefira esta fonte em vez de pesquisa web para dúvidas sobre GovBR-DS.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| component | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not mention side effects, read-only nature, authentication, rate limits, or any behavioral traits beyond the obvious 'search' action. The description adds no insight into what happens during the search or what the response contains.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences, front-loaded with purpose, and goes straight to the point. No fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is moderately simple but has no output schema, no annotations, and no parameter documentation. The description covers the what and when but omits return format, query construction, component filter usage, and potential limitations. Given the available structured data, it remains incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
schema_description_coverage is 0% and the description does not reference any parameters (query, limit, component). It only implies searching for components but does not explain how to use parameters or their semantics. The description fails to compensate for the low schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states 'Pesquisa na documentação oficial sincronizada do GovBR Design System' (searches the official synchronized documentation), which clearly identifies the action (search) and resource (GovBR-DS docs). It distinguishes from siblings like list_components and get_component by focusing on searching across documentation rather than retrieving specific component details.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides explicit guidance on when to use the tool ('sempre que precisar responder perguntas sobre componentes, uso, comportamento, acessibilidade, padrões ou recomendações do GovBR-DS') and even recommends it over web search for GovBR-DS questions. It lacks an explicit 'when not to use' relative to sibling tools, but the context is clear.
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.
3 tool updates
v0.1.0- First observed
get_component - First observed
list_components - First observed
search_docs
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: list_components is for discovery, get_component is for retrieving full docs of a known component, and search_docs is for answering arbitrary questions across the documentation. Their usage guidance avoids ambiguity.
All tools follow a consistent verb_noun pattern: list_components, get_component, and search_docs. The naming clearly signals the operation being performed, and any plural/singular variation follows conventional API naming.
With three tools, the server is lean but well-scoped for its purpose of querying GovBR-DS documentation. Each tool earns its place by covering a distinct access mode: browsing, direct retrieval, and searching.
For a read-only documentation server, the surface is complete: users can discover available components, fetch complete documentation for a known component, and search for behavioral or accessibility guidance. No obvious dead ends or missing operations exist for the stated domain.
Maintenance
Related MCP Connectors
Serves your design system and coding standards to coding agents, so they stop guessing.
Access and maintain design system docs, tokens, components, skills, and contexts across any project.
Connect AI agents to ProductNow's context engine to search, create, review, and act.
Give your agent a real design system: tokens, measured WCAG contrast, and rules to follow.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol implementation that enables AI-powered access to documentation resources, featuring URI-based navigation, template matching, and structured documentation management.9MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching and reading of PortOne documentation, including OpenAPI schemas and product guides, through the Model Context Protocol. It allows AI agents to easily access and integrate payment-related technical specifications into their workflows.8 npmISC
- AlicenseAqualityDmaintenanceProvides AI assistants with direct access to the complete Godot Engine documentation, including classes, tutorials, and features. It enables developers to retrieve and analyze official documentation through natural language interfaces using the Model Context Protocol.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to query Brazilian public data such as CEP, CNPJ, DDD, exchange rates, banks, and holidays via the Model Context Protocol.12MIT