Skip to content
Source

Connect a server that needs sign-in

Some MCP servers, such as Notion, have no API key to paste. You sign in to them in a browser. You want the factory to use that sign-in, and to keep it working.

Connect the server with OAuth sign-in. The forge keeps the token, refreshes it, and tells you when you must sign in again.

You need admin access to the repository, or owner access to the organization. The sign-in works only in the web app.

1. Start the connection

  1. Open the repository's MCP tab, or the organization's MCP servers tab.
  2. In Connect a server, type a Name, for example notion.
  3. In Server URL, type the https URL of the server, for example https://mcp.notion.com/mcp.
  4. Under Credential, select OAuth sign-in.

For a built-in server, such as Notion, click its name under Popular servers on the repository's MCP tab. The form opens with the server filled in.

For another server that has a listing, open the listing. Then click Connect to a repository or Connect to an organization. The form opens with the server filled in.

2. Sign in

  1. Click Sign in. The sign-in screen of the server opens.
  2. Sign in, and allow the access.

The browser comes back to the MCP page. The forge keeps the token and lists the tools. The card shows the badges OAuth and Connected.

You have 10 minutes to sign in. After that, click Sign in again. If the sign-in fails, the MCP page shows the reason in a red alert.

3. Pick the agents and the tools

Select the Agents, turn on the Tools, then click Save agents and tools. This step is the same for every connection: see Pick the agents.

Done

The agents that you picked can call the tools that are on. When a run needs the token and the token is about to expire, the forge refreshes it. You do not sign in again for each run.

If the card says Needs sign-in

If the server refuses to refresh the token, the card shows Needs sign-in. The agents get none of its tools until you sign in again.

  1. Click Sign in again on the card.
  2. Sign in on the screen of the server.

The card shows Connected again. The agents and the tools stay as they were.

If the sign-in does not start

The forge registers itself with the server as an OAuth client. Some servers do not let a client register itself. For such a server, the marketplace listing needs a pre-registered OAuth client: see Publish an MCP server.

From the CLI, REST or MCP

These channels list, change and delete an OAuth connection. They cannot start a sign-in, because it needs a browser.

For a listing that signs in with OAuth, src mcp connect prints the web page that connects it:

src mcp connect notion --listing builtin/notion

Open the page, then follow step 2.