Skip to main content
Glama

Minecraft Wiki MCP

api.service.ts892 B
import axios, { AxiosInstance } from "axios"; import { WIKIMEDIA_API_URL } from "../config/constants.js"; class ApiService { private axiosInstance: AxiosInstance; constructor() { this.axiosInstance = axios.create({ baseURL: WIKIMEDIA_API_URL, params: { format: "json", origin: "*", }, }); } async get<T, P extends Record<string, unknown>>(endpoint: string, params: P): Promise<T> { try { const response = await this.axiosInstance.get(endpoint, { params: { ...params, }, }); if (response.data.error) { throw new Error(response.data.error.info); } return response.data; } catch (error) { throw new Error( `API request failed: ${error instanceof Error ? error.message : "Unknown error"}` ); } } } export const apiService = new ApiService();

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/L3-N0X/Minecraft-Wiki-MCP'

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