fix(docs): update README to reflect automatic retrieval of GitHub Client ID and update example mscp json file
This commit is contained in:
parent
b960840197
commit
03bef72664
1 changed files with 31 additions and 47 deletions
|
|
@ -36,20 +36,11 @@ The compiled binary will be placed in the `bin` directory.
|
||||||
## Authentication
|
## Authentication
|
||||||
|
|
||||||
The tool uses GitHub device flow authentication:
|
The tool uses GitHub device flow authentication:
|
||||||
1. When first run (or with `--login` flag), the tool will initiate the GitHub device flow
|
1. The tool automatically retrieves the GitHub Client ID from the registry's health endpoint
|
||||||
2. You'll be provided with a URL and a code to enter
|
2. When first run (or with `--login` flag), the tool will initiate the GitHub device flow
|
||||||
3. After successful authentication, the tool saves the token locally for future use
|
3. You'll be provided with a URL and a code to enter
|
||||||
4. The token is sent in the HTTP Authorization header with the Bearer scheme
|
4. After successful authentication, the tool saves the token locally for future use
|
||||||
|
5. The token is sent in the HTTP Authorization header with the Bearer scheme
|
||||||
### Required Environment Variable
|
|
||||||
|
|
||||||
Before using the GitHub authentication, you need to set the following environment variable:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
export MCP_REGISTRY_GITHUB_CLIENT_ID="your_github_client_id"
|
|
||||||
```
|
|
||||||
|
|
||||||
This environment variable is required for the GitHub device flow authentication. If not set, the authentication will fail.
|
|
||||||
|
|
||||||
_NOTE_ : Authentication is made on behalf of a OAuth App which you must authorize for respective resources (e.g `org`)
|
_NOTE_ : Authentication is made on behalf of a OAuth App which you must authorize for respective resources (e.g `org`)
|
||||||
|
|
||||||
|
|
@ -64,47 +55,40 @@ _NOTE_ : Authentication is made on behalf of a OAuth App which you must authoriz
|
||||||
"version_detail": {
|
"version_detail": {
|
||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
},
|
},
|
||||||
"registries": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "npm",
|
"registry_name": "npm",
|
||||||
"package_name": "your-npm-package",
|
"name": "your-npm-package",
|
||||||
"license": "MIT",
|
"version": "1.0.0",
|
||||||
"command_arguments": {
|
"package_arguments": [
|
||||||
"sub_commands": [
|
{
|
||||||
{
|
"description": "Specify services and permissions",
|
||||||
"name": "start",
|
"is_required": true,
|
||||||
"description": "Start the server",
|
"format": "string",
|
||||||
"named_arguments": null
|
"value": "-s",
|
||||||
}
|
"default": "-s",
|
||||||
],
|
"type": "positional",
|
||||||
"positional_arguments": null,
|
"value_hint": "-s"
|
||||||
"environment_variables": [
|
}
|
||||||
{
|
],
|
||||||
"name": "PORT",
|
"environment_variables": [
|
||||||
"description": "Port to run the server on",
|
{
|
||||||
"required": false
|
"name": "API_KEY",
|
||||||
}
|
"description": "API Key to access the server"
|
||||||
],
|
}
|
||||||
"named_arguments": null
|
]
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"remotes": [
|
"repository": {
|
||||||
{
|
"url": "https://github.com/yourusername/your-repository",
|
||||||
"transporttype": "http",
|
"source": "github"
|
||||||
"url": "http://yourdomain.com/api"
|
}
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Run the publisher tool:
|
2. Run the publisher tool:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# First, set the required environment variable
|
|
||||||
export MCP_REGISTRY_GITHUB_CLIENT_ID="your_github_client_id"
|
|
||||||
|
|
||||||
# Then run the publisher tool
|
|
||||||
./bin/mcp-publisher --registry-url "https://mcp-registry.example.com" --mcp-file "./mcp.json"
|
./bin/mcp-publisher --registry-url "https://mcp-registry.example.com" --mcp-file "./mcp.json"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -114,7 +98,7 @@ export MCP_REGISTRY_GITHUB_CLIENT_ID="your_github_client_id"
|
||||||
|
|
||||||
## Important Notes
|
## Important Notes
|
||||||
|
|
||||||
- The `MCP_REGISTRY_GITHUB_CLIENT_ID` environment variable must be set for GitHub authentication
|
- The GitHub Client ID is automatically retrieved from the registry's health endpoint
|
||||||
- The authentication token is saved in a file named `.mcpregistry_token` in the current directory
|
- The authentication token is saved in a file named `.mcpregistry_token` in the current directory
|
||||||
- The tool requires an active internet connection to authenticate with GitHub and communicate with the registry
|
- The tool requires an active internet connection to authenticate with GitHub and communicate with the registry
|
||||||
- Make sure the repository and package mentioned in your `mcp.json` file exist and are accessible
|
- Make sure the repository and package mentioned in your `mcp.json` file exist and are accessible
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue