Skip to main content
Glama

Basic MCP Server

A small MCP server built with the official Python SDK (mcp 2.x). It exposes four tools that let an MCP client (Claude Desktop, the MCP Inspector, etc.) work with the local file system, run shell commands, and fetch web pages.

Tools

Tool

Description

Parameters

file_reader

Reads the file at the specified path.

path

write_new_file

Creates a new file and writes the given content into it. Overwrites the file if it already exists.

path, content

execute_command

Runs the given shell command and returns its output (stdout + stderr).

command, timeout (seconds, default 30)

fetch_url

Fetches a URL with an HTTP GET request and returns the status code and the page source.

url, timeout (seconds)

All tools return plain strings. Failures are prefixed with ERROR:, successful writes with INFO:.

Warning: execute_command runs arbitrary shell commands with the permissions of the user running the server. Only connect clients you trust.

Related MCP server: emcp

Requirements

  • Python 3.10 or newer

  • mcp 2.x and requests 2.x (see requirements.txt)

Installation

python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate
pip install -r requirements.txt

Usage

Run the server with the MCP Inspector (browser-based debugging UI):

mcp dev server.py

Run the server directly over stdio:

mcp run server.py

Install the server into the Claude Desktop app:

mcp install server.py

The server object is named mcp in server.py, so the CLI commands above find it automatically.

Project layout

server.py           # the MCP server and its tools
requirements.txt    # dependencies
LICENSE             # MIT license

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Custom MCP tools for local development that enable file system access, shell command execution, and web resource browsing. Designed for local use with safety considerations for potentially destructive operations.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server providing filesystem operations, shell execution, and web search capabilities.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to execute shell commands, manage long-running processes, and read/write files on the host machine with the permissions of the user running the server.
      5 npm
      MIT