MCP ExplorerExplorer

Mcp Python Starter

@SamMorrowDrumson 10 months ago
1 MIT
FreeCommunity
AI Systems
A starter MCP server in Python.

Overview

What is Mcp Python Starter

mcp-python-starter is a minimal Model Context Protocol (MCP) server implemented in Python, designed to replicate the features and structure of a similar TypeScript starter.

Use cases

Use cases include developing and testing MCP applications, creating interactive educational tools, and integrating with development environments like VS Code for enhanced productivity.

How to use

To use mcp-python-starter, first install the dependencies using ‘pip install .’. Then, run the server with ‘python server.py stdio’. You can also integrate it with an MCP client or use the provided VS Code configuration for custom inputs.

Key features

Key features include a greeting tool using the MCP_GREETING environment variable, serving a static markdown file, a simple prompt handler, environment-based configuration, VS Code integration, optional devcontainer support, and the ability to add tests.

Where to use

mcp-python-starter can be used in various fields such as software development, educational tools, and any application requiring a lightweight server for handling model context protocols.

Content

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

  1. Install dependencies

    pip install .
    
  2. Run the server

    python server.py stdio
    
  3. 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 implementation
  • resources/example.md — Example markdown resource
  • .vscode/mcp.json — VS Code MCP server config
  • .gitignore — Standard Python ignores

License

MIT

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers