mastra-ai/mastra · error · Error
No post-processor found for registry ${registry.name}
Error message
No post-processor found for registry ${registry.name} What it means
Each MCP registry can declare a custom `postProcessServers` function that converts the raw JSON payload into the standard server list format. If a registry has neither a custom post-processor nor a built-in one matching its format, the library cannot interpret the fetched data and throws.
Source
Thrown at packages/mcp-registry-registry/src/registry/fetch-servers.ts:37
console.info(`Fetching servers from ${registry.name} at ${registry.servers_url}`);
// Fetch the servers from the registry's servers_url
const response = await fetch(registry.servers_url);
if (!response.ok) {
throw new Error(`Failed to fetch servers from ${registry.servers_url}: ${response.statusText}`);
}
const data = (await response.json()) as unknown;
// If the registry has a custom post-processing function, use it
if (registry.postProcessServers) {
console.info(`Using custom post-processor for ${registry.name}`);
return registry.postProcessServers(data);
}
throw new Error(`No post-processor found for registry ${registry.name}`);
} catch (error) {
console.error('Error fetching servers:', error);
throw error;
}
}
/**
* Filters server entries based on provided criteria
*/
export function filterServers(
servers: ServerEntry[],
filters: {
tag?: string;
search?: string;
},
): ServerEntry[] {
let filteredServers = [...servers];
View on GitHub (pinned to 75dd419e61)
Solutions
- Provide a `postProcessServers` function on the registry definition that maps your payload to the expected server format
- Verify the registry response shape matches the format expected by built-in parsers
- Log/inspect the fetched JSON (`data`) to write the correct post-processor
- Fall back to a registry with a known/supported format
Example fix
// before
const registry = { name: 'custom', servers_url: 'https://internal/api/servers' };
// after
const registry = {
name: 'custom',
servers_url: 'https://internal/api/servers',
postProcessServers: (data) => data.servers.map(s => ({ id: s.name, url: s.endpoint }))
}; Defensive patterns
Strategy: validation
Validate before calling
if (!registry.postProcessServers && !isKnownRegistryFormat(registry)) {
throw new Error(`Registry "${registry.name}" needs a postProcessServers function`);
} Try / catch
try {
const servers = await registryManager.fetchServersFromRegistry({ registryId });
} catch (err) {
if (err instanceof Error && err.message.startsWith('No post-processor found')) {
// attach a postProcessServers to the registry definition and retry
} else throw err;
} Prevention
- Always provide postProcessServers for custom/self-hosted registries
- Validate the registry JSON response shape against the expected schema before mapping
- Pin registry API versions; watch for upstream response-format changes
- Test post-processors with a recorded sample payload
When it happens
Trigger: fetchServersFromRegistry fetches data successfully (response.ok, JSON parsed), the registry has no `postProcessServers`, and no default parser matches the registry — thrown at the end of the try block.
Common situations: Using a custom/self-hosted registry whose response shape doesn't match a known format; forgetting to attach postProcessServers when defining a custom registry; registry API changed its response schema so the default parser path no longer applies.
Related errors
- Cannot authenticate MCP server ${serverName}: it is not conf
- Cannot authenticate MCP server ${serverName}: the provider's
- Server configuration not found for name: ${serverName}
- MCP_SERVER_MODERN_HTTP_OPTIONS_INCOMPATIBLE
- Agent '${agent.name}' (key: '${agentKey}') must have a non-e
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/403a3555a0478e98.
Report an issue: GitHub.