MCP Servers

A collection of Model Context Protocol servers, templates, tools and more.

A simple MCP server that can be tested with a client

Created 5/30/2025
Updated 3 days ago
Repository documentation and setup instructions

MCP SimpleServer

A simple example of an MCP Server that can be used to test MCP clients.

Usage

  1. Clone the repository: git clone

  2. Navigate to the project directory: cd simpleserver

  3. Install the required dependencies: uv sync if you have uv installed, or pip install -r requirements.txt if you're using pip. I strongly recommend using uv as it is faster and more efficient, and it's required for the commands below.

  4. Create a .env file in the root of the project and add the following Keys (see .env.example):

WEATHER_API_KEY=xxx
OPENAI_API_KEY=sk-
NOTES_FILE="/tmp/notes.md"

You can get a free OpenWeatherMap API key from https://openweathermap.org/api and an OpenAI API key from https://platform.openai.com/signup.

Testing a Weather MCP Server (main.py)

  1. Run the server: uv run mcp dev main.py This will start the server, and you can browse to it at localhost (default port is 6274)
  2. Open a browser to http://127.0.0.1:6274
  3. Click "Connect"
  4. Click "Tools" in the top menu
  5. Click "List Tools"

You should now see two methods, "add" and "get_weather".

  1. Click "get_weather", and enter the name of a city (e.g., "London") in the input field.
  2. Click "Run Tool". If you've got a Weather API key set up, you should see the weather for that city.

Testing a Note Keeper (simplenote.py)

  1. Run the server: uv run mcp dev simplenote.py This will start the server, and you can browse to it at localhost (default port is 6274)
  2. Open a browser to http://localhost:6274
  3. Click "Connect"
  4. Click "Tools" in the top menu
  5. Click "List Tools" You should now see two methods, "add_note", "get_notes" and "get_last_note".

You can use these commands to Add a note, Get all Notes, or get just the last note. Entries will persist, as they're saved to a local file.

Testing the MCP Server with an OpenAI Agent (aiagent.py)

MCP really shines when it's used with an OpenAI Agent. You can chat with an OpenAI Model, and have it call the MCP Server to get information and perform custom actions. Run the app: uv run aiagent.py

Chat away! It will call the MCP Server when you ask it to perform actions that are defined in the MCP Server: - Add a note - Get all notes - Get the last note

How MCP with an Agent works

  • Loads environment variables (including your OpenAI API key) from a .env file.
  • Starts the SimpleNotes MCP server as a subprocess.
  • Creates an Agent with instructions to handle both note management and general queries.
  • Runs an interactive chat loop:
  • Prompts the user for input.
  • Sends the input to the agent, which uses the MCP server and OpenAI model to generate a response.
  • Prints the assistant’s reply.
  • Handles graceful exit on "quit", Ctrl+C, or EOF.
Quick Setup
Installation guide for this server

Install Package (if required)

uvx simple-mcp-server

Cursor configuration (mcp.json)

{ "mcpServers": { "marlinspike-simple-mcp-server": { "command": "uvx", "args": [ "simple-mcp-server" ] } } }