An MCP (Model Context Protocol) server that provides tools to start and stop HTTP file servers.
This MCP server provides three main tools:
npm install
npm start
The server will start and listen for MCP client connections via stdio.
Starts an HTTP file server using the serve library.
Parameters:
path (required): The directory path to serve files fromport (optional): The port to run the server on (default: 3000)host (optional): The host to bind to (default: localhost)Example:
{
"name": "start-file-server",
"arguments": {
"path": "/path/to/your/files",
"port": 8080,
"host": "localhost"
}
}
Stops a running HTTP file server.
Parameters:
host (optional): The host of the server to stop (default: localhost)port (optional): The port of the server to stop (default: 3000)serverId (optional): The server ID to stop (e.g., "localhost:3000")Example:
{
"name": "stop-file-server",
"arguments": {
"host": "localhost",
"port": 8080
}
}
Lists all currently running file servers.
Parameters: None
Example:
{
"name": "list-file-servers",
"arguments": {}
}
This MCP server uses the serve library internally to provide HTTP file serving capabilities. The server processes are managed by the MCP server and can be started, stopped, and monitored through the provided tools.
@modelcontextprotocol/sdk: MCP SDK for TypeScriptserve: Lightweight HTTP file serverzod: Schema validationtsx: TypeScript execution environmentMIT