InContext is a project-native memory and execution layer for coding agents. It gives Codex, Claude, Cursor, or any MCP-compatible client a shared project registry, portable summaries, architecture context, local resume hashes, local git-backed execution, and auditable commit history.
- Google OAuth with Auth.js and Prisma
- GitHub OAuth support for browser and CLI login
- Multi-project registry with per-project ownership and memberships
- Prisma-backed dashboards for project context, infrastructure, and access scopes
- Project APIs for listing projects, reading context, creating summaries, and queueing commit intents
- MCP stdio server with project/context tools
- Direct local git commit execution for queued intents, gated by env flags and per-project settings
- Local
incontextCLI with browser login, project linking, handoff save, resume hashes, and local MCP mode - Per-project shared workspace board with multiple agent nodes, one notebook, and activity logs
- Project CRUD with unique-safe slug renaming
- Next.js 16
- React 19
- Prisma 7 + PostgreSQL
- Auth.js / NextAuth v5 beta
- shadcn/ui
- MCP TypeScript SDK
- Install dependencies
npm install- Copy envs
Copy-Item .env.example .env- Run Prisma migration if needed
npm run db:migrate- Start the app
npm run dev- Start the MCP server in another terminal when needed
npm run mcp:server- Or use the local CLI-first workflow
npm run cli -- help- For a global developer install of the command from this repo
npm run cli:link
incontext help- Or run the deployable MCP HTTP server
npm run mcp:httpPut these in .env:
DATABASE_URL="postgresql://app_user:app_password@your-pooled-host/incontext?schema=public"
DIRECT_URL="postgresql://app_user:app_password@your-direct-host/incontext?schema=public"
AUTH_SECRET="replace-with-a-long-random-secret"
AUTH_GITHUB_ID="your-github-oauth-client-id"
AUTH_GITHUB_SECRET="your-github-oauth-client-secret"
AUTH_GOOGLE_ID="your-google-oauth-client-id"
AUTH_GOOGLE_SECRET="your-google-oauth-client-secret"
AUTH_TRUST_HOST="true"
DIRECT_GIT_COMMITS_ENABLED="false"
GIT_PROJECTS_ROOT="E:\\context-git"
MCP_PORT="8787"
MCP_AUTH_TOKEN=""
MCP_ALLOWED_ORIGINS=""Use:
DATABASE_URLfor the app runtime connectionDIRECT_URLfor Prisma CLI and migrations when your provider gives you a separate direct connection
If your provider only gives you one PostgreSQL URL, you can set both values to the same connection string.
Use a GitHub or Google OAuth app.
Google callback:
http://localhost:3000/api/auth/callback/google
GitHub callback:
http://localhost:3000/api/auth/callback/github
If you deploy this, use the deployed host with the same callback paths.
The preferred individual-user workflow is:
- Login from terminal:
npx incontext-cli install --ide codex
npm run cli -- login --app-url https://your-vercel-domain- Link the current repo:
incontext project link your-project-slug- Save a handoff:
incontext handoff save --title "Session handoff" --content "..."- Resume later:
incontext resume <hash>- Capture an observation or inspect the current project:
incontext capture --title "Session observation" --content "What changed, what is blocked, what should be promoted later."
incontext view- Start the local MCP bridge for agents:
incontext mcp serveOnly add --allow-project-create if that agent session should be able to create a missing project.
Optional health and install checks:
incontext status
incontext doctor- Export or import a snapshot when you need portability:
incontext export --project your-project-slug --output ./your-project.json
incontext import --file ./your-project.json --mode new- Open the shared workspace for a project:
/dashboard/projects/<project-slug>
That workspace gives you:
- multiple agent nodes on a React Flow canvas
- one shared notebook per project
- activity logs showing who updated the project context
- edit/delete controls for the project itself
See CLI.md for the full local workflow.
The CLI source and package metadata live in packages/cli. That package is shaped for future npx incontext-cli ... usage, while repo-local development uses npm run cli -- ... or npm run cli:link.
The package is now published on npm as incontext-cli.
Copyable MCP config for Codex, Claude Code, or Cursor:
{
"mcpServers": {
"incontext": {
"command": "npx",
"args": ["incontext-cli", "mcp", "serve"]
}
}
}The local stdio MCP entrypoint is:
src/mcp/server.ts
The deployable HTTP MCP entrypoint is:
src/mcp/http-server.ts
Available MCP capabilities:
list_projectsget_project_detailget_project_contextcreate_projectadd_project_summaryqueue_commit_intentexecute_commit_intent
The local incontext mcp serve command also exposes:
create_projectget_current_projectget_project_workspacesearch_project_memorytimeline_project_activityget_context_entriescapture_project_observationlist_project_observationspromote_project_observationregister_project_agentupdate_shared_notebookresume_projectadd_handoffupdate_progressrecord_decisioncommit_and_push
It also exposes:
- resource:
incontext://projects - prompt:
project-handoff
For public or semi-public HTTP deployment, set:
MCP_AUTH_TOKENto requireAuthorization: Bearer <token>MCP_ALLOWED_ORIGINSto a comma-separated allowlist such ashttps://your-app.vercel.app,https://your-domain.com
GET /api/projectsPOST /api/projectsGET /api/projects/[slug]GET /api/projects/[slug]/contextPOST /api/projects/[slug]/summariesPOST /api/projects/[slug]/commitsPOST /api/projects/[slug]/commits/[commitId]/execute
All project APIs now require an authenticated session.
Queued commit intents can be executed against a local repository only when all of these are true:
DIRECT_GIT_COMMITS_ENABLED="true"GIT_PROJECTS_ROOTis set- the project has
repoLocalPath - the project has
directCommitEnabled = true - the queued intent targets the branch currently checked out in that repo
- the queued intent includes explicit relative file paths
This is intentionally strict. It is designed to be auditable and harder to misuse.
Recommended production split:
- Vercel for the frontend app
- Railway for the optional hosted MCP HTTP server
- Neon for PostgreSQL
Both deployments should share the same PostgreSQL database.
Deploy both services from the repository root. Do not configure either platform to use a frontend/ subdirectory.
See DEPLOY.md for the full Vercel + Railway setup.
This repo includes:
postinstall = prisma generate
vercel-build = prisma generate && node ./src/scripts/prisma-migrate-deploy-safe.mjs && next build
- Token storage is scaffold-level, not production-grade secret vaulting
- Direct commit execution is local-repo only, not remote GitHub push/PR automation
- Password auth is still placeholder-only
- Approval UI for queued commit execution is not built yet
npm run dev
npm run build
npm run db:migrate
npm run db:generate
npm run db:studio
npm run mcp:server