Skip to content

AI Copilot — On-Premises Setup

The AI copilot is a chat in Faraday's web UI. It answers questions about your data and can act on it: it searches and triages vulnerabilities, updates severities and statuses, adds comments and remediation notes, manages tags, creates executive reports, launches scans and exports findings to ticketing tools.

This guide is for administrators of on-premises Faraday instances. To connect an external AI client (Claude, VS Code, Cursor…) to Faraday instead, see Connecting to the Faraday MCP Server.

How it works

graph LR UI["Faraday web UI"] --> Server["Faraday server"] Server --> LLM["Language model<br/>(OpenRouter or your own server)"] Server --> MCP["Faraday MCP server<br/>(faraday-mcp)"] MCP --> API["Faraday API<br/>(as the chatting user)"]
  • The Faraday server runs the conversation. It sends the user's message to the language model and runs the tools the model asks for.
  • The tools come from the Faraday MCP server (faraday-mcp), a separate service installed on the same machine as Faraday. With every message, Faraday sends it its own URL and a short-lived token for the user who is chatting. Users never create or paste an API token.
  • The copilot has the user's own permissions. It sees and changes exactly what the user can in the UI. Actions the user's role can't perform are never offered to the model.
  • Deleting data and exporting findings need confirmation. The copilot holds these actions until the user confirms them.

Requirements

  • A Faraday Corporate license.
  • One of these 64-bit (amd64) systems for the MCP server package:
    • Ubuntu 20.04 / 24.04 or Kali Linux (.deb)
    • Rocky Linux 8, Oracle Linux 9 or another RHEL 8/9 system (.rpm)
  • A language model that supports tool calling (OpenAI-style function calls), from either:
    • OpenRouter (openrouter, the default), a hosted gateway to many models. Requires an OpenRouter API key.
    • Any OpenAI-compatible server (openai_compatible), such as Ollama, vLLM, LM Studio, llama.cpp or an internal gateway, on the same machine or on your network.
  • Redis, which Faraday already uses. The copilot keeps its per-minute message limit, short-term memory and pending confirmations there.

Choosing a model

The copilot relies on the model to choose tools and read their results correctly. Small local models often answer poorly or misuse the tools. The default, anthropic/claude-haiku-5.5 on OpenRouter, is a good starting point.

What data leaves your network

  • To the language model: the user's messages, the conversation history and the results of the tools the model runs, which include workspace, asset and vulnerability data. With openrouter, this goes to OpenRouter and the model's provider. With openai_compatible, it only goes to the server you configure.
  • To the internet, from two built-in tools: lookup_cve queries the NVD API (services.nvd.nist.gov) for CVE details, and search_faraday_docs reads Faraday's public documentation (docs.faradaysec.com). Without internet access, these tools fail and the copilot answers without them.

Every message, reply and tool call is recorded (truncated) in Faraday's database, in the copilot_message_log table, together with the model used and token usage, for auditing.

Setup

Step 1 — Install the MCP server

Log in to the Faraday Portal and download the MCP server package for your system from your license's downloads. The MCP downloads are offered on Professional and Corporate licenses, and the portal always serves the latest published version:

System File
Ubuntu, Kali faraday-mcp_amd64.deb
Rocky, Oracle, RHEL faraday-mcp_amd64.rpm
Docker faraday-mcp-docker.tar.gz

Install it on the Faraday machine:

sudo apt install ./faraday-mcp_amd64.deb     # Ubuntu, Kali
sudo dnf install ./faraday-mcp_amd64.rpm     # Rocky, Oracle, RHEL

The package brings its own Python, so it needs nothing else. It installs:

Path Contents
/opt/faraday-mcp The server
/etc/faraday-mcp/faraday-mcp.env Configuration. Upgrades keep your changes.
faraday-mcp.service systemd service, run as the faraday-mcp user. Not enabled by default.

Docker

