Skip to main content
Glama

Next.js MCP Server Template

by hiltonbrown
jest.config.js1.32 kB
const nextJest = require('next/jest') const createJestConfig = nextJest({ // Provide the path to your Next.js app to load next.config.js and .env files dir: './', }) // Add any custom config to be passed to Jest const customJestConfig = { setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], moduleNameMapper: { // Handle module aliases (this will be automatically configured for you based on your tsconfig.json paths) '^@/(.*)$': '<rootDir>/$1', }, moduleDirectories: ['node_modules', '<rootDir>'], testEnvironment: 'jest-environment-jsdom', collectCoverageFrom: [ 'app/**/*.{js,jsx,ts,tsx}', 'lib/**/*.{js,jsx,ts,tsx}', '!app/**/layout.tsx', '!app/**/page.tsx', '!app/**/loading.tsx', '!app/**/error.tsx', '!**/*.d.ts', '!**/node_modules/**', ], testMatch: [ '<rootDir>/**/__tests__/**/*.{js,jsx,ts,tsx}', '<rootDir>/**/*.{test,spec}.{js,jsx,ts,tsx}', ], moduleDirectories: ['node_modules', '<rootDir>/'], testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'], transformIgnorePatterns: [ '/node_modules/(?!(@modelcontextprotocol|other-esm-packages)/)', ], } // createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async module.exports = createJestConfig(customJestConfig)

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/hiltonbrown/xero-mcp-with-next-js'

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