Self-hosted kit / setup guide
From a private folder
to your agent's tools.
Start with a harmless document. Confirm the evidence and the data flow before you connect a real collection.
Download the free kitInstall the kit
Work in your private installation folder.
Extract the ZIP, then open its centy-agent-gateway directory in your terminal. Run these commands from that directory as the dedicated account:
python3 -m venv .venv
.venv/bin/python -m pip install -e .
mkdir -m 700 docs
cp .env.example .env
chmod 600 .envThese commands match the shipped README. Measure memory and ingestion time using your own collection before choosing server resources. Do not run the gateway as root.
Configure provider access
Keep keys on the server.
Edit the private .env file with your own VOYAGE_API_KEY and OPENROUTER_API_KEY. The kit reads the file directly; do not source it in your shell. Never put keys in browser code, MCP arguments, screenshots or support messages.
The answer model defaults to openrouter/free. An optional AGENT_GATEWAY_ANSWER_MODEL may name a single currently available vendor/model:free entry. Paid IDs and paid fallbacks are rejected; an unavailable free model fails instead. Process environment values override the file, so restart the MCP process after changing configuration.
Understand the external calls first
Ingestion sends document chunks to Voyage AI. Search sends your query to Voyage AI. Generated answers send the question and retrieved excerpts, including filenames and page labels, through OpenRouter to its selected free-model provider. Review their data policies before sensitive material; self-hosting is not an offline or zero-retention guarantee.
Index a first document
Use something you can safely inspect.
Create docs/example.txt with a short, fictional statement such as:
Project Cedar's approval contact is Jun.Then build the index and inspect its source status:
.venv/bin/centy-agent-gateway ingest
.venv/bin/centy-agent-gateway statusIngestion is an administrator action and uses Voyage AI. The status command reads the local snapshot/source information without calling an AI API. You can also ingest PDF, Markdown and other text files. Image-only scanned PDFs need OCR first.
Connect your agent
Use stdio locally, or SSH to your server.
The examples below come from the kit. Replace /opt/centy-agent-gateway with your actual installation path. Add the appropriate entry to your MCP client's configuration; its configuration location depends on the client.
Agent and gateway on the same machine
{
"mcpServers": {
"centy-agent-gateway": {
"command": "/opt/centy-agent-gateway/.venv/bin/centy-agent-gateway",
"args": ["--home", "/opt/centy-agent-gateway", "serve"]
}
}
}Agent on your laptop, gateway on a VPS
{
"mcpServers": {
"centy-agent-gateway": {
"command": "ssh",
"args": [
"-T", "gateway@your-vps",
"/opt/centy-agent-gateway/.venv/bin/centy-agent-gateway",
"--home", "/opt/centy-agent-gateway", "serve"
]
}
}
}Replace gateway@your-vps with your dedicated account and host. Use an SSH key restricted to that account. Do not expose the stdio process or an unauthenticated MCP HTTP port to the internet. SSH is the access boundary; stdio does not provide per-user OAuth permissions.
Check your first result
Read the passage before trusting the answer.
- Confirm your client lists
search_documents,answer_documentsandsource_status. - Search for “Who is Project Cedar's approval contact?” Inspect the excerpt, source filename and snapshot. A plain-text source does not have a PDF page number.
- Ask the same question with
answer_documents. Compare the answer and citation with the returned evidence. This is a suggested manual check, not a pre-recorded live result. - Edit the test file and call
source_status. An updated-file report does not refresh the index; runingestagain as the administrator.
The included test suite uses synthetic data and mocked provider responses, without real keys or customer documents:
.venv/bin/python -m unittest discover -s tests -vWhen something does not work
Check the boundary that failed.
- No index or no excerpts
- Confirm that readable files are in
docs/under the selected--homedirectory, run ingestion, then inspect status. A scanned PDF needs OCR; a search without matching passages cannot provide evidence for an answer. - Key, quota or free-model failure
- Check private provider configuration and the process environment, then restart the MCP process. Free-model availability and rate limits vary. The client has bounded retries and never falls back to paid inference; do not repeatedly restart jobs to evade provider limits.
- The answer cites old content
- Source status only checks when called. Re-ingest changed documents as the administrator. Citations point to retrieved excerpts, not an independent certification of correctness.
- Existing index migration
- The administrator can import a trusted historical index using the compatibility command documented in the kit README. Never import an index from a stranger. Its freshness stays unknown until the original files are copied into
docs/and freshly ingested. - Several collections or users
- Use separate Unix accounts/instances for collections that must be isolated. A browser-based, multi-tenant HTTP service needs a proper authorization design beyond this stdio kit; a shared static token is not equivalent.
Need help with the kit?
Contact Centy with your operating system, the command, and a redacted error message. Do not send keys, private documents or index files. No fixed response time is promised.

