Skip to content

Guide · Agent skill

How to use the MCP access and admin agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The mcp-access skill teaches an AI agent how to administer an existing GBrain server, the system that hosts a personal knowledge base for AI tools over MCP (Model Context Protocol). It is written for owners and operators who need to decide which AI clients can connect, and what they are allowed to do. After reading this guide you will know what the skill does, how to install it, how to ask for it in plain language, and which safety limits it follows.

MCP access and admingarrytan/gbrain · MIT

Quick start

  1. 1Download and unzip the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings, Capabilities, Skills in the Claude apps.
  2. 2Confirm your prerequisites. Make sure the gbrain CLI is available, you have the server URL, and you hold the owner admin token as a private file or in GBRAIN_ADMIN_BOOTSTRAP_TOKEN.
  3. 3State your goal in plain language. Ask for what you want, such as registering a client or revoking one, and name the client if you know it.
  4. 4Review the preview. The agent runs a dry-run that shows the before and after state. Read it before approving anything.
  5. 5Approve the reviewed change. Confirm the specific action. The agent then applies it with the version check from the preview.
  6. 6Verify the result. Ask the agent to re-read the client list or whoami, and confirm the change matches what you approved.

What the mcp-access skill makes the agent do

An agent skill is a folder with a SKILL.md file that gives an agent extra instructions for a specific task. When this skill is installed, the agent knows how to administer a GBrain server you already run. It can generate single-use owner login links for the admin dashboard, register or grant access to MCP clients, preview and apply permission changes, and revoke, invalidate or delete client access.

The skill also explains how to connect a native OAuth client and how to recover from failed or unclear operations. It is about administration, not daily use. Someone who only reads or writes notes through an already connected client does not need it.

  • Open the owner dashboard by generating a login link
  • Create, inspect and grant access to MCP clients
  • Preview and apply permission changes before they take effect
  • Revoke, invalidate tokens for, or delete client access
  • Walk through native OAuth setup and recover from failed operations

Install the mcp-access skill

Download the ZIP for this skill from this page. Unzip it into one of two places. For a personal setup, use ~/.claude/skills/. For a single project, use the .claude/skills/ folder inside that project.

If you use the Claude apps instead, open Settings, then Capabilities, then Skills, and upload the skill there.

  • Personal install: unzip into ~/.claude/skills/
  • Project install: unzip into .claude/skills/ in your project folder
  • Claude apps: Settings → Capabilities → Skills, then upload

What you need before the agent can help

The skill does not grant any authority. The agent cannot log in on its own, so you need the following before you start. The skill's own requirements list them, and the agent will stop if any are missing.

  • GBrain CLI, meaning the gbrain command with its mcp admin subcommands
  • Access to a running GBrain server URL
  • An owner admin token, supplied either as a private file or through the GBRAIN_ADMIN_BOOTSTRAP_TOKEN environment variable
  • Permission for the agent to run gbrain commands through its exec tool

Trigger the skill with natural requests

You do not need special syntax. Ask in plain language, and the skill's triggers will match phrases such as the ones below. The listed triggers are examples; wording close to them should work too.

Keep requests specific about the goal. Saying what client you are connecting, or which access you want to change, helps the agent pick the right commands.

  • "GBrain admin login link"
  • "open the MCP admin panel"
  • "manage MCP clients"
  • "register an MCP client"
  • "set up MCP OAuth"
  • "connect this harness to my hosted brain"
  • "invalidate MCP tokens"
  • "revoke an MCP client"
  • "delete an MCP client"
  • "edit MCP access levels"

Example workflows

Before any change, the agent previews it. For a permission change, it runs the grant command with a dry-run flag, which shows the before and after state. Once you approve the reviewed action, it applies the change. Removed authority takes effect immediately. Expanded scopes need fresh native authorization or a newly issued machine token.

Ending access works the same way. Invalidating tokens removes access and refresh tokens and authorization codes, but keeps the client and its secret, so a machine credential can still obtain new tokens. Revoking disables access. Deleting removes the registration while audit history remains. The agent will not treat one of these as a substitute for another.

  • Give a new AI assistant access to your hosted brain for machine use
  • Set up a native OAuth client that asks you to approve consent in your browser
  • Narrow an existing client's permissions after a review
  • Stop a client from using old tokens while keeping its registration
  • Permanently remove a client you no longer use

Safety notes: scripts and network

This skill runs scripts and uses the network. Its commands run against your server's HTTP endpoint, using the live database connection. The agent should not open a second local database process, delete its lock, or start another server to get administrative access.

The skill also follows strict rules. It previews before changing anything. It never prints secrets. It never tries broader OAuth scopes to get around a missing permission. Login links are sensitive and single-use, so they should be delivered privately to the owner. Because commands can create, change or delete access to a personal knowledge base, only use this skill with servers you own or trust.

  • Use only with servers you own or trust
  • Tokens are read from a private file or protected environment variable and are not printed
  • Preview first, then apply with an explicit confirmation
  • If a request fails after it was sent, the agent re-checks the client list before retrying

Tips and troubleshooting

If you see insufficient_scope or invalid_token on an MCP call, the problem is a grant the owner must change. The agent should tell you which scope is missing rather than trying broader scopes. If a list call fails, that is an error, not an empty list. If a tool is missing, the grant diagnosis explains which blocker is involved.

When you hand recovered native setup back to a client, remember that two steps remain. The native client starts PKCE authorization, and the owner reviews and approves consent. Recovering a secret alone does not finish the connection.

  • Read the error code before changing anything
  • Treat a failed list as unknown, not as empty
  • Owner login leads to a separate consent review
  • An expired request or server restart means restarting the connection in the native client
  • A new login link does not restore an expired authorization request

What people use it for

  • Generating a single-use owner login link so you can open the admin dashboard privately
  • Registering a new MCP-compatible assistant and granting it machine access to your hosted brain
  • Setting up a native OAuth client with the correct redirect URI and authentication method
  • Narrowing or expanding an existing client's permissions after a reviewed preview
  • Revoking a lost client, or deleting one you no longer use, while keeping audit history
  • Diagnosing insufficient_scope or invalid_token errors and telling the owner which scope is missing

Frequently asked questions

What is the mcp-access agent skill?

It is an agent skill, a folder with a SKILL.md file, that teaches an AI agent how to administer an existing GBrain server. It covers owner login links, MCP client registration, permission changes, and revoking or deleting access. It does not handle everyday reading and writing of notes.

How do I install the mcp-access skill?

Download the ZIP from the page and unzip it into ~/.claude/skills/ for a personal install, or into .claude/skills/ inside a project. In the Claude apps, go to Settings, then Capabilities, then Skills, and upload it there.

What do I need to use mcp-access?

You need the gbrain CLI with its mcp admin subcommands, the URL of a running GBrain server, an owner admin token supplied as a private file or through GBRAIN_ADMIN_BOOTSTRAP_TOKEN, and permission for the agent to run gbrain commands. The skill grants no authority by itself.

Is the mcp-access skill free, and what is its licence?

The source for this skill is published under the MIT licence. The licence does not say anything about pricing for your own use of GBrain, so check the project's repository for any details beyond the licence itself.

Can the agent log in to my GBrain server for me?

No. The skill cannot log in on its own. The agent can generate a single-use login link, which is sensitive and should go privately to the owner, who signs in by opening it. An ordinary MCP token or admin scope does not allow dashboard login or client management.

What should I do when I get insufficient_scope or invalid_token?

These errors mean the client's grant needs to be changed by the owner. Do not try broader OAuth scopes. Tell the owner which scope is missing and let them make the change through the reviewed preview process.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you run or operate a GBrain server and need to control which AI clients can connect to it, or you are setting up a hosted brain for a new MCP-compatible tool. Do not use it if you only read and write notes through a client that is already connected, or if you lack the owner credentials for the server. For servers you do not own or trust, do not use it, because its commands can change access to a personal knowledge base.

Download the skill