To run the MCP server in Docker instead, follow Running the MCP server with Docker in place of Steps 1 to 3, then continue with Step 4.

Step 2 — Allow Faraday's URL on the MCP server

For security, the MCP server refuses private addresses and plain http:// URLs unless you allow them. Allow the host of Faraday's instance_url (set in Step 4) in /etc/faraday-mcp/faraday-mcp.env:

If Faraday runs at http://localhost:5985 on the same machine, uncomment the two lines the file marks for the copilot:

FARADAY_MCP_ALLOWED_HOSTS=localhost,127.0.0.1
FARADAY_MCP_ALLOW_HTTP=true

If Faraday's URL uses another name, such as https://faraday.example.internal, list that host:

FARADAY_MCP_ALLOWED_HOSTS=faraday.example.internal

Add FARADAY_MCP_ALLOW_HTTP=true only if the URL starts with http://.

Keep the default FARADAY_MCP_HOST=127.0.0.1. The copilot doesn't need other machines to reach the MCP server, and traffic between the two never leaves the host.

Step 3 — Start the MCP server

sudo systemctl enable --now faraday-mcp

Note

Restart the service after any change to its configuration file: sudo systemctl restart faraday-mcp.

Step 4 — Configure Faraday

Edit the [faraday_server] section of /home/faraday/.faraday/config/server.ini:

Setting Default Description
instance_url (none) Required. Faraday's URL as the MCP server reaches it, using the host you allowed in Step 2. For example http://localhost:5985.
agent_mcp_url http://127.0.0.1:8000/mcp Where Faraday reaches the MCP server. Change the port only if you changed FARADAY_MCP_PORT. Plain http:// is only accepted for localhost, 127.0.0.1 or ::1, because user tokens travel over this connection; any other address must use https://.
llm_provider openrouter openrouter or openai_compatible.
llm_base_url http://localhost:11434/v1 openai_compatible only: the server's OpenAI API base URL (Ollama's default shown). Accepts http:// and https://.
llm_model_id anthropic/claude-haiku-5.5 on openrouter The model. Required with openai_compatible: use the name your server knows, such as qwen3:8b on Ollama.
llm_fallback_model_id anthropic/claude-sonnet-5 on openrouter; none otherwise Model to retry with when the main model refuses to answer. Leave it empty to turn the fallback off.
llm_effort high Reasoning effort sent to the model (low, medium, high). Leave it empty to send none, for servers that reject the parameter.
agent_chat_daily_limit 100 Messages per user per day. 0 turns the limit off.
agent_chat_per_minute_limit 10 Messages per user per minute. 0 turns the limit off.
[faraday_server]
instance_url=http://localhost:5985
[faraday_server]
instance_url=http://localhost:5985
llm_provider=openai_compatible
llm_base_url=http://localhost:11434/v1
llm_model_id=qwen3:8b

Step 5 — Set the API key

Faraday reads the model provider's API key from its environment, never from server.ini:

Provider Environment variable
openrouter FARADAY_OPENROUTER_API_KEY (required)
openai_compatible FARADAY_LLM_API_KEY (optional, sent as Authorization: Bearer)

Keep the key in a file only root can read, and load it into the faraday-server service:

sudo install -m 600 /dev/null /etc/faraday-copilot.env
echo 'FARADAY_OPENROUTER_API_KEY=sk-or-...' | sudo tee /etc/faraday-copilot.env >/dev/null
sudo systemctl edit faraday-server

In the editor, add:

[Service]
EnvironmentFile=/etc/faraday-copilot.env

Warning

Don't put the key in an Environment= line of the unit: any local user can read those with systemctl show.

Then restart Faraday:

sudo systemctl restart faraday-server

Step 6 — Check the configuration and turn the copilot on

In Faraday, go to Settings → AI Permissions → AI Copilot. The page lists anything still missing and runs a live check of the MCP server: whether it responds, accepts Faraday's URL and can reach Faraday. When the list is empty, turn on Enable AI copilot for this instance.

