How do you connect an AI agent to company tools with per-user permissions?

Put one MCP endpoint in front of your company knowledge and have each person's agent sign in as that person. The endpoint resolves who is asking on every call and answers only from what they can already open at work. No agent holds a shared key to your tools.

Last updated 14 November 2026 · Mert Uzun, Co-Founder

Why it matters

21%

of CISOs govern AI agent access with shared credentials. (Okta, Global CISO Insights 2026)

46%

of CISOs are confident they can centrally control what AI agents access. (Okta, Global CISO Insights 2026)

90%

of professional developers use AI coding agents every week. (JetBrains, August 2026)

How it works in practice

The usual shortcut is one API key per tool, pasted into each agent's settings. Every person who uses that agent then reaches everything the key can reach.

Per-user permissions move the check from the agent to the endpoint. The agent carries a short-lived token that names a person, and the endpoint applies that person's access before anything reaches the model.

The person signs in once, through your company login, and the agent refreshes the token by itself. Nobody copies a credential into a file.

Keep the endpoint inside your network. Desktop and coding agents on a work laptop or VPN reach it without opening anything to the internet.

Set it up

  1. Step 1

    Run the memory in your own cloud and switch on its MCP endpoint at an address on your corporate network or VPN.

    .env
    MITHRANDIR_BASE_URL=https://mithrandir.corp.example.com
    MCP_HTTP_ENABLED=true
  2. Step 2

    Add the address to each person's agent. The file holds no key, so it is safe to share or commit. The first time, the agent opens your company sign-in, and every call after that runs as that person.

    .mcp.json (Claude Code; Cursor, Codex and others take the same URL)
    {
      "mcpServers": {
        "mithrandir": {
          "type": "http",
          "url": "https://mithrandir.corp.example.com/mcp"
        }
      }
    }
  3. Step 3

    Check the door. A call with no credential is refused, and the answer tells the agent where to sign in.

    terminal
    curl -i https://mithrandir.corp.example.com/mcp
    
    HTTP/2 401
    www-authenticate: Bearer resource_metadata="https://mithrandir.corp.example.com/.well-known/oauth-protected-resource/mcp"
  4. Step 4

    For scripts and CI only, use a seat token for that job and name it in the file instead of pasting it. The agent reads the value from its environment when it connects.

    .mcp.json, scripts and CI
    "headers": {
      "Authorization": "Bearer ${MITHRANDIR_MCP_TOKEN}"
    }
  5. Step 5

    Prove it with two people. Ask the same question as someone in finance and someone in engineering. The answers should differ, each limited to what that person can open.

How Mithrandir does it

  • One MCP endpoint in your own cloud, kept on your network by default. Each person signs in through your company login.

  • Every call is checked against that person's access, mirrored from each tool, with your hierarchy where a tool has none.

  • Works in Claude, ChatGPT, Copilot, Cursor and 16 more agents. 0 leaks across 30,000+ entries.

Questions

Can we just give the agent an API key for each tool?
You can, and every person using that agent then sees everything the key can reach. A per-person sign-in is what makes two people get different answers.
Does this work with claude.ai and ChatGPT in the browser?
Their connectors call from the vendor's cloud, so the endpoint has to be reachable from the internet. Mithrandir keeps it on your network by default, and opening it to those vendors is a separate decision for your admins. Desktop and coding agents connect from inside.
What happens when someone leaves a team?
Their access changes in the tool, and their answers change with it. Tokens last minutes, and the person behind each call is checked again every time.
Where do the answers go?
To the model provider behind the agent the person uses, as with any agent. Content the person cannot access is left out before that, so it never reaches a model.

Remember.

Every company needs agents that know it. We are here for that.

Remember more. Spend less.

Bring one workflow. See it on your own data in 30 minutes.