You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request introduces significant updates to the authentication
system for the MCP Registry Publisher Tool. The changes focus on
transitioning to an interface-based authentication system, implementing
GitHub OAuth device flow as the default authentication method, and
restructuring the codebase for better modularity and extensibility.
Adding an interface to the publishing CLI, so that it'll be easier to
add more auth methods as they become available.
Copy file name to clipboardExpand all lines: tools/publisher/README.md
+21-18Lines changed: 21 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# MCP Registry Publisher Tool
2
2
3
-
The MCP Registry Publisher Tool is designed to publish Model Context Protocol (MCP) server details to an MCP registry. This tool currently only handles GitHub authentication via device flow and manages the publishing process.
3
+
The MCP Registry Publisher Tool is designed to publish Model Context Protocol (MCP) server details to an MCP registry. This tool uses GitHub OAuth device flow authentication to securely manage the publishing process.
4
4
5
5
## Building the Tool
6
6
@@ -20,29 +20,30 @@ The compiled binary will be placed in the `bin` directory.
-`--registry-url`: URL of the MCP registry (required)
32
-
-`--mcp-file`: Path to the MCP configuration file (required)
33
-
-`--login`: Force a new GitHub authentication even if a token already exists (overwrites existing token file)
34
-
-`--token`: Use the provided token instead of GitHub authentication (bypasses the device flow)
31
+
-`-registry-url`: URL of the MCP registry (required)
32
+
-`-mcp-file`: Path to the MCP configuration file (required)
33
+
-`-login`: Force a new GitHub authentication even if a token already exists (overwrites existing token file)
34
+
-`-auth-method`: Authentication method to use (default: github-oauth)
35
35
36
36
## Authentication
37
37
38
-
The tool uses GitHub device flow authentication:
39
-
1. The tool automatically retrieves the GitHub Client ID from the registry's health endpoint
40
-
2. When first run (or with `--login` flag), the tool will initiate the GitHub device flow
41
-
3. You'll be provided with a URL and a code to enter
42
-
4. After successful authentication, the tool saves the token locally for future use
43
-
5. The token is sent in the HTTP Authorization header with the Bearer scheme
38
+
The tool has been simplified to use **GitHub OAuth device flow authentication exclusively**. Previous versions supported multiple authentication methods, but this version focuses solely on GitHub OAuth for better security and user experience.
44
39
45
-
_NOTE_ : Authentication is made on behalf of a OAuth App which you must authorize for respective resources (e.g `org`)
40
+
1.**Automatic Setup**: The tool automatically retrieves the GitHub Client ID from the registry's health endpoint
41
+
2.**First Run Authentication**: When first run (or with the `--login` flag), the tool initiates the GitHub device flow
42
+
3.**User Authorization**: You'll be provided with a URL and a verification code to enter on GitHub
43
+
4.**Token Storage**: After successful authentication, the tool saves the access token locally in `.mcpregistry_token` for future use
44
+
5.**Secure Communication**: The token is sent in the HTTP Authorization header with the Bearer scheme for all registry API calls
45
+
46
+
**Note**: Authentication is performed via GitHub OAuth App, which you must authorize for the respective resources (e.g., organization access if publishing organization repositories).
46
47
47
48
## Example
48
49
@@ -98,7 +99,9 @@ _NOTE_ : Authentication is made on behalf of a OAuth App which you must authoriz
98
99
99
100
## Important Notes
100
101
101
-
- The GitHub Client ID is automatically retrieved from the registry's health endpoint
102
-
- The authentication token is saved in a file named `.mcpregistry_token` in the current directory
103
-
- The tool requires an active internet connection to authenticate with GitHub and communicate with the registry
104
-
- Make sure the repository and package mentioned in your `mcp.json` file exist and are accessible
102
+
-**GitHub Authentication Only**: The tool exclusively uses GitHub OAuth device flow for authentication
103
+
-**Automatic Client ID**: The GitHub Client ID is automatically retrieved from the registry's health endpoint
104
+
-**Token Storage**: The authentication token is saved in `.mcpregistry_token` in the current directory
105
+
-**Internet Required**: Active internet connection needed for GitHub authentication and registry communication
106
+
-**Repository Access**: Ensure the repository and package mentioned in your `mcp.json` file exist and are accessible
107
+
-**OAuth Permissions**: You may need to grant the OAuth app access to your GitHub organizations if publishing org repositories
0 commit comments