agentgate-mcp
v0.3.1
Published
MCP server that lets AI agents get API keys for any service via Google sign-in
Maintainers
Readme
AgentGate
MCP server that gives AI agents a browser with your Google session. The agent sees screenshots, decides what to click, and grabs API keys from any service.
How it works
You: "Get me a Twelve Labs API key"
Agent: get_or_create_key("twelvelabs") → no key cached
Agent: open_browser("https://twelvelabs.io") → sees screenshot
Agent: click("Sign in with Google") → sees dashboard
Agent: goto("https://twelvelabs.io/api-keys") → sees API keys page
Agent: click("Create API Key") → sees new key
Agent: extract_text(".api-key") → reads the key
Agent: save_key("twelvelabs", "tl_key_abc...") → cached for next time
Agent: close_browser() → doneThe AI agent is the brain. AgentGate is the hands.
Install
npm install -g agentgate-mcpRequires Node.js 23+.
Setup (one time)
agentgate loginOpens Chromium — sign into Google, close the browser. Done.
Add to Claude Code
agentgate setupOne command — registers the MCP server and auto-approves all tools so Claude never pauses for confirmation.
claude mcp add agentgate -- agentgate serve
claude config add allowedTools "mcp__agentgate__*"MCP Tools
| Tool | What it does |
|------|-------------|
| get_or_create_key | Check if a key is cached for a service |
| open_browser | Open browser with Google session, go to URL, return screenshot |
| browser_action | Click, fill, scroll, extract text — returns screenshot after each action |
| save_key | Store an API key the agent found |
| close_browser | Close the browser |
| list_my_keys | List all stored keys |
| revoke_key | Delete a stored key |
open_browser
{ "url": "https://platform.openai.com/signup" }Returns a screenshot of the page so the agent can see it.
browser_action
{ "action": "click", "selector": "text=Sign in with Google" }
{ "action": "fill", "selector": "input[name=email]", "value": "[email protected]" }
{ "action": "goto", "url": "https://platform.openai.com/api-keys" }
{ "action": "extract_text", "selector": ".api-key" }
{ "action": "scroll", "value": "500" }
{ "action": "press", "key": "Enter" }
{ "action": "wait", "selector": ".loaded", "ms": 5000 }
{ "action": "screenshot" }
{ "action": "extract_all_text" }Every action returns a screenshot so the agent always sees what happened.
save_key
{ "service": "openai", "api_key": "sk-..." }get_or_create_key
{ "service": "openai" }Returns cached key or { "exists": false }.
Commands
| Command | Description |
|---------|-------------|
| agentgate login | Sign in with Google (opens browser) |
| agentgate serve | Start MCP server |
| agentgate doctor | Health check |
Security
- Google session stays on your machine (
~/.agentgate/browser-profile/) - API keys stored in local SQLite database
- No cloud, no telemetry
- The agent can only use YOUR authenticated session
Development
git clone https://github.com/junaid-mahmood/Agent-Gate.git
cd Agent-Gate
npm install
npx playwright install chromium
npm testLicense
MIT
