We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LeonMelamud/pikud-a-oref-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
README.mdโข3.28 kB
# ๐จ Pikud Haoref Emergency Alerts - VS Code Extension
Real-time Israeli emergency alerts directly in VS Code via SSE (Server-Sent Events).
## Features
- ๐ก **Real-time SSE Connection** to your Pikud Haoref alert stream
- ๐จ **Live Alert Display** in VS Code Explorer sidebar
- ๐ **Visual Notifications** for new emergency alerts
- ๐งช **Test Alert Creation** directly from VS Code
- โ๏ธ **Configurable Settings** for API endpoint and authentication
- ๐ **Connection Status** monitoring
## Installation & Setup
### 1. Install Dependencies
```bash
cd vscode-extension
npm install
```
### 2. Compile TypeScript
```bash
npm run compile
```
### 3. Test the Extension
- Press `F5` in VS Code to open Extension Development Host
- Or use `Ctrl+Shift+P` โ "Developer: Reload Window"
### 4. Configure Settings
Go to VS Code Settings and search for "Pikud Haoref":
- **API URL**: `http://localhost:8000/api/alerts-stream`
- **API Key**: `poha-test-key-2024-secure`
- **Enable Notifications**: `true`
## Usage
### Starting Alert Monitoring
1. Open Command Palette (`Cmd+Shift+P`)
2. Type "Pikud Haoref: Start Alert Monitoring"
3. Extension will automatically connect to your SSE stream
### Viewing Alerts
- Check the **๐จ Emergency Alerts** panel in the Explorer sidebar
- Real-time alerts will appear as they're received
- Click on alerts to expand details
### Sending Test Alerts
1. Command Palette โ "Pikud Haoref: Send Test Alert"
2. Or use the Makefile: `make test-alert`
## Commands
- `pikudHaoref.startAlerts` - Start monitoring alerts
- `pikudHaoref.stopAlerts` - Stop monitoring alerts
- `pikudHaoref.testAlert` - Send a test alert
## Extension Structure
```
vscode-extension/
โโโ package.json # Extension manifest
โโโ src/extension.ts # Main extension code with SSE logic
โโโ tsconfig.json # TypeScript configuration
โโโ .vscode/
โ โโโ launch.json # Debug configuration
โ โโโ tasks.json # Build tasks
โโโ README.md # This file
```
## How SSE Connection Works
The extension uses the Node.js `eventsource` library to:
1. **Connect** to `http://localhost:8000/api/alerts-stream`
2. **Authenticate** using `X-API-Key` header
3. **Listen** for real-time alert events
4. **Parse** incoming JSON alert data
5. **Display** alerts in VS Code UI
6. **Notify** user of new emergencies
## Development
### Watch Mode
```bash
npm run watch # Auto-compile on file changes
```
### Debugging
- Set breakpoints in `src/extension.ts`
- Press `F5` to start debugging session
- Check VS Code Developer Console for logs
### Testing SSE Connection
```bash
# Test your SSE endpoint directly
curl -N -H "X-API-Key: poha-test-key-2024-secure" \\
http://localhost:8000/api/alerts-stream
# Send test alert
make test-alert
```
## Publishing
To package for distribution:
```bash
npm install -g vsce
vsce package
```
This creates a `.vsix` file you can install manually or publish to the marketplace.
## Architecture
```
VS Code Extension โ SSE โ FastAPI โ Pikud Haoref API
โ
Tree View + Notifications
```
The extension bridges real-time SSE streams with VS Code's extension API, providing emergency alerts directly in your development environment.