# Emojikey Server Bug Fixes
## Summary of Changes
We've fixed several issues to make the server more stable and reliable:
1. Fixed TypeScript errors in handlers.ts and code_analyzer.ts:
- Added proper type narrowing for error handling
- Added proper type safety for API key usage
- Fixed missing type definitions
2. Updated Edge Functions to properly handle JSON with emoji characters:
- Modified JSON.stringify to use (null, 0) parameters to prevent pretty-printing and control characters
- Improved error handling with proper type assertions
3. Created two build options:
- Full version with all features (using full-build.sh to build with all features)
- Simplified version without coding features (more stable)
## How to Run the Server
### Option 1: Full Version (with all features)
```bash
# Build with all features
./full-build.sh
# Run the server
node build/index.js
```
### Option 2: Simplified Version (more stable, recommended)
```bash
# Build the simplified version without coding features
./build-simple.sh
# Run the simplified server
node build-simple/index.js
```
## Usage with Claude Code
To use this MCP server with Claude Code, run:
```bash
# For full version
claude code --mcp build/index.js
# For simplified version (recommended)
claude code --mcp build-simple/index.js
```
## Remaining Issues
There may still be some issues with the Edge Functions when updating emojikeys with certain emoji characters. The simplified build should be more stable and avoids most of these issues by excluding the coding-specific features.
If you encounter issues with the full version, try the simplified version which should work reliably for the core emojikey functionality.