Corpus

mcp
Security Audit
Warn
Health Warn
  • License — License: Apache-2.0
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 6 GitHub stars
Code Warn
  • network request — Outbound network request in app/_components/marketing-landing.tsx
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Company knowledge. With receipts. A self-hosted AI workspace for documents, connected business data, and answers grounded in evidence.

README.md

Corpus — Company knowledge. With receipts.

CI Apache 2.0 license Public beta Contributions welcome

Quick start · Documentation · Architecture · Contribute · Issues

Your company has knowledge. Give it a memory.

Corpus is a self-hosted AI workspace for company knowledge. Bring in documents and connected business data, build a searchable company memory, and ask questions with references back to the evidence.

Built by Nuanu AI. Open source under Apache 2.0.

Public beta. This is an early release for development and evaluation. The included companies, people, and data are synthetic. See the security model and configuration guide before operating a deployment.

What is inside

Capability What it does
Knowledge with provenance Preserve references from ingested records to the documents and sources they came from.
A workspace for each company Separate application permissions from per-company indexed knowledge in Company-DB.
Documents + connected data Ingest documents and connect business systems through scoped adapters.
Answers you can inspect Retrieve company context and keep supporting references attached to answers and artifacts.
Tools for agents Expose bounded retrieval through MCP and API surfaces, with approval gates for consequential workflows.
Your infrastructure Run the application, PostgreSQL, and Company-DB yourself; configure model providers and connectors explicitly.

Connector adapters include Google Drive, Slack, Odoo, Stripe, Plaid, and custom MCP/OpenAPI services. Each requires its own setup and permissions; adapters are not a guarantee of end-to-end validation against every provider.

How it works

flowchart LR
    S[Documents & connectors] --> I[Extraction & ingestion]
    I --> K["Company-DB<br/>Company memory + source references"]
    K --> A[AI workspace & agent tools]
    A --> R[Answers with evidence]
    P[("PostgreSQL<br/>Identity, permissions & jobs")] -. Company scope .-> I
    P -. Access checks .-> A

The Next.js app handles the interface, authentication, API, and workflow orchestration. PostgreSQL stores application metadata. Company-DB keeps indexed knowledge per company. An optional Python service handles document extraction.

Explore the architecture →

Quick start

You will need: Node.js 22, npm 10+, and a running PostgreSQL 15+ database. AI chat also needs a configured supported model provider. Python 3.11+ is needed only for the optional extraction service.

git clone https://github.com/nuanu-ai/Corpus.git
cd Corpus
nvm use                       # or use your preferred Node.js version manager
npm ci
cp .env.example .env.local

Create an empty PostgreSQL database and edit .env.local:

  • Set DATABASE_URL to your database connection string.
  • Generate separate BETTER_AUTH_SECRET and COMPANY_DB_INTERNAL_SERVICE_SECRET values with openssl rand -base64 32.
  • Generate ENCRYPTION_KEY with openssl rand -hex 32.
  • Configure a supported AI provider; see configuration.

Then build Company-DB, apply the schema to your local database, and start the app:

npm run --workspace @corpus/company-db build
npm run db:push
npm run dev

Open localhost:3000.

The example configuration enables synthetic demo mode. Configure authentication, storage, workers, and connector credentials for your own deployment; disable demo mode before production use. The optional extraction service has separate Python dependencies.

Find your way around

Path Contents
app/ Next.js interface and API routes
lib/ Auth, agents, connectors, ingestion, reporting, and business logic
packages/company-db/ Per-company indexed knowledge service
extraction/ Optional Python document extraction
drizzle/ Database migrations
docs/ Architecture, configuration, and security documentation
skills/ Example agent integration material

Development

npm run release:check     # Public-export hygiene checks
npm run lint
npm run typecheck
npm test                 # Builds Company-DB, then runs the synthetic tests
npm run build

See the fixture policy and release checklist. The current synthetic test suite is deliberately small; passing it does not establish production readiness.

Make it better

Useful contributions include reproducible bugs, documentation improvements, synthetic test cases, and connector fixes. Start with the contribution guide, or open an issue describing the problem you want to solve.

Please keep real company data and credentials out of issues, fixtures, and pull requests. Report vulnerabilities through private security reporting.

Telegram Bot API support is included. User-account Telegram sync requires a separately maintained, license-compatible adapter; an MTProto client is not bundled.


Apache 2.0 · Notices · Code of conduct · Security

Reviews (0)

No results found