Junction

Technology

How Junction is built

Updated 19 November 2026

Junction is an MCP server — a Go binary that implements Anthropic’s open Model Context Protocol — connected to a declarative semantic layer, a Windows agent for on-premise systems, and a Next.js customer portal. This page describes the architecture, technology stack, security controls and cloud infrastructure for teams evaluating the product.

What Junction is

Junction is an MCP connector layer: a server that implements Anthropic’s Model Context Protocol and connects AI assistants — Claude, ChatGPT, Gemini and Microsoft Copilot — to systems that have a database, API or file format but no MCP server of their own.

The first domain is construction: mid-size general and trade contractors running Vista, Spectrum, Sage 300 CRE, CMiC, Foundation, ComputerEase, QuickBooks Desktop, Autodesk Build, e-Builder and more. The second is marketing and advertising: Meta Ads, Google Ads, Microsoft Advertising, Taboola, LinkedIn and others. The same MCP server, the same security controls and the same tool list serve both.

Junction never runs an AI model. Customers bring their own Claude, ChatGPT, Gemini or Copilot subscription. Junction’s role is the data layer: connecting those AI tools safely to the systems where the customer’s data lives.

Architecture overview

Three components, working together:

  • MCP server (cloud) — a Go binary that authenticates the AI client, checks permissions, and executes the query through the right connector: direct SQL, REST, or the agent relay.
  • Windows agent (customer-side) — a small Go binary that runs inside the customer’s own network. It dials out to the relay over a persistent WebSocket, so on-premise systems need no inbound firewall ports. The cloud sends a structured query request; the agent runs it locally and returns rows.
  • Customer portal (web) — a Next.js 16 application where customers connect their systems, manage users and roles, and view the audit log.

Request path: AI client → OAuth 2.1 token check → MCP tools → query engine → connector (direct SQL, REST, or relay → agent → SQL on the customer’s database) → rows → AI client.

Technology stack

MCP server
Go 1.27 — statically linked binary serving the Model Context Protocol over HTTP (SSE transport). Handles authentication, query execution, tenant isolation and tool dispatch.
Query engine
Translates structured MCP tool calls into parameterised SQL (SQL Server, PostgreSQL, MySQL, SQLite, Oracle) or REST calls. Caller values are always bound parameters; SQL text is built only from a signed semantic model.
Semantic layer
YAML-defined canonical model that maps business concepts (jobs, cost codes, commitments, campaigns, conversions) to each system's schema. Signed with ed25519; agents verify before running.
REST connector
Declarative JSON mappings for systems with an HTTP API (Autodesk Build, CMiC, QuickBooks Online, Meta Ads, Google Ads, Microsoft Advertising, Taboola, LinkedIn, and more). Paging, OAuth flows and report-job polling are handled inside the connector.
Windows agent
A small Go binary customers install on their own servers. Dials out to the cloud relay over a persistent WebSocket; never opens an inbound port. The cloud sends a structured query request; the agent executes it locally and returns rows. The agent verifies the signed semantic bundle before running anything.
Relay
Go WebSocket hub in the cloud. Routes structured query requests to the right agent. The cloud never sees SQL — only typed requests.
OAuth 2.1 server
Junction's own authorization server, not a third-party identity service. PKCE S256 mandatory. Issues short-lived access tokens (1 h) with rotating refresh tokens and reuse detection. Redirect URIs are exact-match to known AI clients.
Customer portal
Next.js 16 / TypeScript. Server components and server actions; Supabase for the portal database (company accounts, billing, connections). The portal is the only component that touches Supabase; the MCP server never does.
Marketing site
Next.js 16 / TypeScript, statically exported, with structured data for SEO, AEO and GEO.

Cloud infrastructure

Compute
Railway — Go API server and Windows-agent relay as containerised services. Auto-scaling replicas behind a load balancer.
Database
Supabase (PostgreSQL) for the portal. The MCP server's own tables are in a dedicated schema of the same Postgres, under a separate database role that can never read portal tables.
Agent relay
Single-instance Go WebSocket hub today; designed to move to a horizontally scalable, cloud-native deployment (Google Cloud Run, AWS ECS, or Cloudflare Durable Objects) as the agent count grows.
Static assets
Served by the Next.js runtime; moving to a CDN (Cloudflare Pages or Vercel) for the marketing site as traffic grows.
CI/CD
GitHub Actions for linting, Go tests (including a Postgres integration suite) and Next.js builds. Semantic bundles are signed with ed25519 outside CI and committed.

The architecture is cloud-agnostic: every component is a containerised Go binary or a Next.js application, with no platform-specific dependencies. The relay, the MCP server and the portal can run on GCP, AWS or Azure infrastructure as the product scales.

Security controls

Junction’s security model is its primary differentiator in the enterprise market. Every control is enforced in code and pinned by a test that fails if someone weakens it. The full set of 15 audited invariants is described on the security page. The key controls:

Read-only, enforced in code
The Go query engine produces only SELECT statements and read-only REST calls. No write path exists in the codebase.
Parameterised queries always
Caller values are bound parameters. SQL text comes only from the signed semantic model or from table and column names read from the database's own catalog, each checked against a strict character set.
Signed semantic bundle
The YAML model that shapes every query is signed with ed25519. Agents verify the signature and refuse any bundle that has changed since signing.
No SQL from the cloud
The relay sends the agent a typed Go struct (query.Request), never SQL. The agent has no code path that accepts or runs received SQL.
Tenant isolation
Every engine call requires a tenant.Principal in the Go context. One company's system is indistinguishable from a missing system for another company.
Encrypted credentials
Agent-side database passwords are encrypted in the browser to the agent's own ed25519 public key. The cloud holds only ciphertext; the agent decrypts in memory and builds the connection string itself.
Short-lived tokens
MCP access tokens are opaque, stored as hashes, and expire after 1 hour. Refresh tokens rotate on every use; reuse revokes the whole token family.
No secrets in errors
Driver errors, API bodies, hostnames and credentials are stripped before an error reaches the AI model. Expected problems get readable text; everything else becomes 'the query could not be completed'.
Audit log
Names and outcomes, never values. Every query, every sign-in, every admin action is recorded.

Stage of development

Junction is in early access. The Go MCP server, query engine, semantic layer, REST connector, Windows agent, relay and OAuth 2.1 server are built and tested. The OAuth flow has been verified end-to-end with Claude Desktop, the ChatGPT API, Google Gemini and Microsoft Copilot. First design partners are under NDA.

  • Go: ~25,000 lines, 15 audited security invariants each pinned by a named test.
  • Next.js portal: customer sign-up, connections, billing, roles and audit log — built, type-checked and unit-tested; not yet run against production Supabase.
  • Systems: 200+ mappings defined; Vista, Autodesk Build and advertising platforms awaiting first real-customer validation.
  • Windows agent: compiled and tested on macOS; real-Windows validation is the immediate next milestone.

Business model

Subscription SaaS. Plans start at $50 per month for a single system and up to five users. Larger plans add more systems and seats. Enterprise and self-hosted plans are available from $2,500 per month. See the full pricing page.

Junction does not bill for AI tokens — customers bring their own subscription. This means gross margin scales like traditional SaaS, without inference costs that grow with usage.

Open protocol

Junction implements the Model Context Protocol (MCP), an open standard published by Anthropic in 2024 and now supported by Claude, ChatGPT, Gemini and Copilot. Because Junction is a standards-compliant MCP server, it works with every current and future MCP client without code changes. The protocol specification is public at modelcontextprotocol.io.

Questions about the technology?

Write to us at [email protected] or read about the team.

30-day free trial · No credit card required

Get Started