We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/poguuniverse/42crunch-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
# Connecting to Systemd Service
When the MCP server is running as a systemd service (`42crunch-mcp.service`), connecting to it requires special considerations because:
1. **Stdio servers** communicate via stdin/stdout, which is difficult with background systemd services
2. **Systemd services** typically run in the background without direct stdio access
## Recommended Approach: Use HTTP Server
The **best solution** is to run the **HTTP server** as a systemd service instead of (or in addition to) the stdio server.
### Option 1: HTTP Server Service (Recommended)
1. **Install HTTP service:**
```bash
sudo cp 42crunch-mcp-http.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable 42crunch-mcp-http.service
sudo systemctl start 42crunch-mcp-http.service
```
2. **Connect using HTTP client:**
```bash
# Use the HTTP test client
python tests/clients/test_http_client.py
# Or use the systemd client helper
python tests/clients/test_client_systemd.py --http --test
```
### Option 2: Check Service Status
```bash
# Check if service is running
python tests/clients/test_client_systemd.py --status
# Or manually
systemctl status 42crunch-mcp.service
```
### Option 3: Use HTTP Server Directly
If you have the HTTP server running (either as a service or manually):
```bash
# Terminal 1: Start HTTP server
python http_main.py
# Terminal 2: Connect with HTTP client
python tests/clients/test_http_client.py
```
## Why HTTP is Better for Systemd Services
- ✅ **Easy connection**: HTTP is accessible from any client
- ✅ **Network accessible**: Can connect from remote machines
- ✅ **Standard protocol**: Works with any HTTP client
- ✅ **Service-friendly**: Background services work well with HTTP
- ✅ **Monitoring**: Easy to monitor with standard HTTP tools
## Stdio Server Limitations with Systemd
The stdio MCP server (`main.py`) is designed for:
- Direct process communication
- Parent-child process relationships
- Interactive use
- MCP client integrations
When running as a systemd service:
- ❌ No direct stdin/stdout access
- ❌ Requires socket activation (complex setup)
- ❌ Difficult to connect from external clients
- ❌ Limited to local communication
## Quick Start
**For systemd services, use HTTP:**
```bash
# 1. Start HTTP server service
sudo systemctl start 42crunch-mcp-http.service
# 2. Test connection
python tests/clients/test_http_client.py
# Or use the helper
python tests/clients/test_client_systemd.py --http --test
```
## Service Files
- `42crunch-mcp.service` - Stdio server (for MCP clients)
- `42crunch-mcp-http.service` - HTTP server (for general use, recommended for systemd)