GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - marthakelly/mcp-template: Dead simple MCP server template - build your own Model Context Protocol server

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 
server.py
server.py
 
 

Repository files navigation

Dead Simple MCP Server Template

A minimal Model Context Protocol (MCP) server template. Clone this to build your own MCP server.

What's Included

  • server.py - A basic MCP server with one example tool
  • requirements.txt - Python dependencies
  • This README

Quick Start

1. Clone or Fork This Repo

git clone https://github.com/YOUR-USERNAME/mcp-template.git
cd mcp-template

2. Install Dependencies

pip install -r requirements.txt

3. Test the Server

python server.py

The server runs and waits for input from Claude Desktop.

4. Add to Claude Desktop

Edit your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

Add this configuration:

{
  "mcpServers": {
    "simple-server": {
      "command": "python",
      "args": ["/absolute/path/to/mcp-template/server.py"]
    }
  }
}

Replace /absolute/path/to/mcp-template/ with the actual path.

5. Restart Claude Desktop

Quit and restart Claude Desktop. Your MCP server will now be available.

How to Modify

Add Your Own Tools

Edit server.py and add new tools in the list_tools() function:

@server.list_tools()
async def list_tools() -> list[Tool]:
    return [
        Tool(
            name="your_tool_name",
            description="What your tool does",
            inputSchema={
                "type": "object",
                "properties": {
                    "param1": {
                        "type": "string",
                        "description": "Parameter description"
                    }
                },
                "required": ["param1"]
            }
        )
    ]

Handle Tool Calls

Add your logic in the call_tool() function:

@server.call_tool()
async def call_tool(name: str, arguments: dict) -> list[TextContent]:
    if name == "your_tool_name":
        # Your logic here
        result = do_something(arguments.get("param1"))
        return [TextContent(type="text", text=result)]

Connect to APIs or Databases

Import what you need and call it from your tool handlers:

import requests

@server.call_tool()
async def call_tool(name: str, arguments: dict) -> list[TextContent]:
    if name == "fetch_data":
        response = requests.get("https://api.example.com/data")
        return [TextContent(type="text", text=response.text)]

Resources

  • MCP Documentation
  • Anthropic MCP Course
  • awesome-mcp-servers - More examples

License

MIT - Use this however you want.

About

Dead simple MCP server template - build your own Model Context Protocol server

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.