- @CLAUDE_LOCAL.md
This is the Archestra.ai website - a Next.js application that hosts the MCP (Model Context Protocol) catalog and company website. The project serves as an enterprise MCP platform for AI agents with security guardrails and compliance features.
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm typecheck- Run TypeScript type checkingpnpm prettier --write .- Format all files with Prettier
pnpm test- Run all testspnpm test --watch- Run tests in watch modepnpm test src/app/mcp-catalog/api/search/route.test.ts- Run specific test filepnpm test -t "should filter servers"- Run tests matching descriptionpnpm test --coverage- Run tests with coverage report
pnpm catalog:evaluate- Run evaluation script for MCP catalog serverspnpm catalog:validate- Validate catalog data structure
pnpm openapi:generate- Generate OpenAPI specification and format with prettier- IMPORTANT: Run this command whenever you modify API endpoints, schemas, or documentation in the MCP catalog API to regenerate the OpenAPI schema
- Framework: Next.js 15 with App Router
- Package Manager: pnpm (v10.14.0)
- Testing: Vitest with React Testing Library
- Styling: Tailwind CSS with tailwindcss-animate
- UI Components: Custom components using Radix UI primitives
- Analytics: PostHog integration
- API Documentation: Swagger UI with OpenAPI 3.0
- Validation: Zod schemas with zod-to-openapi
- Markdown Processing: react-markdown with rehype/remark plugins
/app
├── app/ # Next.js app router pages
│ ├── about/
│ ├── blog/
│ │ ├── [slug]/ # Dynamic blog post pages
│ │ ├── page.tsx # Blog listing page
│ │ └── utils.ts # Blog utilities (reads from /content/blog)
│ ├── mcp-catalog/
│ │ ├── api/ # API routes with OpenAPI generation
│ │ ├── api-docs/ # Swagger UI documentation
│ │ ├── components/# Catalog-specific components
│ │ ├── data/ # MCP catalog data
│ │ │ ├── mcp-evaluations/ # Individual server evaluation JSONs
│ │ │ └── mcp-servers.json # Main catalog file
│ │ ├── lib/ # Catalog utilities
│ │ │ ├── catalog.ts
│ │ │ ├── quality-calculator/
│ │ │ └── trust-score-badge/
│ │ └── scripts/ # Build and catalog scripts
│ └── state-of-mcp/
├── components/ # Shared React components
│ └── ui/ # Reusable UI components
├── content/ # Content directory (gitignored)
│ └── blog/ # Blog posts in markdown format
├── lib/ # Global utilities
└── public/ # Static assets
The project has ESLint and TypeScript build errors disabled in next.config.mjs:
eslint: {
ignoreDuringBuilds: true,
}
typescript: {
ignoreBuildErrors: true,
}This means you should manually run pnpm typecheck to check for TypeScript errors.
CORS headers are centrally configured in next.config.mjs for all /mcp-catalog/api/* routes.
The MCP catalog is a core feature that:
- Stores server metadata in
/app/app/mcp-catalog/data/mcp-servers.json - Individual server evaluations in
/app/app/mcp-catalog/data/mcp-evaluations/*.json - Provides quality scoring via
app/mcp-catalog/lib/quality-calculator/index.ts - Generates badges at
/mcp-catalog/api/badge/quality/[org]/[repo] - Server detail pages at
/mcp-catalog/[name]
The MCP servers are scored on a 0-100 scale based on:
- MCP Protocol Implementation (40 points max) - Tools, resources, prompts, sampling features
- GitHub Metrics (20 points max) - Stars, contributors, issues (adjusted for multi-server repos)
- Documentation Quality (20 points max)
- Code Quality (20 points max)
The MCP Catalog API provides:
/mcp-catalog/api/search- Search servers with filtering and pagination/mcp-catalog/api/server/[name]- Get individual server details/mcp-catalog/api/category- List available categories/mcp-catalog/api/badge/quality/[org]/[repo]- SVG quality badges/mcp-catalog/api/docs- OpenAPI specification endpoint/mcp-catalog/api-docs- Swagger UI documentation
OpenAPI Generation Workflow:
- API schemas defined with Zod in
/app/app/mcp-catalog/api/schemas.ts - Endpoints registered in
/app/app/mcp-catalog/api/openapi.ts - Run
pnpm openapi:generateto generate/app/app/mcp-catalog/api/docs/openapi.json - CI validates that OpenAPI spec is up-to-date
All API routes use Zod validation for request parameters and response data.
The blog system:
- Reads markdown files from
/content/blog/*.md(content directory is gitignored) - Uses gray-matter for front matter parsing
- Calculates reading time automatically
- Supports author profiles and dates
- Renders markdown with react-markdown and syntax highlighting
GitHub Actions workflows enforce:
- PR title linting (conventional commits)
- Prettier formatting
- TypeScript type checking
- Unit test execution
- Production build validation
- Catalog data validation
- OpenAPI schema consistency
- Security analysis with Zizmor
- Uses PostHog reverse proxy configuration for analytics
- Images are unoptimized (configured in next.config.mjs)
- Lucide React icons are optimized via experimental feature
When making changes:
- Follow the existing component structure and patterns
- Use absolute imports with the configured path aliases (@components, @lib, @mcpCatalog, @constants)
- Maintain the existing code style (enforced by prettier with import sorting via @trivago plugin)
- Test changes with
pnpm devbefore committing - Run
pnpm typecheckto catch type errors - Update OpenAPI spec with
pnpm openapi:generatewhen modifying API endpoints - Write tests for new functionality, mock external dependencies
- When working with the catalog data, ensure JSON validity with
pnpm catalog:validate