Developers / MCP

Elevated Context MCP

Governed context for MCP clients

On request

Elevated Context MCP is a local Model Context Protocol server exposing a single read-only tool, ec_request_context. When an MCP-capable AI client calls it, the tool asks the Elevated Context gateway for governed context on behalf of the signed-in person. The gateway is the sole decision point: it establishes identity, confirms permission, narrows to what the purpose needs, and returns references to the allowed context — or a governed outcome like Withheld or Denied. The client never carries authority.

What this is, and isn’t. This is a working local pilot. It is a local stdio MCP server for a human principal — not a hosted/remote server, not an action tool, not a model. It is not on a public npm registry; pilot developers receive it as a versioned install bundle (built and ready to run under plain Node — no separate build step, no TypeScript loader). It is qualified on Windows today. Before you complete the one-time native sign-in, a context request correctly returns ReauthRequired.

Before you start

1. Install the connector

Unpack the pilot bundle to a folder and install it. It installs the ec-mcp executable from vendored tarballs — no Elevated Context source checkout required, and it runs under plain Node:

npm install            # from inside the unpacked bundle folder
npx ec-mcp version     # -> [ec-mcp] adapter 0.1.0 (operator-control protocol v1)

2. Add it to your MCP client

Register ec-mcp as a local MCP server. The only configuration is the non-secret origin of the Elevated Context API, which comes with your invitation. Never put a token, cookie, or key in config, environment, or arguments — the server refuses to start if it finds one.

{
  "mcpServers": {
    "elevated-context": {
      "command": "npx",
      "args": ["ec-mcp", "serve"],
      "env": { "EC_API_ORIGIN": "https://<your-ec-origin>" }
    }
  }
}

EC_API_ORIGIN is a public address, not a secret. There is no default — the server exits if it is missing or not https.

3. Sign in (native login)

The server starts unauthenticated. Authentication is an explicit, user-side native sign-in — the tool can never log you in on its own, and it never reads your browser cookies or stores a long-lived token. Run the login command; it opens your system browser to Google sign-in:

npx ec-mcp login       # opens Google sign-in; session held in memory only
npx ec-mcp status      # authenticated | unauthenticated | expired
npx ec-mcp logout      # revoke + clear the in-memory session

The session is held in memory only; if the process restarts, you sign in again. Until you sign in, a context request returns ReauthRequired with guidance — this is correct fail-closed behavior, not an error.

4. Request context

Your AI client calls ec_request_context. You supply a controlled purpose and, optionally, a narrow scope — never a raw prompt, an identity, or a tenant. The request narrows what you are already permitted to see; it can never widen it.

{
  "purpose_id": "GENERAL_QA",
  "requested_scope": { "sensitivity_ceiling": "INTERNAL" },
  "surface_metadata": { "surface": "mcp-stdio" }
}

5. Read the outcome

The tool returns a governed outcome. A governance denial is a successful tool result, not a transport error — your client should read the outcome and act on it:

Where approvals appear

When a request needs your consent, it shows up in the app under App Permissions. You approve exactly the scope you were shown, for one purpose, for future requests — and you can revoke it at any time. A revoke stops future releases; it cannot recall context already disclosed.

Common issues

← All developer paths Governed request API →