Doing the same through the API

As an administrator:

curl -c cj -X POST https://faraday.example.com/_api/login \
  -H 'Content-Type: application/json' -d '{"email": "admin", "password": "..."}'

# What is missing (an empty missing_configuration means ready)
curl -b cj https://faraday.example.com/_api/v3/settings/copilot

# Turn the copilot on for the instance
curl -b cj -X PATCH https://faraday.example.com/_api/v3/settings/copilot \
  -H 'Content-Type: application/json' -d '{"enabled": true}'

Step 7 — Give users access

Each user also needs the copilot enabled on their account. In Users, open the user and turn on AI copilot, or use the API:

curl -b cj -X PATCH https://faraday.example.com/_api/v3/users/<user id> \
  -H 'Content-Type: application/json' -d '{"copilot_enabled": true}'

Administrators have it enabled already: existing administrators when Faraday is upgraded, and new ones when they are created or promoted, unless it's turned off explicitly. Only administrators can change this setting.

Running the MCP server with Docker

The MCP server is also distributed as a Docker bundle, faraday-mcp-docker.tar.gz, on the Faraday Portal. It replaces Steps 1 to 3 above; Faraday's configuration (Steps 4 to 7) is the same.

You need Docker Engine 20.10 or later with the Compose plugin (docker compose) on the Faraday machine. The bundle contains:

File Contents
faraday-mcp-<version>-image.tar The Docker image, faraday-mcp:<version>
docker-compose.yml Runs the server with hardened defaults (read-only filesystem, no capabilities, restart on failure)
faraday-mcp.env The server's settings. The only file you normally edit.
DOCKER.md The full Docker guide, including serving MCP clients on other machines

1. Extract the bundle and load the image:

tar -xzf faraday-mcp-docker.tar.gz
cd faraday-mcp-*-docker
docker load -i faraday-mcp-*-image.tar

2. Allow Faraday's URL. Inside the container, localhost is the container itself, not the Faraday machine, so instance_url (Step 4) can't be http://localhost:5985. Use Faraday's real URL, the one users open, for example https://faraday.example.com. Faraday also uses instance_url for links in notifications and reports, so don't set it to a name only the container knows.

In faraday-mcp.env, allow that host:

FARADAY_MCP_ALLOWED_HOSTS=faraday.example.com

Add FARADAY_MCP_ALLOW_HTTP=true only if the URL starts with http://.

If that name resolves only through the host's /etc/hosts, the container can't see it. Map it in docker-compose.yml, under extra_hosts, to the address Faraday listens on (not 127.0.0.1):

    extra_hosts:
      - "host.docker.internal:host-gateway"
      - "faraday.example.com:10.0.0.5"

3. Start it:

docker compose up -d
docker compose ps          # STATUS should become "healthy"

The compose file publishes the server on 127.0.0.1:8000, so the default agent_mcp_url (http://127.0.0.1:8000/mcp) works without changes, and only the Faraday machine can reach it.

Then continue with Step 4, using Faraday's real URL as instance_url.

Run the commands below from the bundle directory. After any change to faraday-mcp.env, apply it with docker compose up -d.

Task Command
Status docker compose ps
Logs docker compose logs -f
Restart docker compose restart
Stop docker compose down

To upgrade, extract the new bundle, load its image, copy your faraday-mcp.env into the new directory and run docker compose up -d there. DOCKER.md describes the upgrade and every setting in detail.

Limiting what the copilot can do

Besides each user's role, you can limit the tools the MCP server offers. Set these in /etc/faraday-mcp/faraday-mcp.env and restart the service (with Docker, in the bundle's faraday-mcp.env, then run docker compose up -d):

Setting Effect
FARADAY_MCP_TOOLSETS Enable only these toolsets: read, write, delete, export, admin. All are enabled by default.
FARADAY_MCP_DISABLED_TOOLS Disable individual tools by name.

