Intro to MCP
In November 2024, Anthropic introduced the Model Context Protocol (MCP), a standard for AI systems to access data and tools, enabling practical solutions for you or your business. Major players like OpenAI, Google, and Microsoft have adopted MCP, making it the de facto standard for tool integration. By exposing your system as an MCP Server, any MCP-compliant AI or chatbot can use it, unlocking seamless interoperability. From calendars to APIs, MCP Servers are expanding rapidly.
How it Works
MCP involves clients (e.g., Claude Desktop, Cursor, Visual Studio Code) and servers communicating locally on your machine. This framework is evolving, but working locally is a good place to start and it fills a super useful need of working with local data. To use an MCP Server, you download it (or build it) and configure it to work with your client. Then, you can interact with the new features via chat. The number of clients is growing, as is the number of MCP servers.
Let's Build an MCP Server
To better get our mind around what this is all about, it might be good to look at some code. Today, we'll build a "Time Server". AI Agents aren't typically aware of the currently time (oddly enough). An they're really bad at doing time calculations (e.g. How many days until 5/1/2030?). So I put together a python-based server that will give our desktop client some intelligence about time.
First, let's import a few packages: datetime (obviously) and FastMCP (a standard for building MCP Servers with Python).
import datetime
from mcp.server.fastmcp import FastMCP
Next, we'll create the server itself.
# Create an MCP server
mcp = FastMCP("time-server")
This will give us several decorators that will let us work with various MCP concepts (there are Resources, Prompts and Tools). Tools are the best thing to get our head around so that's where we'll start -- give our chat agent some tools. So let's create our first tool:
@mcp.tool()
def get_current_utc_time() -> str:
"""Gets the current UTC time."""
return f"The current UTC time is {datetime.datetime.now(datetime.UTC)}"
That's basically it. Pretty simple... A couple of things to point out here: The `@mcp.tool` decorator simply tells the AI system that the following is a "tool" and is somethign the chat agent can use. It's important to use a descriptive name. Next, is the comment -- it's super important. This tells the LLM what the tool actually does so it knows that tool to run when you ask for something.
Configuring Claude Desktop
Next is configuring Claude Desktop for our example. Here we'll be editing a JSON file. Go to Claude Desktop Settings | Developer | Edit Config. This will open the location of your `claude_desktop_config.json` file. Open that file and simply add the following "time-server" under mcpServers. Make sure to point the location of your server.py.
{
"mcpServers": {
"time-server": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"/Users/jeremysublett/Repos/MCPTests/TimeServer/server.py"
]
}
}
}
Before you can test, just be sure to restart Claude Desktop.
Testing It Out
I've added more tools to our time server (see below). Now it's time to test... Re-open Claude Desktop after adding your configuration. Now ask a question or two:

Notice, I asked about "Zulu" time and the LLM knows what I mean and knows to use the tool we built...

Notice that it asks to use the tool first. While annoying, this is helpful to prevent rogue MCP Servers that you might install from doing something you might not want.
And here are our results:

Now you can ask all kinds of other questions like how many days between two dates. LLMs often get this wrong on their own. Note the use of the `get_days_difference` tool I created (see code below).

Complete Listing
Here's the complete listing.
import datetime
from mcp.server.fastmcp import FastMCP
# Create an MCP server
mcp = FastMCP("time-server")
# Add a simple tool
@mcp.tool()
def get_current_utc_time() -> str:
"""Gets the current UTC time."""
return f"The current UTC time is {datetime.datetime.now(datetime.UTC)}"
@mcp.tool()
def get_current_local_time() -> str:
"""Gets the current local time."""
return f"The current local time is {datetime.datetime.now()}"
@mcp.tool()
def get_current_date() -> str:
"""Gets the current date."""
return f"The current date is {datetime.datetime.now().strftime('%Y-%m-%d')}"
#get days difference between two dates
@mcp.tool()
def get_days_difference(date1: str, date2: str) -> str:
"""Gets the days difference between two dates. Use the format YYYY-MM-DD"""
return f"The days difference between {date1} and {date2} is {datetime.datetime.strptime(date1, '%Y-%m-%d') - datetime.datetime.strptime(date2, '%Y-%m-%d')}"
#get hours difference between two times
@mcp.tool()
def get_hours_difference(time1: str, time2: str) -> str:
"""Gets the hours difference between two times. Use the format YYYY-MM-DD HH:MM:SS"""
return f"The hours difference between {time1} and {time2} is {datetime.datetime.strptime(time1, '%Y-%m-%d %H:%M:%S') - datetime.datetime.strptime(time2, '%Y-%m-%d %H:%M:%S')}"
if __name__ == "__main__":
mcp.run()
This is Big
MCP is big. With the adoption from all major AI players. We'll see this revolutionize LLM and Agent capabilities. Lot's more to come and it's super exciting.