Connect an app to your AI agent from the terminal
Find an app with metorial catalog list, connect your own account with metorial setup, and get an MCP endpoint URL. Reconnect or remove it the same way.
To connect an app such as GitHub or Slack to your AI agent from the terminal, run metorial catalog list to find it, then metorial setup <catalog-item-id>. The CLI opens the app's sign-in page in your browser, waits for you to finish, and prints an MCP endpoint URL that belongs to you. Your agent then acts in that app as you, with your account and your permissions.
What you'll learn
- How to find an app in your portal's catalog
- How to connect your account and choose the sign-in method
- How to list, reconnect and remove your integrations
Before you start
- The
metorialCLI, signed in to your portal (install and sign in) - An account in the app you want to connect
Find the app in the catalog
Your portal's catalog holds the apps your administrators have published for you.
The table has three columns: Name, with the catalog item ID under it, Availability and Description. Availability tells you what to do next:
| Availability | Meaning |
|---|---|
available | You can set it up now. |
request access | An administrator has to approve you first. |
access requested | Your request is waiting for review. |
An item marked shared integration is already configured by an administrator. You skip setup and go straight to calling its tools.
To see one item in full, including its sign-in methods and tools, run:
The Auth Methods table lists each method's name, type and ID. You need the ID only if you want something other than OAuth.
Connect your account
Start setup
Run metorial setup with no argument in an interactive terminal and the CLI asks you to pick from the catalog. Add --name and --description to label the new integration.
Sign in to the app in your browser
The CLI opens a setup page and prints its URL, in case the browser does not open. Sign in to the app and approve the permissions it lists. The CLI shows Waiting for setup to complete and checks every two seconds.
Copy the endpoint
When setup finishes, the CLI prints Integration Ready with the integration's status and its endpoints. Each endpoint has an alias and a URL. You can use the alias in place of the integration ID in every later command.
Choose a different sign-in method
Setup uses OAuth when the app offers it. To connect with an API key or a personal access token instead, pass the method's ID from metorial catalog get:
Setup still opens in your browser, where you enter the token.
See what you have connected
metorial list prints Your Integrations with name, status, endpoint and description. metorial get shows one integration in detail.
Connect a second account of the same app
Each run of metorial setup creates a new integration with its own endpoint URL. To keep a work account and a personal account of the same app apart, run setup twice, sign in with a different account each time, and rename both so you can tell them apart:
Install each one into the client where it belongs.
Reconnect an integration
Run reconnect when a token has expired, when you changed your password in the app, or when you want to sign in with a different account. The endpoint URL stays the same, so clients you already configured keep working.
If you have several integrations for the same app, name the one to reconnect:
Remove an integration
The CLI asks "Delete <name>? Its endpoint URL and tokens will stop working". In a script, pass --yes to skip the question.
Ask for access
When the catalog shows request access, send a request to your portal administrators. The message is optional.
The CLI prints Access Requested with the request's status. Administrators review it in the dashboard under Workforce, Access Requests.
Check it worked
List the tools of the new integration. If the list comes back, the connection works and your agent can use it.
Troubleshooting
metorial: you don't have access to <name> yet. Run "metorial request-access <id>" to ask for it
The item needs approval. Run the command in the message and wait for an administrator.
metorial: <name> is a shared integration and is ready to use. Run "metorial tools <id>"
There is nothing to set up. An administrator connected this one for everybody.
metorial: setup session <id> expired before it was completed
The browser step took too long. Run metorial setup again.
metorial: refusing to delete <id> without confirmation. Pass --yes to confirm
remove ran without a terminal to ask in. Add --yes.