Python Leiden (NL) meetup summaries¶
Two summaries of the July 2 2026 Python meetup in Leiden. I’ve omitted one, “Python with Karel” by EiEi Tun, as I’ve made a summary of that talk in Utrecht a month ago, already :-)
Building modern internal team CLIs with incremental automation - Farid Nouri Neshat¶
Obligatory xkcd cartoons: https://xkcd.com/974 and https://xkcd.com/1319 and https://xkcd.com/1205
Toil: manual, repetitive, automatable, distracting you from your real work, no enduring value. Yes, he likes to automate things :-) Some examples of repetitive manual tasks:
Creating dev containers.
Gathering data for troubleshooting.
Something that needs to be set manually in a database.
Setting up a new AWS account.
Creating a new dev environment on the new colleague’s laptop.
How to automate? Do it iteratively! Your boss might not like you to spend a day automating the task. But if you do it small steps at a time…
Do it manually the very first time.
Then start with documenting the steps.
Then turn it into a do-nothing scaffold script:
def step1(): print("Open the AWS page manually") input("Press enter to continue")
Everytime you do the task, automate a small bit and flesh out the script over time.
After many iterations, you’ll have automated it fully!
“I don’t have time to automate it”, you might say? Well, why don’t you have time? Is it perhaps because you haven’t automated things?
A good motivator: if you hate the task… Hate driven development :-)
After a while, you’ll have lots of random scripts. Stuff them in a repository. Slowly document them. Try to get them to use the same conventions. Perhaps you can re-use functionality in a library.
Something you need quicky is some CLI, a command line interface. He likes typer to make his CLIs: much nicer than Python’s own “argparse”:
import typer
app = typer.Typer()
@app.command()
def hello(name: str):
print(f"Hello {name}")
if __name__ == "__main__":
app()
AI comment: AI agents can use your CLI. Use the docstring and help functions to help orient the AI to your custom CLI. You can, for instance, use a CLI to give the agent access to your database’s content without giving it direct access to the database.
AI agents can be dangerous. A solution might be to use “feature flags”. You can disable production access until you enable some setting or flag that AI doesn’t know about.
He also mentioned the rich library for formatting and colorizing your textual output.
What I’ve learned maintaining the MCP Python SDK - Marcelo Trylesinski¶
He’s one of the three maintainers of the MCP Python SDK. SDK = software development kit. MCP: model context protocol, so a way for AI agents to connect to some other piece of software.
MCP is basically “OpenAPI for your agents”. It exposes three things from the server side:
tools
resources
prompts (though tools are mostly the only thing that is used)
The client provides:
sampling
elicitation (=”producing a reaction”, so mostly it means that the AI server asks you questions)
roots
logging
The MCP spec kept growing. But clients never caught up, so it was mostly only the “tools” part that got used.
A big problem is that servers cannot scale. The AI server might have lots of machines with a loadbalancer in front of it, but as a user you need to stay connected to the one machine that has your context.
There’s a new version of the spec (final version this month) that actually removed stuff, instead of growing. The “client provides” list mentioned above? Sampling, roots and logging are gone as they were hardly used.
MCP is now a small core, with optional extensions. Examples: tasks, MCP apps, enterprise auth.
The MCP Python SDK supports the new version, too. He demonstrated a small Python script that had a function that said you could have three bananas. He connected it via MCP to Claude and could ask Claude for the number of available bananas. It got back, via the Python tool, with the correct answer.