Skip to main content
Glama
mcp-server.integration.test.ts1.8 kB
// Mock config for this test jest.mock('../../src/config', () => ({ config: { simplifierBaseUrl: 'http://localhost:8080', nodeEnv: 'test', simplifierToken: 'test-token' } })); // Mock registerTools function jest.mock('../../src/tools/index', () => ({ registerTools: jest.fn() })); // Mock registerResources function jest.mock('../../src/resources/index', () => ({ registerResources: jest.fn() })); import { SimplifierMCPServer } from '../../src/server'; describe('MCP Server Integration', () => { let server: SimplifierMCPServer; beforeEach(() => { server = new SimplifierMCPServer(); }); describe('end-to-end server functionality', () => { it('should initialize server without errors', () => { expect(server).toBeInstanceOf(SimplifierMCPServer); expect(server.getServer()).toBeDefined(); }); // TODO: Add integration tests when capabilities are implemented: // - test full MCP protocol flow (initialize -> list_tools -> call_tool) // - test error handling across the full stack // - test resource access through MCP protocol // - test prompt generation through MCP protocol // - test authentication flow when SimplifierToken is implemented // - test interaction with actual Simplifier API (with mocked responses) it('should handle graceful shutdown', () => { // Currently no cleanup needed, but test structure is here for future use expect(() => { // Any cleanup operations would go here }).not.toThrow(); }); }); describe('configuration integration', () => { it('should use environment configuration correctly', () => { // Test that server properly integrates with configuration expect(() => new SimplifierMCPServer()).not.toThrow(); }); }); });

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/SimplifierIO/simplifier-mcp'

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