Skip to main content
Glama
apolosan

Design Patterns MCP Server

by apolosan
mcp-resources-contract.test.ts1.49 kB
/** * Contract Tests for MCP Resources * Tests MCP protocol compliance for all resource implementations */ import { describe, test, expect } from 'vitest'; // Import server implementation import { createDesignPatternsServer } from '../../src/mcp-server.js'; describe('MCP Resources Contract Tests', () => { test('should create MCP server successfully', async () => { // This test verifies that the MCP server implementation exists and can be created const config = { databasePath: './data/design-patterns.db', logLevel: 'info' as const, enableLLM: false, maxConcurrentRequests: 10, }; const server = createDesignPatternsServer(config); expect(server).toBeDefined(); expect(typeof server.start).toBe('function'); expect(typeof server.stop).toBe('function'); }); test('should have MCP resources handler', async () => { // This test verifies that the resources handler is properly implemented const config = { databasePath: './data/design-patterns.db', logLevel: 'info' as const, enableLLM: false, maxConcurrentRequests: 10, }; const server = createDesignPatternsServer(config); // Check if the server has the required handlers registered // The server should have handlers for ReadResourceRequestSchema and ListResourcesRequestSchema expect(server).toBeDefined(); expect(typeof server.start).toBe('function'); expect(typeof server.stop).toBe('function'); }); });

Latest Blog Posts

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/apolosan/design_patterns_mcp'

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