chrisbrickey/mcp-server-1
If you are the rightful owner of mcp-server-1 and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A simple Model Context Protocol (MCP) server that provides utilities to AI assistants, like Claude.
mcp-server-1
A simple Model Context Protocol (MCP) server that provides utilities to AI assistants, like Claude. I'm using this repo to learn about MCP server implementation.
MCP Framework
MCP Python SDK (mcp package)
I considered using FastMCP framework which requires less boilerplate. I decided against it for this repo in hopes of more thoroughly internalizing concepts by using a more explicit framework.
Development Approach
This project uses PEP 723 inline dependency declarations instead of a traditional project structure with pyproject.toml and lock files. This choice makes the server completely self-contained in a single file, which is ideal for:
- Learning and experimentation
- Easy sharing and portability
- Simple projects that don't need complex dependency management
For larger production projects, a traditional structure with pyproject.toml, lock files, and package structure would be more appropriate.
Setup
This project uses uv to run a self-contained Python script with inline dependencies (PEP 723). This means that there is no installation required. Dependencies are declared inline in server.py, instead of in a pyproject.toml file.
# Clone the repository
git clone <repository-url>
cd mcp-server-1
Interacting with the MCP Server
- Start the MCP Server
uv run ./server.py
The server will start and communicate via stdio (standard input/output), which is the standard transport for local MCP servers.
The first time you run it, uv will automatically create a virtual environment and install the required dependencies.
You may need to make the server.py file executable before running the above command.
- Connect to the server via Claude Code
- Open claude code from the terminal.
- Enter
/mcpto view available MCP servers. Confirm thattime-date-serveris one of them.
- Exercise the server
- Resources can be referenced with @ mentions
- Tools will automatically be used during the conversation
- Prompts show up as / slash commands
How It Works
- The
server.pyfile contains inline PEP 723 metadata declaring themcpdependency - When Claude Desktop starts, it launches this MCP server as a subprocess using
uv run server.py uvautomatically creates a virtual environment and installs dependencies on first run- The server advertises its available tools via the
tools/listJSON-RPC method - During conversations, Claude can automatically call these tools when relevant
- The server executes the requested tool and returns results to Claude
- Claude incorporates the results into its response to you