Hostname MCP Server
A lightweight server for hostname detection and system context.
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
- Install dependencies:
npm install
- Build the TypeScript:
npm run build
- 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 JavaScriptnpm run dev- Watch mode for developmentnpm start- Run the built server
Security
This server is designed to be secure by default:
- Only reads system information using Node.js
osmodule - No arbitrary command execution
- No environment variable exposure
- No sensitive data access
Version 2.0 Changes
- Removed
get_environment_context: Eliminated potential security risk of exposing environment variables - Removed
get_quick_summary: 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.
Related Servers
Remote MCP Server (Authless)
An example of a remote MCP server deployable on Cloudflare Workers without authentication.
Claude Google Apps Script MCP Guide
Integrate Claude AI with Google Apps Script to automate tasks in Google Sheets and Gmail.
MCP Manager
An interactive CLI tool for managing MCP server configurations in the current directory.
Scorecard
Access Scorecard's AI model evaluation and testing tools via a Cloudflare Workers deployment.
Qwen-Agent
A framework for developing LLM applications with capabilities like tool usage, planning, and memory, based on the Qwen model.
ast-grep MCP
An experimental MCP server that uses the ast-grep CLI for code structural search, linting, and rewriting.
MCP迭代管理工具
An iteration management tool to automate the collection and submission of iteration information to a CodeReview system.
Terraform MCP
A command-line tool that acts as an MCP server to interact with Terraform environments.
GitHub Actions
An MCP Server for the GitHub Actions API, enabling AI assistants to manage and operate GitHub Actions workflows.
Any OpenAPI
A server that dynamically creates MCP endpoints from any OpenAPI specification URL.