We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/searchcraft-inc/searchcraft-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import { describe, it, expect, beforeEach } from 'vitest';
import { createMcpServer } from '../../src/create-mcp-server';
describe('createMcpServer', () => {
it('should create an MCP server instance', () => {
const server = createMcpServer();
expect(server).toBeDefined();
expect(server).toHaveProperty('connect');
expect(server).toHaveProperty('close');
expect(server).toHaveProperty('tool');
});
it('should have correct server name and capabilities', () => {
const server = createMcpServer();
// Access internal properties to verify configuration
// Note: This tests the server was created with correct config
expect(server).toBeDefined();
});
it('should register all tools', async () => {
const server = createMcpServer();
// The server should have tools registered
// We can verify this by checking that the server instance exists
// and has the tool registration method
expect(typeof server.tool).toBe('function');
});
it('should create independent server instances', () => {
const server1 = createMcpServer();
const server2 = createMcpServer();
expect(server1).not.toBe(server2);
});
});