Skip to main content
Glama

Neo N3 MCP Server

by r3e-network
server-init.test.ts1.28 kB
import { config, NetworkMode } from '../src/config'; // Mock the NeoService and ContractService to avoid actual network calls jest.mock('../src/services/neo-service', () => { return { NeoService: jest.fn().mockImplementation(() => ({ getNetwork: jest.fn().mockReturnValue('mainnet') })), NeoNetwork: { MAINNET: 'mainnet', TESTNET: 'testnet' } }; }); jest.mock('../src/contracts/contract-service', () => { return { ContractService: jest.fn().mockImplementation(() => ({ getNetwork: jest.fn().mockReturnValue('mainnet') })) }; }); describe('Server Initialization', () => { let originalNetworkMode: NetworkMode; beforeEach(() => { // Save the original network mode originalNetworkMode = config.networkMode; // Clear mocks jest.clearAllMocks(); }); afterEach(() => { // Restore the original network mode (config as any).networkMode = originalNetworkMode; }); test('NetworkMode is correctly defined', () => { expect(NetworkMode.MAINNET_ONLY).toBe('mainnet_only'); expect(NetworkMode.TESTNET_ONLY).toBe('testnet_only'); expect(NetworkMode.BOTH).toBe('both'); }); test('Default network mode is BOTH', () => { expect(config.networkMode).toBe(NetworkMode.BOTH); }); });

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/r3e-network/neo-n3-mcp'

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