Skip to main content
Glama
piekstra

New Relic MCP Server

by piekstra

list_servers

Retrieve a complete inventory of all servers monitored by New Relic Infrastructure to view your server environment and monitor system resources.

Instructions

List all servers monitored by New Relic Infrastructure

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • MCP tool handler for 'list_servers': decorated with @mcp.tool(), checks client initialization, calls client.list_servers(), serializes result to JSON or error.
    @mcp.tool() async def list_servers() -> str: """List all servers monitored by New Relic Infrastructure""" if not client: return json.dumps({"error": "New Relic client not initialized"}) try: result = await client.list_servers() return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
  • NewRelicClient.list_servers method: makes GET request to /servers.json endpoint to fetch server list.
    async def list_servers(self) -> Dict[str, Any]: """List all servers monitored by New Relic Infrastructure""" url = f"{self.base_url}/servers.json" return await self._make_request("GET", url)

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/piekstra/newrelic-mcp-server'

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