Skip to main content
Glama

MCP Frontend Testing Server

index.ts1.33 kB
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; export function registerPrompts(server: McpServer): void { // Simplified implementation to avoid TypeScript errors // These prompts will be used by the LLM to generate test code // Unit test prompt server.prompt( 'create-unit-test', 'Create a unit test for the given code', () => ({ messages: [{ role: 'user', content: { type: 'text', text: 'Please create a unit test for the provided code.', }, }], }) ); // Component test prompt server.prompt( 'create-component-test', 'Create a test for a React component', () => ({ messages: [{ role: 'user', content: { type: 'text', text: 'Please create a test for this React component. Focus on testing the component\'s functionality, props, and user interactions.', }, }], }) ); // Fix failing test prompt server.prompt( 'fix-failing-test', 'Fix a failing test', () => ({ messages: [{ role: 'user', content: { type: 'text', text: 'I have a test that\'s failing. Please help me fix it by explaining what\'s wrong and providing a fixed version of the test.', }, }], }) ); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/StudentOfJS/mcp-frontend-testing'

If you have feedback or need assistance with the MCP directory API, please join our Discord server