Skip to content

feat: Registry Copilot - embedded AI chat assistant for registry operations, discovery, and agent design #744

@aarora79

Description

@aarora79

Problem Statement

Users of the MCP Gateway Registry currently interact with the system through a traditional web UI with forms, tables, and search interfaces. While functional, this approach requires users to know which page to visit, which buttons to click, and how to compose search queries. There is no conversational interface that lets users express intent naturally and have the system execute complex workflows on their behalf.

Additionally, AI developers who use the registry to discover assets (MCP servers, tools, agents, skills) and design new agents must manually browse, search, and mentally compose architectures. There is no guided experience that helps them go from "I need an agent that does X" to a concrete design specification.

Proposed Solution

Build Registry Copilot, an AI-powered chat assistant embedded as a collapsible right-side panel in the registry UI. The copilot is powered by LLMs via LiteLLM (default: Claude via Amazon Bedrock) and has full access to the registry API to perform operations on the user's behalf.

The feature is divided into three phases:

Phase A: Registry Operations via Chat

The copilot can perform all registry CRUD operations conversationally:

  • Register, update, delete, enable/disable MCP servers
  • Register, update, delete agents and skills
  • Search for servers, tools, agents, and skills (semantic and keyword)
  • View server health status
  • Manage virtual servers
  • View audit logs
  • Generate JWT tokens

Example: "Register a new MCP server called 'weather-api' at https://weather.example.com/mcp with tags weather and external"

Phase B: Discovery & Design

The copilot helps users discover existing assets and design agent architectures:

  • "I need an agent that can process PDFs and send emails" -> searches registry, recommends servers/tools
  • Suggests combinations of existing MCP servers, tools, and skills
  • Helps users understand what assets are available and how they relate
  • Provides architectural recommendations based on registry contents

Phase C: Agent Spec Generation

The copilot generates structured design specifications (LLD) for new agents:

  • Takes user requirements and discovered assets from Phase B
  • Produces a structured spec document with recommended tools, architecture, and framework suggestions
  • Suggests frameworks (AWS Strands, Claude Agent SDK, LangGraph) based on requirements
  • User takes the spec to their preferred coding assistant for implementation

User Stories

  • As a registry administrator, I want to manage servers and agents through natural language so that I can perform operations faster without navigating multiple pages
  • As an AI developer, I want to describe what I need an agent to do and have the copilot recommend existing registry assets so that I can build agents faster
  • As an AI developer, I want the copilot to generate a design specification for a new agent so that I can hand it to a coding assistant for implementation
  • As a registry user, I want to search for tools and servers conversationally so that I can discover relevant assets without crafting complex queries

Acceptance Criteria

Phase A: Registry Operations

  • Collapsible right-side chat panel in the UI
  • Chat messages rendered with markdown support
  • LLM integration via LiteLLM (default: Claude via Amazon Bedrock)
  • Tool-calling pattern to execute registry API operations
  • User authentication inherited from existing session
  • LLM provider API key configuration (admin setting)
  • Chat history persisted in MongoDB/DocumentDB per user
  • Conversation limits: 200k tokens, 25 messages per conversation
  • Conversation list with create/delete/switch
  • All existing registry CRUD operations available as copilot tools
  • Feature gated by COPILOT_ENABLED config flag (default: false)
  • Dedicated thread pool for LLM calls (zero overhead when disabled)
  • Destructive operations require explicit confirmation

Phase B: Discovery & Design

  • Natural language asset discovery ("find me tools for PDF processing")
  • Cross-entity search (servers + tools + agents + skills in one query)
  • Asset recommendation based on user requirements
  • Relationship mapping between assets (which servers provide which tools)
  • Architecture suggestions based on discovered assets

Phase C: Agent Spec Generation

  • Structured spec/LLD document generation
  • Framework recommendation (Strands, Claude Agent SDK, LangGraph)
  • Integration with Phase B discovery results
  • Exportable spec document (markdown download)
  • Spec includes: recommended tools, architecture, data flow, configuration

Out of Scope

  • Actual code generation (users take specs to their own coding assistant)
  • Deployment integration (no deploying to AgentCore, Lambda, etc.)
  • Cost controls or token budgets per user
  • Air-gapped/on-prem LLM support
  • Voice input/output

Technical Approach

Runtime: Agent runs in the existing FastAPI process with a dedicated ThreadPoolExecutor for LLM calls. When COPILOT_ENABLED=false (default), zero overhead -- no threads, no LLM init, routes return 404.

Frontend: React collapsible right-side panel, react-markdown for rendering, CopilotContext for state, SSE for streaming.

Backend: New FastAPI router /api/copilot/*, CopilotService with LiteLLM tool-calling orchestration, ConversationRepository for MongoDB persistence.

Storage: copilot_conversations_{namespace} and copilot_specs_{namespace} collections with TTL indexes for cleanup.

Dependencies: No new dependencies -- uses existing LiteLLM (v1.83.0), react-markdown, sse-starlette.

Metadata

Metadata

Assignees

Labels

apiAPI related issuesarchitectureArchitecture and design decisionsenhancementNew feature or requestfeature-requestNew feature or enhancement request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions