We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a40f131 commit 698e191Copy full SHA for 698e191
plugins/mcp-metadata-plugin/src/utils.ts
@@ -33,7 +33,8 @@ export async function scanForMCPComponents(
33
});
34
35
// Regex to match <MCPMetadata name="serverName" /> components
36
- const mcpComponentRegex = /<MCPMetadata\s+name=["']([^"']+)["'][^>]*\/?>/g;
+ const mcpComponentRegex =
37
+ /<MCPMetadata\s+name=["']([a-zA-Z0-9_-]+)["'][^>]*\/?>/g;
38
39
for (const file of mdxFiles) {
40
try {
@@ -80,6 +81,6 @@ export async function fetchServerData(
80
81
`Failed to fetch data for MCP server "${serverName}":`,
82
error
83
);
- throw new Error(`Failed to fetch MCP server data: ${error.message}`);
84
+ throw new Error('Failed to fetch MCP server data. See logs for details.');
85
}
86
0 commit comments