Fixes #264. Adds endpoints: ``` /v0/auth/github # exchange a github token for a registry token that gives you access to namespaces io.github.username and io.github.org for your orgs /v0/auth/none # get a registry token for namespace io.modelcontextprotocol.anonymous (only for testing/local dev purposes) ``` Updates `/v0/publish` to accept one of these registry tokens. ## Motivation and Context See #264 ## How Has This Been Tested? - Running locally and getting a token from `/v0/auth/none` and then publishing to `/v0/publish` - Updating the integration tests that get a token and then publish, and them passing ## Breaking Changes This is a breaking change to the auth API. This is fine for registry given it's not deployed yet. ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change) - [x] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed ## Additional context <!-- Add any other context, implementation notes, or design decisions --> --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: adam jones <domdomegg@users.noreply.github.com>
28 lines
No EOL
988 B
Shell
28 lines
No EOL
988 B
Shell
# MCP Registry Configuration
|
|
|
|
# Server configuration
|
|
MCP_REGISTRY_SERVER_ADDRESS=:8080
|
|
|
|
# Database configuration
|
|
MCP_REGISTRY_DATABASE_TYPE=mongodb
|
|
MCP_REGISTRY_DATABASE_URL=mongodb://username:password@localhost:27017
|
|
MCP_REGISTRY_DATABASE_NAME=mcp-registry
|
|
MCP_REGISTRY_COLLECTION_NAME=servers_v2
|
|
|
|
# Application configuration
|
|
MCP_REGISTRY_LOG_LEVEL=info
|
|
MCP_REGISTRY_SEED_FILE_PATH=data/seed.json
|
|
MCP_REGISTRY_SEED_IMPORT=true
|
|
MCP_REGISTRY_VERSION=dev
|
|
|
|
# GitHub OAuth configuration
|
|
MCP_REGISTRY_GITHUB_CLIENT_ID=
|
|
MCP_REGISTRY_GITHUB_CLIENT_SECRET=
|
|
|
|
# JWT configuration
|
|
# This should be a 32-byte Ed25519 seed (not the full private key). Generate a new seed with: `openssl rand -hex 32`
|
|
MCP_REGISTRY_JWT_PRIVATE_KEY=bb2c6b424005acd5df47a9e2c87f446def86dd740c888ea3efb825b23f7ef47c
|
|
|
|
# Anonymous authentication (for development/testing only)
|
|
# When enabled, allows anyone to get tokens for publishing to io.modelcontextprotocol.anonymous/* namespace
|
|
MCP_REGISTRY_ENABLE_ANONYMOUS_AUTH=false |