Skip to content

FatBobGo/mcp-python-host_info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP Host Info Server

A Model Context Protocol (MCP) server that provides detailed host machine information.

Project Structure

mcp-python-host_info/
├── src/
│   ├── host_info/          # Main package
│   │   ├── __init__.py     # Package exports
│   │   ├── main.py         # MCP server setup
│   │   └── tools.py        # Host info implementation
│   └── main.py             # Entry point
├── tests/
│   ├── host_info/          # Test package
│   │   ├── test_main.py    # MCP server tests
│   │   └── test_tools.py   # Host info tests
│   └── conftest.py         # Test configuration
└── pyproject.toml          # Project configuration

Installation

Use uv to manage the dependencies:

git clone ...
cd mcp-python-host_info
uv sync

For development, install test dependencies:

uv pip install -e ".[dev]"

# install the pacakge in development mode
uv pip install -e .

Running Tests

Run the test suite with coverage report:

pytest

This will:

  • Run all tests in the tests/ directory
  • Generate a coverage report for the host_info package
  • Show missing lines in the coverage report

Test files are organized to mirror the package structure:

  • test_tools.py: Tests for host information gathering functionality
  • test_main.py: Tests for MCP server setup and configuration

Debug/Development

Run the MCP server:

uv run python src/main.py

Debug the MCP server:

uv add "mcp[cli]"
uv run mcp dev src/main.py

Project Features

  • get_host_info: Returns detailed system information in JSON format including:
    • Platform details
    • CPU information
    • Memory size
    • Python environment
    • System-specific details (e.g., macOS system profiler)

About

python mcp server to get the host info

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages