Learn How to Create Your Own MCP Server for Claude Desktop and Windsurf

The notion of an MCP – Model Context Protocol – has gone viral!

MCP attempts to standardize how LLM tools like Claude Desktop and Windsurf connect with external data sources and tools. So, naturally, I thought, “Put a bird on it.” Er, I mean, “Let’s CheerLight it.” By building a CheerLights interface, I learned everything from how to build Python libraries to Chrome extensions to Adrino integrations.

This looks like a big deal. I recommend that you learn how to build your own MCP server and/or use one of the hundreds that have already been created: https://github.com/punkpeye/awesome-mcp-servers

I am using Windsurf on Windows for this tutorial.

CheerLights MCP in Windsurf

From Windsurf, open the Terminal (View -> Terminal). Create a new folder called, “cheerlights-mcp” and enter it. Create a new file called, “server.py” and copy in the CheerLights MCP server code from GitHub.

From the terminal:

  • PS C:\github> cd .\cheerlights-mcp\
  • PS C:\github\cheerlights-mcp> python -m venv .venv
  • PS C:\github\cheerlights-mcp> .venv\Scripts\activate
  • PS C:\github\cheerlights-mcp> pip install mcp httpx

Add the CheerLights MCP to the Windsurf config file (adjust the path as needed).

{
    "mcpServers": {
        "cheerlights": {
            "command": "python",
            "args": ["C:\\github\\cheerlights-mcp\\server.py"]
        }
    }
}
CheerLights MCP added to the Windsurf MCP Config File

Restart Windsurf.

From the terminal, start the Python server for the MCP: PS C:\github\cheerlights-mcp> python server.py

This should enable the CheerLights MCP and show two tools in the Cascade Chat area.

CheerLights MCP enabled in Windsurf Cascade Chat

To use CheerLights MCP, you can ask Cascade, “What’s the current CheerLights color?” This will eventually get sent to the CheerLights MCP and the get_current_color() tool. If it all works, you will find out the latest color is magenta (or whatever the latest color happens to be)!

CheerLights MCP tells Windsurf the latest color is magenta

All of the source code is available on GitHub. Let me know if you give this a try and if you build your own. Have fun!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.