- Home
- MCP servers
- Hostname
Hostname
- typescript
0
GitHub Stars
typescript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"leependu-hostname-mcp": {
"command": "node",
"args": [
"/path/to/hostname-mcp/build/index.js"
]
}
}
}You deploy a lightweight MCP server that quickly identifies the machine you’re on by reporting the hostname first and then providing basic system information. It’s designed to be small, fast, and secure, making it ideal for AI workflows that need reliable host identification without exposing sensitive data.
How to use
You will run the MCP server locally and connect it to your MCP client. The server exposes two endpoints: one that returns just the hostname and another that returns a broader set of system details. In your AI workflow, use the hostname endpoint to identify the machine, then optionally query the system info endpoint to obtain hardware and OS details for context.
How to install
Prerequisites: you need Node.js and npm installed on your machine. Ensure you have a working development environment with network access.
npm install
npm run build
npm start
Examples and configuration
To use this MCP server with Claude Desktop, add a new MCP server entry that runs the server locally. The following configuration starts the built server using Node from your local path. Replace the path with the actual build output location on your system.
{
"mcpServers": {
"hostname": {
"command": "node",
"args": [
"/path/to/hostname-mcp/build/index.js"
]
}
}
}
Security
The server reads only system information via Node.js capabilities and does not execute arbitrary commands. No environment variables are exposed, and no sensitive data is accessed.
Notes on usage and behavior
The server focuses on hostname detection first, followed by optional system information. It is designed to minimize dependencies and startup time, making it suitable for environments where lightweight discovery is important.
Available tools
get_hostname
Returns just the system hostname for quick machine identification.
get_system_info
Provides comprehensive system information including hostname, platform, CPU count, memory, OS version and architecture, uptime, and user info.