FRD Orchestrator
# FRD Orchestrator - MCP Server
๐ **Automated NestJS boilerplate generation powered by MCP and structured FRDs**
MCP (Model Context Protocol) server that exposes NestJS boilerplate FRDs so **GitHub Copilot** can regenerate the complete architecture from scratch in any project, following **Clean Architecture, SOLID principles, and best practices**.

## ๐ค What is MCP and why use it?
**MCP (Model Context Protocol)** is a standardized way for AI assistants like **GitHub Copilot** to access external tools and data sources. Think of it as a "bridge" that allows Copilot to:
- ๐ **Read live documents** (your FRDs) instead of outdated copies
- ๐ง **Access specialized tools** beyond basic file operations
- ๐ **Get structured data** with validation and logging
- ๐ **Always stay updated** - changes to FRDs are immediately available
### Why FRDs via MCP instead of just reading files?
| Traditional File Reading | MCP + FRDs |
|-------------------------|------------|
| โ Stale content when files change | โ
Always fresh content |
| โ No validation or error handling | โ
Built-in validation and logging |
| โ Manual file path management | โ
Structured ID-based access |
| โ No usage tracking | โ
Full audit trail of what was read |
## ๐ฏ What does this server do?
This MCP server exposes **5 carefully crafted FRDs** that define a complete NestJS boilerplate:
- **FRD-00**: ๐ญ **Master orchestration** - How GitHub Copilot should execute the 4 phases
- **FRD-01**: ๐๏ธ **Boilerplate core** - Basic NestJS + Products CRUD + Swagger
- **FRD-02**: ๐๏ธ **Database layer** - TypeORM + migrations + repository pattern
- **FRD-03**: ๐ **Authentication** - JWT + Passport + protected endpoints
- **FRD-04**: ๐งช **Unit testing** - Jest + mocks + coverage for all modules
## ๐ How does the orchestration work?
When you tell GitHub Copilot to generate a boilerplate, here's what happens:
1. **๐ Copilot reads FRD-00** (master orchestration) to understand the plan
2. **๐๏ธ Phase 1**: Reads FRD-01 โ Creates basic NestJS + Products CRUD
3. **๐๏ธ Phase 2**: Reads FRD-02 โ Adds database + TypeORM + migrations
4. **๐ Phase 3**: Reads FRD-03 โ Implements JWT auth + protected routes
5. **๐งช Phase 4**: Reads FRD-04 โ Generates unit tests for everything
6. **๐ Final**: Generates comprehensive README with setup instructions
Each phase is **automatic** - no manual intervention required. GitHub Copilot follows the FRDs religiously and ensures each phase works before moving to the next.
## โจ Complete workflow example
```bash
# 1. You say this to GitHub Copilot:
"folder name: my-api. Start the orchestration."
# 2. GitHub Copilot automatically:
# - Reads FRD-00 to understand the plan
# - Creates `my-api/` directory
# - Executes Phase 1: Basic NestJS setup
# - Executes Phase 2: Database integration
# - Executes Phase 3: JWT authentication
# - Executes Phase 4: Unit tests
# - Generates final README
# 3. Result: Complete production-ready API with:
# โ
Products CRUD with validation
# โ
Swagger documentation at /api
# โ
Database persistence (SQLite by default)
# โ
JWT authentication protecting all routes
# โ
Unit tests with >80% coverage
# โ
Clean Architecture + SOLID principles
# โ
Complete setup documentation
```
The entire process takes **5-10 minutes** and results in a **production-ready** NestJS API that you can deploy immediately.
## Requirements
- **Python 3.10+**
- **VS Code** with **GitHub Copilot** enabled
- **uv** (recommended) or `pip`
## Installation
### 1. Clone/Copy this folder to your project
```bash
# Add this MCP server to your existing project
git clone <your-repo> mcp-server
cd mcp-server
```
### 2. Install dependencies
**Option A: With uv (recommended)**
```bash
uv sync
```
**Option B: With pip**
```bash
pip install fastmcp
```
### 3. Verify installation
```bash
python main.py
```
You should see logs like:
```
[FRD-Orchestrator] 12:34:56 | INFO | Starting MCP FRD-Orchestrator server (stdio)
[FRD-Orchestrator] 12:34:56 | INFO | FRD Directory: /path/to/mcp-server/frd
```
## VS Code + GitHub Copilot Configuration
### 1. Create MCP configuration in your workspace
Create `.vscode/mcp.json` in your project root:
```json
{
"_note": "This configuration is for academic purposes. The command path depends on the execution environment and may vary based on where the UV tool is installed on different systems.",
"servers": {
"frd-orchestrator": {
"type": "stdio",
"command": "/Users/[your-username]/.local/bin/uv",
"args": ["run", "main.py"]
}
}
}
```
**โ ๏ธ Important:**
- Adjust the **path to UV** according to your system
- Use `which uv` to find your UV installation path
- If using Python directly: `"command": "python"` and `"args": ["main.py"]`
### 2. Ensure GitHub Copilot has MCP access
GitHub Copilot in VS Code automatically detects MCP servers configured in `.vscode/mcp.json` when MCP support is enabled.
### 3. Test the connection
Open VS Code in your project and ask GitHub Copilot:
```
"Show me what's available in FRD-00"
```
If working correctly, you'll see logs in the terminal and Copilot will access the FRD content.
## Usage
Once configured, GitHub Copilot automatically has access to the `get_frd` tool and can read all FRDs on demand.
### ๐ฏ Simple commands to get started:
```
"folder name: my-awesome-api. Start the orchestration."
```
That's it! GitHub Copilot will:
1. Create the folder
2. Read all FRDs automatically
3. Execute all 4 phases in sequence
4. Generate a complete, working API
### ๐ ๏ธ Advanced usage:
```
"Generate just the core boilerplate (Phase 1 only)"
"Add database layer following FRD-02"
"Implement JWT authentication according to FRD-03"
"Generate comprehensive unit tests per FRD-04"
"Show me what FRD-01 contains"
```
### ๐ Behind the scenes:
When GitHub Copilot executes, you'll see logs like:
```
[FRD-Orchestrator] Reading FRD from disk: /path/to/frd/FRD-01-boilerplate-core-products.md
[FRD-Orchestrator] Tool get_frd requested with frd_id=01
[FRD-Orchestrator] FRD read successfully: FRD-01-boilerplate-core-products.md (15,432 characters)
```
This means GitHub Copilot is actively reading the latest version of your FRDs and following them exactly.
### โก What makes this powerful:
- **๐ฏ Zero configuration** - Just one command and everything works
- **๐ Structured approach** - Each phase builds on the previous
- **๐ Always updated** - FRDs are read fresh every time
- **๐๏ธ Production ready** - Not just demos, real deployable code
- **๐ Self-documenting** - Generated README explains everything
- **๐งช Fully tested** - Unit tests included for all modules
## File structure
```
mcp-server/
โโโ main.py # MCP Server
โโโ README.md # This file
โโโ pyproject.toml # Dependencies (create if not exists)
โโโ frd/
โโโ FRD-00-master-orchestration.md
โโโ FRD-01-boilerplate-core-products.md
โโโ FRD-02-products-database.md
โโโ FRD-03-auth-security.md
โโโ FRD-04-unit-testing.md
```
## Troubleshooting
### Claude doesn't recognize the `get_frd` tool
1. Verify that Claude Desktop is restarted
2. Check logs in:
- **macOS:** `~/Library/Logs/Claude/mcp*.log`
- **Windows:** `%APPDATA%\Claude\logs\`
3. Make sure to use absolute paths in `claude_desktop_config.json`
### Error: `FRD_DIR does not exist`
The `frd/` directory must be next to `main.py`:
```bash
ls -la mcp-server/
# Should show: main.py, frd/
```
### Logs don't appear
Change the log level in `claude_desktop_config.json`:
```json
"env": {
"FRD_ORCH_LOG_LEVEL": "DEBUG"
}
```
### Python not found
If using `uv`:
```json
{
"command": "uv",
"args": ["run", "/absolute/path/to/mcp-server/main.py"]
}
```
## Environment variables
| Variable | Description | Default |
|----------|-------------|---------|
| `FRD_ORCH_LOG_LEVEL` | Logging level (`DEBUG`, `INFO`, `WARNING`, `ERROR`) | `INFO` |
## Portability
This directory is **100% portable**. To use in another project:
1. Copy the entire `mcp-server/` folder
2. Update the path in `claude_desktop_config.json`
3. Restart Claude Desktop
4. Ready โ
## Update FRDs
To modify an FRD:
1. Edit the file in `frd/*.md`
2. It's **not** necessary to restart the server
3. The next time Jarvis calls `get_frd`, it will get the updated version
---
**Author:** @jorgegomez
**Version:** 1.0.0
**Date:** December 2025
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'get_frd' has a clear and distinct purpose of retrieving FRD content by ID.
The naming is trivially consistent as there is only one tool. The tool name 'get_frd' follows a clear verb_noun pattern (get + FRD), which would be appropriate if more tools were added.
A single tool is too few for a server named 'FRD Orchestrator', which implies orchestration capabilities beyond simple retrieval. The scope suggests operations like create, update, delete, or manage FRDs, but only a read operation is provided.
The tool surface is severely incomplete for an orchestrator. It only supports retrieving FRDs by ID, lacking essential operations such as creating, updating, deleting, listing, or searching FRDs. This will cause significant agent failures in orchestration tasks.