Registry Server
The PKP Registry Server aggregates multiple PKP catalogs for global product discovery.
Installation
npm install -g @pkprotocol/registry-serverUsage
pkp-registry-server [options]In-Memory Storage (default)
pkp-registry-server --domain pkp.kodda.aiPostgreSQL Storage
For production use with persistence and full-text search:
pkp-registry-server --storage postgresql \
--pg-host localhost \
--pg-database pkp \
--pg-user pkp \
--domain pkp.kodda.aiPostgreSQL Options:
| Option | Description |
|---|---|
--storage postgresql | Enable PostgreSQL storage |
--pg-host <host> | PostgreSQL host (default: localhost) |
--pg-port <port> | PostgreSQL port (default: 5432) |
--pg-database <db> | Database name (required) |
--pg-user <user> | Database user (required) |
--pg-password <pass> | Database password |
--pg-ssl | Enable SSL connection |
Environment Variables:
export PGHOST=localhost
export PGPORT=5432
export PGDATABASE=pkp
export PGUSER=pkp
export PGPASSWORD=secretDatabase Setup
Run migrations before using PostgreSQL:
psql -d pkp -f migrations/001_create_pkp_domains.sql
psql -d pkp -f migrations/002_create_pkp_registry_index.sql
psql -d pkp -f migrations/003_create_pkp_query_log.sql
psql -d pkp -f migrations/004_create_fulltext_search_pt.sqlMCP Configuration
{
"mcpServers": {
"pkp-registry": {
"command": "pkp-registry-server",
"args": ["--domain", "registry.pkp.dev"]
}
}
}Tools
search_products
Search products across all registered catalogs.
{
query?: string,
category?: string,
brand?: string,
domain?: string, // Filter by catalog domain
min_price?: number,
max_price?: number,
limit?: number
}resolve_product
Resolve a PKP URI to product details.
{
uri: string // e.g., "pkp://store.example.com/iphone-16-pro"
}register_catalog
Register a new catalog in the registry.
{
domain: string // Domain hosting the catalog
}refresh_catalog
Re-crawl and update a registered catalog.
{
domain: string
}unregister_catalog
Remove a catalog from the registry.
{
domain: string
}list_catalogs
List all registered catalogs.
list_categories
List all categories across catalogs.
get_registry_stats
Get registry statistics (catalog count, product count, etc).
compare_across_catalogs
Compare products from different catalogs.
{
uris: string[] // Array of PKP URIs
}Resources
pkp://registry/stats
Registry statistics.
pkp://registry/catalogs
List of registered catalogs.
Product URIs
The registry uses PKP URIs for global product identification:
pkp://{domain}/{sku}Examples:
pkp://apple.com/iphone-16-propkp://samsung.com/galaxy-s25-ultrapkp://store.example.com/my-product
Catalog Discovery
The registry discovers catalogs by fetching:
https://{domain}/.well-known/pkp/catalog.jsonCatalogs must follow the PKP specification to be indexed.