Skip to main content

MCP server provide system information tools

Project description

System Info MCP Server

A Model Context Protocol (MCP) server that provides system information tools.

Features

  • Cross-platform support (Windows, macOS, Linux)
  • Basic system information: OS, architecture, shell
  • FastMCP-based implementation
  • Comprehensive error handling

Installation

uv sync

Usage

Run with stdio (default)

uv run python -m system_info_mcp.server

Run with HTTP transport

uv run python -m system_info_mcp.server --transport http --port 8000

Or modify server.py:

if __name__ == "__main__":
    mcp.run(transport="http", port=8000)

MCP Client Configuration

Claude Desktop

Add to claude_desktop_config.json:

```json (stdio) { "mcpServers": { "system-info": { "command": "uv", "args": ["run", "python", "-m", "system_info_mcp.server"] } } } ```
{
  "mcpServers": {
    "system-info": {
      "url": "http://localhost:8000/mcp",
      "transport": "http"
    }
  }
}

VS Code (MCP Extension)

Add to .vscode/mcp.json:

{
  "servers": [
    {
      "name": "system-info",
      "command": "uv",
      "args": ["run", "python", "-m", "system_info_mcp.server"],
      "transport": "stdio"
    }
  ]
}

Programmatic Client

import asyncio
from fastmcp import Client

async def main():
    # Connect via HTTP
    async with Client("http://localhost:8000/mcp") as client:
        result = await client.call_tool("get_system_info", {})
        print(result)

    # Or connect via stdio
    async with Client("python -m system_info_mcp.server") as client:
        result = await client.call_tool("get_system_info", {})
        print(result)

asyncio.run(main())

Supported Transports

Transport Description Use Case
stdio Standard input/output Local development, Claude Desktop, VS Code
HTTP HTTP server with SSE Remote servers, web deployments
SSE Server-Sent Events Streaming responses, real-time updates

Development

# Install dependencies
uv sync

# Run tests
pytest tests/ -v

# Format code
ruff format src/ tests/

Tool Specification

Tool Name: get_system_info

Description: 获取系统基本信息并返回JSON

Response Format:

{
  "os": "Darwin",
  "os_version": "Darwin Kernel Version 23.4.0",
  "os_release": "23.4.0",
  "architecture": "arm64",
  "processor": "arm",
  "shell": "/bin/zsh"
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

system_info_mcp-0.0.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

system_info_mcp-0.0.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file system_info_mcp-0.0.2.tar.gz.

File metadata

  • Download URL: system_info_mcp-0.0.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for system_info_mcp-0.0.2.tar.gz
Algorithm Hash digest
SHA256 29746a20589699df5a01a68c268219bf8eb4d1af167f868f17f526481ff1769f
MD5 758eb23858225a37a8158feeaa5fa890
BLAKE2b-256 06b7e096ff4f9c740682959185b590afe0dc90bdc236282538bf4d4b5bf439ce

See more details on using hashes here.

File details

Details for the file system_info_mcp-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for system_info_mcp-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 efdc9c9f564db1b0bf3e2ff1a607fd6a429b07887c7c4b3b0c51ddfd2c85175a
MD5 3cf5574021846ecea45bd1042aab27bd
BLAKE2b-256 909d0f5cc94968808c154e81bbbd4ae96e9967519ff9e6b600784bc75f6120ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page