Skip to content

Commit 331cebb

Browse files
committed
docs: quick start external auth
1 parent 1124dd7 commit 331cebb

2 files changed

Lines changed: 10 additions & 49 deletions

File tree

Lines changed: 9 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,16 @@
1-
# MCP Server: External Auth Provider
1+
# External Auth
22

3-
Demonstrates connecting an external MCP server (GitHub) using a manually configured OAuth provider. You register your own OAuth credentials and Slack brokers the per-user authorization flow.
4-
5-
## How it works
6-
7-
1. You create a GitHub OAuth App and get a client ID + secret
8-
2. Define the OAuth provider in `external_auth_providers` in your manifest
9-
3. Reference it via `auth_provider_key` in your `mcp_servers` config
10-
4. Users authorize with GitHub when they first connect in Slackbot
11-
5. Slack stores per-user tokens and passes them to the MCP server
12-
13-
No app code is needed — GitHub hosts the MCP server. This manifest is all you need.
3+
Connect a remote MCP server with manual OAuth provider configuration.
144

155
## Setup
166

17-
1. Create a GitHub OAuth App at [github.com/settings/developers](https://github.com/settings/developers)
18-
- Set the callback URL to: `https://oauth2.slack.com/external/auth/callback`
19-
2. Replace `YOUR_GITHUB_CLIENT_ID` in `manifest.json`
20-
3. Create a new app at [api.slack.com/apps](https://api.slack.com/apps) using the manifest
21-
4. Add the client secret via the **External MCP Servers** section in the App Config UI
22-
5. Install the app to your workspace
23-
24-
## Try it
25-
26-
Ask Slackbot: _"Show me my recent GitHub pull requests"_
27-
28-
## Manifest
7+
> Callback URL: https://oauth2.slack.com/external/auth/callback
298
30-
```json
31-
"external_auth_providers": {
32-
"oauth2": {
33-
"github": {
34-
"provider_type": "CUSTOM",
35-
"options": {
36-
"client_id": "YOUR_GITHUB_CLIENT_ID",
37-
"authorization_url": "https://github.com/login/oauth/authorize",
38-
"token_url": "https://github.com/login/oauth/access_token",
39-
"identity_config": {
40-
"url": "https://api.github.com/user",
41-
"account_identifier": "$.login"
42-
}
43-
}
44-
}
45-
}
46-
},
47-
"mcp_servers": {
48-
"github": {
49-
"url": "https://api.githubcopilot.com/mcp/",
50-
"auth_provider_key": "github"
51-
}
52-
}
9+
```sh
10+
$ open https://github.com/settings/developers # Create GitHub app
11+
$ slack manifest # Replace values
12+
$ slack install --environment deployed # Create Slack app
13+
$ slack external-auth add-secret --force
5314
```
5415

55-
The `auth_provider_key` links the MCP server to the OAuth provider defined in `external_auth_providers`.
16+
Ask Slackbot: "Show me my recent GitHub pull requests"

ai/mcp-client/external-auth/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"provider_type": "CUSTOM",
2626
"options": {
2727
"client_id": "YOUR_GITHUB_CLIENT_ID",
28-
"scope": [],
28+
"scope": ["repo"],
2929
"provider_name": "GitHub",
3030
"authorization_url": "https://github.com/login/oauth/authorize",
3131
"token_url": "https://github.com/login/oauth/access_token",

0 commit comments

Comments
 (0)