MCP PiShock Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP PiShock ServerShock at intensity 20 for 2 seconds"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP PiShock Server
English | Français
English
HTTP streamable MCP (Model Context Protocol) server for controlling PiShock devices via their REST API.
Features
SHOCK: Activates electric shock function with duration (1-15s) and intensity (1-100)
VIBRATE: Activates vibration function with duration and intensity (1-100)
BEEP: Activates beep sound function with duration
Authentication: Bearer token protection
MCP Protocol: Full MCP 2025-06-18 protocol support with tool discovery
Docker: Containerized with environment variable configuration
Configuration
Copy
.env.exampleto.env:
cp .env.example .envFill in the environment variables in
.env:
PISHOCK_USERNAME=your_username
PISHOCK_APIKEY=your_api_key
PISHOCK_CODE=your_share_code
MCP_AUTH_TOKEN=secure_random_token
SCRIPT_NAME=MCP_ServerGetting PiShock Credentials
Create an account on PiShock.com
In the Account section:
Get your Username
Generate an API Key
Create a Share Code with desired limitations
Deployment
With Docker Compose (recommended)
docker-compose up -dWith Docker
docker build -t pishock-mcp-server .
docker run -d \
-p 8000:8000 \
--env-file .env \
--name pishock-mcp-server \
pishock-mcp-serverLocal Development
pip install -r requirements.txt
python app.pyMCP Client Usage
The server implements the full MCP protocol. MCP clients will automatically:
Initialize with the server using the
initializemethodDiscover tools using
tools/listto see available SHOCK, VIBRATE, BEEP functionsCall tools using
tools/callwith the appropriate parameters
Authentication
All requests require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_MCP_AUTH_TOKENAvailable Tools
SHOCK:
{"name": "SHOCK", "arguments": {"duration": 2, "intensity": 10}}VIBRATE:
{"name": "VIBRATE", "arguments": {"duration": 3, "intensity": 50}}BEEP:
{"name": "BEEP", "arguments": {"duration": 1}}
Direct API Usage (Compatibility)
For non-MCP clients, direct endpoints are available:
# Shock
curl -X POST "http://localhost:8000/mcp/SHOCK" \
-H "Authorization: Bearer your_token" \
-H "Content-Type: application/json" \
-d '{"duration": 1, "intensity": 5}'
# Vibrate
curl -X POST "http://localhost:8000/mcp/VIBRATE" \
-H "Authorization: Bearer your_token" \
-H "Content-Type: application/json" \
-d '{"duration": 2, "intensity": 30}'
# Beep
curl -X POST "http://localhost:8000/mcp/BEEP" \
-H "Authorization: Bearer your_token" \
-H "Content-Type: application/json" \
-d '{"duration": 1}'Monitoring
Health Check:
GET /healthAPI Documentation:
http://localhost:8000/docsMCP Info:
GET /mcpLogs:
docker-compose logs -f
Security
⚠️ WARNING: Shock devices are not designed for human use and can cause serious injury including cardiac events. Never use near the heart or if you have heart conditions.
Use strong authentication tokens
Limit network access to the server
Configure appropriate limits in PiShock
Monitor usage logs
Limitations
Shock duration: 1-15 seconds (PiShock API limit)
Intensity: 1-100 (PiShock API limit)
One command at a time per share code
Device must be online and connected
Serveur MCP PiShock (Français)
Serveur MCP (Model Context Protocol) HTTP streamable pour contrôler les dispositifs PiShock via leur API REST.
Fonctionnalités
SHOCK: Active la fonction de choc électrique avec durée (1-15s) et intensité (1-100)
VIBRATE: Active la fonction de vibration avec durée et intensité (1-100)
BEEP: Active la fonction de bip sonore avec durée
Authentification: Protection par token Bearer
Protocole MCP: Support complet du protocole MCP 2025-06-18 avec découverte d'outils
Docker: Containerisé avec toutes les variables d'environnement
Configuration
Copiez
.env.examplevers.env:
cp .env.example .envRemplissez les variables d'environnement dans
.env:
PISHOCK_USERNAME=votre_nom_utilisateur
PISHOCK_APIKEY=votre_cle_api
PISHOCK_CODE=votre_code_partage
MCP_AUTH_TOKEN=un_token_securise_aleatoire
SCRIPT_NAME=MCP_ServerObtenir les identifiants PiShock
Créez un compte sur PiShock.com
Dans la section Account :
Récupérez votre Username
Générez une API Key
Créez un Share Code avec les limitations désirées
Déploiement
Avec Docker Compose (recommandé)
docker-compose up -dAvec Docker
docker build -t pishock-mcp-server .
docker run -d \
-p 8000:8000 \
--env-file .env \
--name pishock-mcp-server \
pishock-mcp-serverDéveloppement local
pip install -r requirements.txt
python app.pyUtilisation avec un client MCP
Le serveur implémente le protocole MCP complet. Les clients MCP vont automatiquement :
S'initialiser avec le serveur via la méthode
initializeDécouvrir les outils via
tools/listpour voir les fonctions SHOCK, VIBRATE, BEEP disponiblesAppeler les outils via
tools/callavec les paramètres appropriés
Authentification
Toutes les requêtes nécessitent un token Bearer dans l'header Authorization :
Authorization: Bearer YOUR_MCP_AUTH_TOKENOutils disponibles
SHOCK:
{"name": "SHOCK", "arguments": {"duration": 2, "intensity": 10}}VIBRATE:
{"name": "VIBRATE", "arguments": {"duration": 3, "intensity": 50}}BEEP:
{"name": "BEEP", "arguments": {"duration": 1}}
Utilisation API directe (Compatibilité)
Pour les clients non-MCP, des endpoints directs sont disponibles :
# Shock
curl -X POST "http://localhost:8000/mcp/SHOCK" \
-H "Authorization: Bearer your_token" \
-H "Content-Type: application/json" \
-d '{"duration": 1, "intensity": 5}'
# Vibrate
curl -X POST "http://localhost:8000/mcp/VIBRATE" \
-H "Authorization: Bearer your_token" \
-H "Content-Type: application/json" \
-d '{"duration": 2, "intensity": 30}'
# Beep
curl -X POST "http://localhost:8000/mcp/BEEP" \
-H "Authorization: Bearer your_token" \
-H "Content-Type: application/json" \
-d '{"duration": 1}'Surveillance
Health Check:
GET /healthDocumentation API:
http://localhost:8000/docsInformations MCP:
GET /mcpLogs:
docker-compose logs -f
Sécurité
⚠️ AVERTISSEMENT: Les dispositifs de choc ne sont pas conçus pour un usage humain et peuvent causer des blessures graves y compris des événements cardiaques. Ne jamais utiliser près du cœur ou si vous avez des problèmes cardiaques.
Utilisez des tokens d'authentification forts
Limitez l'accès réseau au serveur
Configurez des limites appropriées dans PiShock
Surveillez les logs d'utilisation
Limitations
Durée de choc : 1-15 secondes (limite API PiShock)
Intensité : 1-100 (limite API PiShock)
Une seule commande à la fois par share code
Le dispositif doit être en ligne et connecté
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kyrnepi/mcp-pishock-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server