GeekCoding101 make your way to geek

Python Tutorials: AI Agents, MCP Servers and Scripts

3 posts on python, newest first.

3posts
2024first post

Every GeekCoding101 post tagged python is listed here, newest first. Each one is hands-on. You can build a working AI agent with tools on the Claude API, write and connect your own MCP server with the Python SDK, or run a script that finds and removes duplicate photos.

Start here

Pick the post that matches what you want to build:

If you want to…ReadTime
Understand what an AI agent is and build one yourselfWhat Is an AI Agent? How to Build One from Scratch in Python9 min
Give an AI model your own tools, resources and promptsWhat Is an MCP Server? How to Build One in Python8 min
Clean up a messy photo library with a reusable scriptRemove Duplicate Photos with a Python Script5 min

If you are new to agents, read the agent post first and the MCP post second. The agent post explains the loop that decides which tool to call. The MCP post shows a standard way to expose tools so that any compatible client can use them.

What Is an AI Agent? How to Build One from Scratch in Python

What makes an AI agent different from a chatbot, and how the agent loop works. You then build a working Python agent with tools, step by step, on the Claude API. Tags: ai, agentic-framework, agentstackinsider · 9 min read

What Is an MCP Server? How to Build One in Python

What the Model Context Protocol is and how MCP servers expose tools, resources and prompts. You then build, test and connect a server with the Python SDK 2.x. Tags: ai, mcp, agentic-framework · 8 min read

Remove Duplicate Photos with a Python Script

A Python script, written with ChatGPT, that finds duplicate photos by xxhash checksum and cleans them up. It caches checksums so reruns are fast. Tags: codingwithai, llm, opensource · 5 min read

FAQ

Are these Python tutorials free? Yes. Every post on GeekCoding101 is free to read, and there is no sign-up.

What is the difference between an AI agent and an MCP server? An AI agent is the program that runs the loop. It sends a task to a model, reads the reply, calls tools and repeats until the job is done. An MCP server sits on the other side. It exposes tools, resources and prompts through the Model Context Protocol so that an agent or other MCP client can use them. The two posts above build one of each.

Which post should I read first? Read the AI agent post if agents are new to you, then the MCP server post. If you just want a useful script you can run today, start with the duplicate-photo cleaner.

Do I need an API key for the agent tutorial? The agent in that post is built on the Claude API, so you need access to that API to run it as written.