Spaces:
Configuration error
Configuration error
File size: 9,688 Bytes
ac6f50a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# DEAF-FIRST MCP Server Setup - Quick Start Guide
## What Has Been Created
This repository now contains a complete MCP (Model Context Protocol) server infrastructure for the DEAF-FIRST platform with 5 specialized services, a frontend, and a backend.
## Repository Structure
```
DEAF-FIRST-PLATFORM/
βββ frontend/ # React + Vite frontend
βββ backend/ # Express backend API
βββ services/
β βββ deafauth/ # Authentication service + MCP server
β βββ pinksync/ # Real-time sync service + MCP server
β βββ fibonrose/ # Optimization engine + MCP server
β βββ accessibility-nodes/ # Accessibility features + MCP server
βββ ai/ # AI services + MCP server
βββ configs/deployment/ # Docker Compose configuration
βββ package.json # Root workspace configuration
βββ mcp-config.json # MCP servers configuration
βββ README.md # Main documentation
βββ MCP-SERVERS.md # MCP server documentation
βββ .env.example # Environment variables template
```
## Quick Start
### 1. Install Dependencies
```bash
npm install
```
### 2. Set Up Environment
```bash
cp .env.example .env
# Edit .env with your configuration
```
### 3. Build All Services
```bash
npm run build
```
### 4. Run Development Environment
```bash
# Run all services
npm run dev
# Or run individual services
npm run dev:frontend
npm run dev:backend
npm run dev:deafauth
npm run dev:pinksync
npm run dev:fibonrose
npm run dev:a11y
```
## MCP Server Usage
### Running MCP Servers
Each service can be run as an MCP server:
```bash
# Build first
npm run build
# Run individual MCP servers
npm run mcp --workspace=services/deafauth
npm run mcp --workspace=services/pinksync
npm run mcp --workspace=services/fibonrose
npm run mcp --workspace=services/accessibility-nodes
npm run mcp --workspace=ai
```
### Testing MCP Servers
Use the included test script:
```bash
node test-mcp.mjs services/deafauth/dist/mcp-server.js
node test-mcp.mjs services/pinksync/dist/mcp-server.js
node test-mcp.mjs services/fibonrose/dist/mcp-server.js
node test-mcp.mjs services/accessibility-nodes/dist/mcp-server.js
node test-mcp.mjs ai/dist/mcp-server.js
```
### Claude Desktop Integration
Add to your Claude Desktop configuration:
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"deafauth": {
"command": "node",
"args": ["/absolute/path/to/DEAF-FIRST-PLATFORM/services/deafauth/dist/mcp-server.js"]
},
"pinksync": {
"command": "node",
"args": ["/absolute/path/to/DEAF-FIRST-PLATFORM/services/pinksync/dist/mcp-server.js"]
},
"fibonrose": {
"command": "node",
"args": ["/absolute/path/to/DEAF-FIRST-PLATFORM/services/fibonrose/dist/mcp-server.js"]
},
"accessibility-nodes": {
"command": "node",
"args": ["/absolute/path/to/DEAF-FIRST-PLATFORM/services/accessibility-nodes/dist/mcp-server.js"]
},
"ai": {
"command": "node",
"args": ["/absolute/path/to/DEAF-FIRST-PLATFORM/ai/dist/mcp-server.js"]
}
}
}
```
## Available Services
### 1. DeafAUTH (Port 3002)
**Purpose**: Accessible authentication and user management
**MCP Tools**:
- `authenticate_user`: Login with username/password
- `create_user`: Create new user with accessibility preferences
- `get_user`: Retrieve user profile
**REST API**:
- `POST /api/auth/login`: User authentication
- `POST /api/auth/register`: User registration
- `GET /api/users/:userId`: Get user info
### 2. PinkSync (Port 3003)
**Purpose**: Real-time data synchronization
**MCP Tools**:
- `sync_data`: Synchronize data across channels
- `subscribe_channel`: Subscribe to sync channel
- `get_sync_status`: Get sync status
**REST API**:
- `POST /api/sync`: Sync data
- `GET /api/sync/status`: Get sync status
- WebSocket endpoint for real-time updates
### 3. FibonRose (Port 3004)
**Purpose**: Mathematical optimization engine
**MCP Tools**:
- `optimize_schedule`: Optimize task scheduling
- `calculate_fibonacci`: Calculate Fibonacci numbers (optimized O(n) algorithm)
- `golden_ratio_analysis`: Golden ratio calculations
**REST API**:
- `POST /api/optimize/schedule`: Schedule optimization
- `GET /api/fibonacci/:n`: Calculate Fibonacci
- `POST /api/golden-ratio`: Golden ratio analysis
### 4. Accessibility Nodes (Port 3005)
**Purpose**: Modular accessibility features
**MCP Tools**:
- `get_sign_language_interpretation`: Sign language for text (ASL/BSL/ISL)
- `apply_high_contrast`: Apply high contrast mode
- `simplify_text`: Text simplification
- `get_accessibility_recommendations`: Get WCAG recommendations
**REST API**:
- `POST /api/sign-language`: Get sign language interpretation
- `POST /api/high-contrast`: Apply high contrast
- `POST /api/simplify-text`: Simplify text
- `GET /api/recommendations/:contentType`: Get recommendations
### 5. AI Services (Port 3006)
**Purpose**: AI-powered workflows
**MCP Tools**:
- `process_text`: Summarize, translate, or simplify text
- `generate_content`: Generate accessible content
- `analyze_accessibility`: Analyze accessibility issues
**REST API**:
- `POST /api/process/text`: Process text with AI
- `POST /api/generate`: Generate content
- `POST /api/analyze/accessibility`: Analyze accessibility
### 6. Backend (Port 3000)
**Purpose**: Main backend API
**REST API**:
- `GET /health`: Health check
- `GET /api/status`: Service status
### 7. Frontend (Port 5173)
**Purpose**: React-based user interface
**Features**:
- Service overview dashboard
- Accessibility-first design
- Responsive layout
## Docker Deployment
```bash
# Build Docker images
npm run build:docker
# Start all services
npm run docker:up
# View logs
npm run docker:logs
# Stop all services
npm run docker:down
```
## Development Commands
```bash
# Development
npm run dev # Run all services
npm run dev:frontend # Frontend only
npm run dev:backend # Backend only
npm run dev:deafauth # DeafAUTH only
npm run dev:pinksync # PinkSync only
npm run dev:fibonrose # FibonRose only
npm run dev:a11y # Accessibility nodes only
# Building
npm run build # Build all workspaces
# Testing
npm run test # Run all tests
npm run test:e2e # End-to-end tests
# Code Quality
npm run lint # Lint code
npm run format # Format with Prettier
npm run type-check # TypeScript type checking
# Database
npm run db:setup # Setup databases
npm run db:migrate # Run migrations
npm run db:seed # Seed data
# Cleanup
npm run clean # Clean all artifacts
```
## Environment Variables
Key environment variables (see `.env.example` for complete list):
```env
# Databases
DATABASE_URL=postgresql://user:password@localhost:5432/deafirst
DEAFAUTH_DATABASE_URL=postgresql://user:password@localhost:5432/deafauth
# Redis
REDIS_URL=redis://localhost:6379
# JWT
JWT_SECRET=your-secret-key
JWT_EXPIRY=7d
# Service Ports
BACKEND_PORT=3000
DEAFAUTH_PORT=3002
PINKSYNC_PORT=3003
FIBONROSE_PORT=3004
A11Y_PORT=3005
AI_PORT=3006
# AI Services
OPENAI_API_KEY=your-api-key
```
## Key Features
β
**Complete Monorepo**: npm workspaces with all services
β
**MCP Protocol**: 5 MCP servers for programmatic access
β
**TypeScript**: Full type safety across all services
β
**REST APIs**: HTTP endpoints for all services
β
**WebSocket**: Real-time communication (PinkSync)
β
**Docker Ready**: Complete Docker Compose setup
β
**Accessibility First**: All services designed with accessibility in mind
β
**Documentation**: Comprehensive docs for all components
β
**Testing**: Test infrastructure included
β
**Production Ready**: Linting, type-checking, building all working
## Architecture Highlights
1. **Deaf-First Design**: All services prioritize accessibility
2. **MCP Integration**: Programmatic access via Model Context Protocol
3. **Microservices**: Independent, scalable services
4. **Type Safety**: TypeScript with strict mode everywhere
5. **Input Validation**: Zod schemas for all inputs
6. **Performance**: Optimized algorithms (e.g., O(n) Fibonacci)
7. **Real-time**: WebSocket support for live updates
8. **AI-Powered**: Integration-ready for AI services
## Next Steps
1. **Configure Environment**: Update `.env` with your settings
2. **Start Database**: Run PostgreSQL and Redis (or use Docker)
3. **Install Dependencies**: Run `npm install`
4. **Build Services**: Run `npm run build`
5. **Start Development**: Run `npm run dev`
6. **Test MCP Servers**: Use test script or integrate with Claude
## Documentation
- `README.md`: Main project documentation
- `MCP-SERVERS.md`: Detailed MCP server documentation
- `infrastructure.md`: Architecture overview
- `.env.example`: Environment configuration template
## Support
For issues or questions:
- Review the documentation files
- Check service logs
- Open an issue on GitHub
## License
MIT License - See LICENSE file
---
**Built by 360 Magicians**
**DEAF-FIRST Platform v2.0.0**
|