Self-hosted MCP server for governed retrieval. Agents get cited passages from your Markdown, text, PDF, Word and Excel files, and only what their person or group may read, enforced in PostgreSQL before ranking. Superseded, stale and unreviewed machine-written text is held back.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add premagentic --env PREM_API_URL='<PREM_API_URL>' --env PREM_AGENT_TOKEN='<PREM_AGENT_TOKEN>' -- docker run -i --rm -e PREM_API_URL -e PREM_AGENT_TOKEN ghcr.io/premagentic/premagentic-mcp:0.1.0~/.codex/config.toml
[mcp_servers.premagentic]
command = "docker"
args = ["run", "-i", "--rm", "-e", "PREM_API_URL", "-e", "PREM_AGENT_TOKEN", "ghcr.io/premagentic/premagentic-mcp:0.1.0"]
env = { PREM_API_URL = "<PREM_API_URL>", PREM_AGENT_TOKEN = "<PREM_AGENT_TOKEN>" }
# codex mcp add premagentic --env PREM_API_URL='<PREM_API_URL>' --env PREM_AGENT_TOKEN='<PREM_AGENT_TOKEN>' -- docker run -i --rm -e PREM_API_URL -e PREM_AGENT_TOKEN ghcr.io/premagentic/premagentic-mcp:0.1.0~/.cursor/mcp.json
{
"mcpServers": {
"premagentic": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PREM_API_URL",
"-e",
"PREM_AGENT_TOKEN",
"ghcr.io/premagentic/premagentic-mcp:0.1.0"
],
"env": {
"PREM_API_URL": "<PREM_API_URL>",
"PREM_AGENT_TOKEN": "<PREM_AGENT_TOKEN>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"premagentic": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PREM_API_URL",
"-e",
"PREM_AGENT_TOKEN",
"ghcr.io/premagentic/premagentic-mcp:0.1.0"
],
"env": {
"PREM_API_URL": "<PREM_API_URL>",
"PREM_AGENT_TOKEN": "<PREM_AGENT_TOKEN>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"premagentic": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PREM_API_URL",
"-e",
"PREM_AGENT_TOKEN",
"ghcr.io/premagentic/premagentic-mcp:0.1.0"
],
"env": {
"PREM_API_URL": "<PREM_API_URL>",
"PREM_AGENT_TOKEN": "<PREM_AGENT_TOKEN>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"premagentic": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PREM_API_URL",
"-e",
"PREM_AGENT_TOKEN",
"ghcr.io/premagentic/premagentic-mcp:0.1.0"
],
"env": {
"PREM_API_URL": "<PREM_API_URL>",
"PREM_AGENT_TOKEN": "<PREM_AGENT_TOKEN>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"premagentic": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PREM_API_URL",
"-e",
"PREM_AGENT_TOKEN",
"ghcr.io/premagentic/premagentic-mcp:0.1.0"
],
"env": {
"PREM_API_URL": "<PREM_API_URL>",
"PREM_AGENT_TOKEN": "<PREM_AGENT_TOKEN>"
}
}
}
}Environment variables
PREM_API_URLPREM_AGENT_TOKEN
Replace the placeholders with your own credentials and keep them out of version control.