Skip to content
AI, MCP, Developer Tools, UX/UI, Knowledge Base

UX-KB – UI/UX Knowledge Base for AI Agents

An MCP-powered UX knowledge base that helps AI coding agents make better design decisions using structured guidelines, relevant documentation and citation verification.

Problem

AI coding agents can generate interfaces quickly, but often lack the structured UX knowledge needed to make good design decisions. Their recommendations can be inconsistent, accessibility guidance may be incomplete, and design claims are difficult to trace back to their sources.

I wanted to build a knowledge system that gives agents relevant UX guidance at each stage of a design workflow instead of relying on one large collection of generic instructions.

Approach

Built UX-KB as a TypeScript-based knowledge platform with an MCP server and a web application. The system organizes UX knowledge into topic documents and workflow-specific stage packs.

Agents can retrieve relevant guidance, access checklists, track which documents they have fetched, and verify citation references before presenting their work.

The workflow also includes an independent critique stage, with implementation gated behind explicit user approval.

Architecture
  • Frontend: Next.js, React, TypeScript, Tailwind CSS
  • Backend: Next.js API routes and MCP Streamable HTTP transport
  • MCP: Seven tools and three resources for knowledge retrieval and workflow execution
  • Knowledge Base: 73 topic documents, six workflow stage packs, and versioned releases
  • Database: PostgreSQL with Prisma ORM
  • Authentication: GitHub OAuth, scoped API keys, and OAuth 2.1 with Dynamic Client Registration
  • Security: HMAC-SHA256 API key hashing, rate limits, request validation, and owner-scoped access
Challenge

The main challenge was making knowledge retrieval reliable enough for AI agents to follow a structured UX process.

A simple search endpoint would return relevant documents, but it would not ensure that agents followed the correct workflow or referenced the guidance they actually retrieved.

I addressed this by introducing session-scoped retrieval. Each session is pinned to a knowledge-base version, stage packs provide workflow-specific documents, and citation verification checks whether referenced documents were actually fetched.

Another challenge was maintaining useful knowledge across 73 topic documents. I improved the content structure with topic-specific failure modes, decision guidance, interface states, references, and related-document links instead of repeating generic rules.

Key Capabilities
  • Six-stage UX workflow: Need Check, Research, Audit, Proposal, Critique, and Implement
  • 73 structured UX knowledge documents
  • Seven MCP tools for sessions, retrieval, checklists, citation verification, and gap reporting
  • Three MCP resources for document, stage-pack, and core-guidance access
  • Session-scoped document retrieval and citation-history verification
  • OAuth 2.1, Dynamic Client Registration, PKCE, and token revocation
  • API key lifecycle management, rate limiting, and usage tracking
  • Admin dashboard for managing the knowledge platform
Engineering Outcomes
  • Structured UX knowledge into 73 topic-specific documents.
  • Implemented six workflow stages with version-pinned retrieval.
  • Added citation-history checks to identify unfetched, unknown, and deprecated document references.
  • Introduced OAuth 2.1 and API key authentication for MCP access.
  • Added security controls for request limits, access scopes, quotas, and key revocation.
  • Established a strict content validation workflow for maintaining knowledge quality.
What I Learned

Building a knowledge base for AI agents is not just about collecting documentation. Retrieval, workflow context, versioning, security, and traceability all affect how reliably an agent uses that knowledge.

UX-KB helped me explore how MCP can turn a static knowledge library into a structured tool that AI agents can use throughout a real development workflow.

Live ProjectSource Code

Was this project helpful?

Comments

Be the first to comment

Be the first to share your thoughts.

Interested in working together?

I'm always open to discussing new projects and product ideas.