Minimal MCP Server (Python)
This is a minimal Model Context Protocol (MCP) server using the official Python SDK.
Features
Tool:
guardrail(context: str) -> bool— Checks if the provided context is safe (no code injection or harmful content). ReturnsTrueif safe,Falseotherwise.
Related MCP server: CyberMCP
Quick Start
Install dependencies:
pip install -r requirements.txtRun the server:
python main.py
Test with MCP Inspector
To test and explore your server with a GUI:
mcp dev main.py
Install in Claude Desktop
To use this MCP server as a tool in Claude Desktop:
Make sure you have Claude Desktop installed.
In your terminal, run:
mcp install main.pyThe server will appear as a tool in Claude Desktop, ready to use.