pREST
Stdio MCP adapter bridging AI clients to pREST’s HTTP /_mcp endpoint for PostgreSQL APIs.
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
ghcr.io/prest/prest-mcp-adapter:0.1.3claude mcp add prest -e 'PREST_MCP_URL=<PREST_MCP_URL>' -e 'PREST_MCP_TOKEN=<your prest_mcp_token>' -e 'PREST_MCP_TIMEOUT_MS=<PREST_MCP_TIMEOUT_MS>' -- docker run -i --rm ghcr.io/prest/prest-mcp-adapter:0.1.3
{
"mcpServers": {
"prest": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/prest/prest-mcp-adapter:0.1.3"
],
"env": {
"PREST_MCP_URL": "<PREST_MCP_URL>",
"PREST_MCP_TOKEN": "<your prest_mcp_token>",
"PREST_MCP_TIMEOUT_MS": "<PREST_MCP_TIMEOUT_MS>"
}
}
}
}
Variables d'environnement
PREST_MCP_URLobligatoire URL of your running pREST HTTP MCP endpoint, for example http://localhost:3000/_mcpPREST_MCP_TOKENsecret Optional bearer token used to authenticate with the pREST MCP endpoint.PREST_MCP_TIMEOUT_MSOptional HTTP timeout in milliseconds. Defaults to 30000.
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
Sommaire
pREST MCP Adapter
Official stdio adapter for pREST’s HTTP MCP endpoint.
This adapter lets MCP clients that require stdio connect to a running pREST instance exposing an HTTP MCP endpoint at /_mcp.
MCP client / AI IDE
↓ stdio (NDJSON JSON-RPC)
prest-mcp
↓ HTTP POST
http://localhost:3000/_mcp
↓
pREST
The adapter is a tiny transport bridge. It does not introspect schemas, generate SQL, or implement MCP tools. Those live in pREST.
Requirements
- A running pREST instance with the
/_mcproute available - Go 1.26+ (to build from source)
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
PREST_MCP_URL | yes | — | URL of the pREST HTTP MCP endpoint, e.g. http://localhost:3000/_mcp |
PREST_MCP_TOKEN | no | — | Bearer token when pREST auth is enabled |
PREST_MCP_TIMEOUT_MS | no | 30000 | HTTP timeout in milliseconds |
Install
From source
go install github.com/prest/prest-mcp-adapter/cmd/prest-mcp@latest
Docker / OCI
docker pull ghcr.io/prest/prest-mcp-adapter:0.1.3
Local usage
PREST_MCP_URL=http://localhost:3000/_mcp prest-mcp
With token
PREST_MCP_URL=https://api.example.com/_mcp \
PREST_MCP_TOKEN=secret \
prest-mcp
Docker usage
docker run --rm -i \
-e PREST_MCP_URL=http://host.docker.internal:3000/_mcp \
ghcr.io/prest/prest-mcp-adapter:0.1.3
MCP client configuration
Cursor
Add to your MCP settings (e.g. .cursor/mcp.json):
{
"mcpServers": {
"prest": {
"command": "prest-mcp",
"env": {
"PREST_MCP_URL": "http://localhost:3000/_mcp"
}
}
}
}
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"prest": {
"command": "prest-mcp",
"env": {
"PREST_MCP_URL": "http://localhost:3000/_mcp"
}
}
}
}
Generic MCP client
Any client that can launch a stdio MCP server:
PREST_MCP_URL=http://localhost:3000/_mcp prest-mcp
Protocol messages are newline-delimited JSON-RPC on stdin/stdout. Logs go only to stderr.
Security recommendation
Use a read-only PostgreSQL user for AI/MCP workflows unless write access is explicitly required.
Do not expose unauthenticated MCP endpoints publicly.
Prefer local or private-network pREST MCP endpoints.
When pREST auth is enabled, set PREST_MCP_TOKEN to a valid JWT.
Development
make test # go test -race ./... and overall coverage >= 80%
make coverage # coverage gate only
make vet
make build # writes bin/prest-mcp
License
MIT — see LICENSE.
Questions fréquentes
Qu'est-ce que pREST ?
Stdio MCP adapter bridging AI clients to pREST’s HTTP /_mcp endpoint for PostgreSQL APIs.
Comment installer pREST ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add prest -e 'PREST_MCP_URL=<PREST_MCP_URL>' -e 'PREST_MCP_TOKEN=<your prest_mcp_token>' -e 'PREST_MCP_TIMEOUT_MS=<PREST_MCP_TIMEOUT_MS>' -- docker run -i --rm ghcr.io/prest/prest-mcp-adapter:0.1.3. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour pREST ?
Oui. Il attend PREST_MCP_URL, PREST_MCP_TOKEN, à renseigner dans sa configuration.
pREST est-il open source ?
Oui. Son code est sur GitHub sous licence MIT.
Qui maintient pREST ?
Il est publié par prest. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.