axios+telemetry cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import axios from 'axios'
|
||||
import { logForDebugging } from '../../utils/debug.js'
|
||||
import { errorMessage } from '../../utils/errors.js'
|
||||
import { nativeRequest } from '../../utils/http.js'
|
||||
|
||||
type RegistryServer = {
|
||||
server: {
|
||||
@@ -36,13 +36,13 @@ export async function prefetchOfficialMcpUrls(): Promise<void> {
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await axios.get<RegistryResponse>(
|
||||
const { data } = await nativeRequest<RegistryResponse>(
|
||||
'https://api.anthropic.com/mcp-registry/v0/servers?version=latest&visibility=commercial',
|
||||
{ timeout: 5000 },
|
||||
)
|
||||
|
||||
const urls = new Set<string>()
|
||||
for (const entry of response.data.servers) {
|
||||
for (const entry of data.servers) {
|
||||
for (const remote of entry.server.remotes ?? []) {
|
||||
const normalized = normalizeUrl(remote.url)
|
||||
if (normalized) {
|
||||
|
||||
Reference in New Issue
Block a user