Skip to main content
Glama
reidar80

Norwegian Business Registry MCP Server

by reidar80

get_municipalities

Retrieve and list all Norwegian municipalities with options to sort results and paginate through the data for efficient access to regional administrative divisions.

Instructions

Get all Norwegian municipalities

Input Schema

NameRequiredDescriptionDefault
pageNoPage number
sizeNoPage size
sortNoSort order

Input Schema (JSON Schema)

{ "properties": { "page": { "description": "Page number", "type": "number" }, "size": { "description": "Page size", "type": "number" }, "sort": { "description": "Sort order", "type": "string" } }, "type": "object" }

Implementation Reference

  • The MCP tool handler for 'get_municipalities' which invokes the API client method and returns the result as formatted JSON text content.
    case "get_municipalities": const municipalities = await apiClient.getMunicipalities(); return { content: [ { type: "text", text: JSON.stringify(municipalities, null, 2), }, ], };
  • Registration of the 'get_municipalities' tool in the list of tools, including name, description, and input schema definition.
    { name: "get_municipalities", description: "Get all Norwegian municipalities", inputSchema: { type: "object", properties: { sort: { type: "string", description: "Sort order" }, size: { type: "number", description: "Page size" }, page: { type: "number", description: "Page number" } } } },
  • The BrregApiClient helper method implementing the core logic: makes an HTTP request to the BRREG API endpoint for municipalities.
    async getMunicipalities() { return this.makeRequest('/enhetsregisteret/api/kommuner'); }
  • Input schema for the 'get_municipalities' tool defining optional pagination and sorting parameters.
    inputSchema: { type: "object", properties: { sort: { type: "string", description: "Sort order" }, size: { type: "number", description: "Page size" }, page: { type: "number", description: "Page number" } } }

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/reidar80/BRREG-MCP'

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