Skip to content
Back to skills

2175 Unix Socket Transport 316f6937

ASecurity

High-performance local IPC transport using length-prefixed protobuf messages.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
businesspythonbashsecurityperformance

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2175-unix-socket-transport_316f6937 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2175 Unix Socket Transport 316f6937?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2175 Unix Socket Transport 316f6937
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2175-unix-socket-transport-316f6937/badge)](https://www.skillsdirectory.com/skills/tools-only-2175-unix-socket-transport-316f6937)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Unix Socket Transport

High-performance local IPC transport using length-prefixed protobuf messages.

## Performance

| Transport | Throughput | Use Case |
|-----------|------------|----------|
| MCP/HTTP | ~600 calls/sec | Remote plugins |
| gRPC | ~4,700 calls/sec | Remote/local plugins |
| **Unix Socket** | ~9,000 calls/sec | Local plugins only |

## Server Configuration

**Environment variables:**
```bash
PLUGINS_TRANSPORT=unix
UNIX_SOCKET_PATH=/tmp/mcpgateway-plugins.sock
```

**YAML config:**
```yaml
unix_socket_server_settings:
  path: "/tmp/mcpgateway-plugins.sock"
```

**Start the server:**
```bash
PLUGINS_TRANSPORT=unix python -m mcpgateway.plugins.framework.external.unix.server.runtime
```

## Client Configuration

```yaml
plugins:
  - name: "MyPlugin"
    kind: "external"
    hooks: ["tool_pre_invoke"]
    unix_socket:
      path: "/tmp/mcpgateway-plugins.sock"
      timeout: 30.0            # Read timeout (seconds)
      reconnect_attempts: 3    # Retry count
      reconnect_delay: 0.1     # Base delay with exponential backoff
```

## Protocol

The Unix socket transport uses length-prefixed protobuf messages (the same protobuf schema as gRPC):

```
[4-byte big-endian length][protobuf payload]
```

Messages use the `plugin_service.proto` schema (e.g., `InvokeHookRequest`, `InvokeHookResponse`). This provides the performance benefits of protobuf serialization without the overhead of HTTP/2 framing that gRPC uses.

## When to Use

| Scenario | Recommended Transport |
|----------|----------------------|
| Local, same machine, max performance | Unix Socket |
| Local, need gRPC ecosystem (reflection, streaming) | gRPC + UDS |
| Remote plugins | gRPC or MCP/HTTP |
| Cross-platform (Windows) | MCP/HTTP or gRPC |

## Limitations

- Local only (no network support)
- No TLS (use file permissions for security)
- No built-in streaming (request/response only)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.