Skip to main content
Glama

Hostname MCP Server

A lightweight Model Context Protocol (MCP) server focused on hostname detection with system information. Perfect for AI assistants to automatically identify which machine they're working with.

Generated by Claude Sonnet 4, directed by leependu.

Features

šŸ”’ Secure: Only reads system information, never executes arbitrary commands
šŸ·ļø Focused: Hostname detection first, system specs second
⚔ Lightweight: Minimal dependencies and fast startup
šŸŽÆ Purpose-built: Designed specifically for Claude Desktop workflow optimization

Tools Provided

get_hostname

Returns just the system hostname - perfect for quick machine identification.

get_system_info

Comprehensive system information including:

  • Hostname and platform details

  • CPU count and memory information

  • OS version and architecture

  • System uptime

  • User information

Installation

  1. Install dependencies:

npm install
  1. Build the TypeScript:

npm run build
  1. Test the server:

npm start

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{ "mcpServers": { "hostname": { "command": "node", "args": [ "/path/to/hostname-mcp/build/index.js" ] } } }

Development

  • npm run build - Build TypeScript to JavaScript

  • npm run dev - Watch mode for development

  • npm start - Run the built server

Security

This server is designed to be secure by default:

  • Only reads system information using Node.js os module

  • No arbitrary command execution

  • No environment variable exposure

  • No sensitive data access

Version 2.0 Changes

  • Removed : Eliminated potential security risk of exposing environment variables

  • Removed : Redundant information already available in other tools

  • Focused approach: Now provides just hostname and system info - clean and secure

Project Context

Created as part of a workflow optimization to automatically identify which machine Claude is working with, eliminating the need to manually specify the computer at the start of each conversation.

Perfect for users with multiple development machines who want streamlined AI assistance.

-
security - not tested
A
license - permissive license
-
quality - not tested

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/leependu/hostname-mcp'

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