mcp-python-starter
1
MCP Python Starter is a minimal implementation of a Model Context Protocol (MCP) server in Python, designed to mirror the TypeScript starter. Key features include environment-based configuration, VS Code integration, and supporting static markdown resources.
MCP Python Starter
A minimal Model Context Protocol (MCP) server implemented in Python, matching the features and structure of the TypeScript starter.
Features
- Hello Tool: Returns a greeting using the
MCP_GREETING
environment variable. - Markdown Resource: Serves a static markdown file from
resources/example.md
. - Prompt: Simple prompt handler example.
- Environment-based configuration: Reads greeting and secret from environment variables.
- VS Code integration:
.vscode/mcp.json
for easy server launch with input prompts. - Devcontainer support: (Optional, add
.devcontainer
if needed) - Tests: (Add tests as needed)
Quickstart
-
Install dependencies
pip install .
-
Run the server
python server.py stdio
-
Use with MCP client or VS Code
Use the provided
.vscode/mcp.json
to launch the server with custom inputs.
Project Structure
server.py
— Main MCP server implementationresources/example.md
— Example markdown resource.vscode/mcp.json
— VS Code MCP server config.gitignore
— Standard Python ignores
License
MIT