fix: skip Anthropic MCP registry fetch for third-party providers (#310)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import axios from 'axios'
|
||||
import { logForDebugging } from '../../utils/debug.js'
|
||||
import { errorMessage } from '../../utils/errors.js'
|
||||
import { getAPIProvider } from '../../utils/model/providers.js'
|
||||
|
||||
type RegistryServer = {
|
||||
server: {
|
||||
@@ -35,6 +36,11 @@ export async function prefetchOfficialMcpUrls(): Promise<void> {
|
||||
return
|
||||
}
|
||||
|
||||
// Anthropic's official MCP registry is only relevant for first-party mode.
|
||||
if (getAPIProvider() !== 'firstParty') {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await axios.get<RegistryResponse>(
|
||||
'https://api.anthropic.com/mcp-registry/v0/servers?version=latest&visibility=commercial',
|
||||
|
||||
Reference in New Issue
Block a user