Skip to main content
Glama
CodeDreamer06

MonkeyType MCP Server

get_configuration

Retrieve server configuration settings for the MonkeyType MCP Server to access typing test data, user profiles, leaderboards, and statistics.

Instructions

Get server configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'get_configuration' tool. It calls the MonkeyType API endpoint '/configuration' using the shared callMonkeyTypeApi helper and returns the JSON-formatted result.
    case "get_configuration": { const result = await callMonkeyTypeApi('/configuration', 'GET', apiKey); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
  • Zod schema definition for the 'get_configuration' tool input, which extends BaseApiSchema and requires no parameters.
    const GetConfigurationSchema = BaseApiSchema.extend({});
  • server.js:270-274 (registration)
    Registration of the 'get_configuration' tool in the listTools response, including name, description, and input schema.
    { name: "get_configuration", description: "Get server configuration", inputSchema: zodToJsonSchema(GetConfigurationSchema), },
  • Shared helper function used by the 'get_configuration' handler (and all other tools) to make authenticated API calls to the MonkeyType server.
    async function callMonkeyTypeApi(endpoint, method, apiKey, params = {}, data = null) { try { const headers = { 'Authorization': `ApeKey ${apiKey}`, 'Content-Type': 'application/json', 'User-Agent': 'MonkeyType-MCP-Server/1.0.0' }; const config = { headers, timeout: 30000, validateStatus: status => status < 500 }; if (method === 'GET' && Object.keys(params).length > 0) { config.params = params; } let response; if (method === 'GET') { response = await axios.get(`${MONKEYTYPE_API_BASE_URL}${endpoint}`, config); } else if (method === 'POST') { response = await axios.post(`${MONKEYTYPE_API_BASE_URL}${endpoint}`, data, config); } return response.data; } catch (error) { console.error(`Error calling MonkeyType API: ${error.message}`); if (error.response) { return { error: error.response.data, statusCode: error.response.status }; } return { error: error.message }; } }

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/CodeDreamer06/MonkeytypeMCP'

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