For example, a read-only copilot:

FARADAY_MCP_TOOLSETS=read

Untrusted content

Findings imported from scanners can contain text written to manipulate an AI model. Enable only the toolsets your users need: delete is irreversible, export sends data out of Faraday, and admin can launch scans.

Troubleshooting

Start with Settings → AI Permissions → AI Copilot (Step 6): most problems show up there with their cause. Faraday also logs every failure in its server log, and the MCP server logs to the journal (journalctl -u faraday-mcp), or with Docker to docker compose logs.

The chat doesn't appear

The chat is shown only when the license includes the copilot, the copilot is turned on (Step 6), nothing is missing from the configuration, and the user has it enabled on their account (Step 7).

Messages on the copilot settings page

Message Fix
The MCP server at http://127.0.0.1:8000/mcp is not reachable. Is faraday-mcp running? Check sudo systemctl status faraday-mcp and start the service (Step 3). Make sure agent_mcp_url uses the MCP server's port.
The MCP server refused the session: The Faraday URL must use https ... Set FARADAY_MCP_ALLOW_HTTP=true (Step 2) and restart the MCP server.
... Faraday host '...' resolves to a private or reserved address ... Add that host to FARADAY_MCP_ALLOWED_HOSTS (Step 2) and restart the MCP server.
... Faraday host '...' is not allowed by this server. FARADAY_MCP_ALLOWED_HOSTS doesn't include the host of Faraday's instance_url. Add it and restart the MCP server.
... Cannot connect to Faraday server: ... The MCP server can't reach instance_url. Check that Faraday is running and that curl <instance_url> works from the MCP server's machine.

The chat answers with an error

Each error has a code (error_code in the API response) and a matching line in Faraday's log:

Code HTTP Meaning What to check
disabled 403 The copilot is turned off for the instance. Step 6.
user_disabled 403 The user doesn't have the copilot enabled. Step 7.
not_configured 503 A required setting is missing: the API key, llm_model_id with openai_compatible, llm_provider or instance_url. The log says which: The copilot model provider is not configured: ... or Neither instance_url nor websocket_server_fqdn is set.
bad_mcp_url 503 agent_mcp_url is plain http:// to a host other than localhost. Use https://, or run the MCP server on the Faraday host.
mcp_unreachable 503 Faraday can't connect to the MCP server. sudo systemctl status faraday-mcp, and that agent_mcp_url matches the MCP server's address and port.
mcp_refused 503 The MCP server rejected Faraday's URL. The log line The MCP server refused the session (...) gives the reason, usually FARADAY_MCP_ALLOWED_HOSTS or FARADAY_MCP_ALLOW_HTTP (Step 2).
llm_error 502 The model provider failed: wrong key, unknown model, rate limit or unreachable. The log entry after LLM API call failed has the provider's message.
timeout 504 The answer took longer than 3 minutes. A slow model or a very broad question.
daily_limit_reached 429 The user reached agent_chat_daily_limit. Raise the limit, or wait until the next day.
rate_limited 429 The user sent more than agent_chat_per_minute_limit messages in a minute. Wait a minute.
agent_failed 500 Any other failure. The traceback after Agent chat turn failed in the log.

The copilot says it can't run a tool or access data

The MCP server started the session but couldn't reach Faraday. The copilot settings page shows the MCP server's message; see the table above. If the MCP server runs in Docker, remember that localhost there is the container, not the Faraday host (see Running the MCP server with Docker).

Answers are poor, or the model ignores the tools

Try a larger model, or one that supports tool calling. On Ollama, check that the model's page has the tools tag.

Warnings that don't block the chat

  • Could not check the daily copilot limit / Could not check the per-minute copilot limit: the database or Redis couldn't be read, so that limit was skipped for the message.
  • Could not log copilot message: the reply was sent but not recorded in copilot_message_log.