-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathconfig-api.yaml
More file actions
85 lines (77 loc) · 2.65 KB
/
config-api.yaml
File metadata and controls
85 lines (77 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Example configuration for syncing from an API endpoint
#
# This configuration pulls registry data from the official MCP Registry API
# and syncs it to the local storage every hour.
#
# The API source type is useful for:
# - Aggregating data from multiple upstream registries
# - Consuming data from other ToolHive Registry API instances
# - Integrating with third-party MCP registry services
#
# Usage:
# thv-registry-api serve --config examples/config-api.yaml
# Sources configuration (can have multiple sources)
sources:
- name: mcp-upstream
# API endpoint configuration
api:
# Base API URL (without path)
# The sync manager will append the appropriate API paths:
# - /v0.1/servers - List all servers (with pagination support)
# - /v0.1/servers/{name}/versions - List server versions
# - /v0.1/servers/{name}/versions/{version} - Get specific version
endpoint: https://registry.modelcontextprotocol.io
# Per-registry automatic synchronization policy
syncPolicy:
# Sync interval (valid duration: 1m, 5m, 30m, 1h, 24h, etc.)
# Less frequent for upstream API to be respectful of external services
interval: "1h"
registries:
- name: default
sources: ["mcp-upstream"]
auth:
mode: anonymous
# PostgreSQL database configuration
# Store registry data in database instead of local files
database:
# For docker-compose: use service name 'postgres'
# For local development: use 'localhost'
host: postgres
port: 5432
# Application user with limited privileges (SELECT, INSERT, UPDATE, DELETE)
user: db_app
# Migration user with elevated privileges (CREATE, ALTER, DROP)
migrationUser: db_migrator
# Credentials are provided via pgpass file (see docker-compose.yaml)
database: registry
# For docker-compose: disable SSL for local network
# For production: use 'require' or 'verify-full'
sslMode: disable
# Connection pool settings
maxOpenConns: 10
maxIdleConns: 2
connMaxLifetime: "30m"
# Optional: Filter configuration to include/exclude specific servers
# This is especially useful when syncing from upstream to curate
# a subset of servers for your organization
# filter:
# # Name-based filtering
# names:
# # Only include servers matching these patterns (glob syntax)
# include:
# - "@modelcontextprotocol/*"
# - "anthropic/*"
# # Exclude servers matching these patterns
# exclude:
# - "*/experimental"
#
# # Tag-based filtering
# tags:
# # Only include servers with these tags
# include:
# - "official"
# - "verified"
# # Exclude servers with these tags
# exclude:
# - "alpha"
# - "unmaintained"