<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Python on scriptable.com</title><link>https://scriptable.com/categories/python/</link><description>Recent content in Python on scriptable.com</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 20 Jul 2026 10:53:05 -0400</lastBuildDate><atom:link href="https://scriptable.com/categories/python/index.xml" rel="self" type="application/rss+xml"/><item><title>Build a Python CLI Tool and Distribute It on GitHub with uvx</title><link>https://scriptable.com/posts/python/cli-tool-github-uvx-macos/</link><pubDate>Mon, 20 Jul 2026 10:53:05 -0400</pubDate><guid>https://scriptable.com/posts/python/cli-tool-github-uvx-macos/</guid><description>A sibling article, Publish a FastMCP Server to PyPI and Run It Anywhere with uvx, ships a package to the public PyPI index. This one skips the index entirely. If your code is a Git repository, uvx…</description></item><item><title>Dockerize an MCP Server on macOS</title><link>https://scriptable.com/posts/python/dockerize-mcp-server-macos/</link><pubDate>Sat, 18 Jul 2026 22:38:32 -0400</pubDate><guid>https://scriptable.com/posts/python/dockerize-mcp-server-macos/</guid><description>Packaging an MCP server as a Docker image gives clients one launch command with no Python, no uv, and no virtual environment to manage on the host: they run the container. This tutorial builds a…</description></item><item><title>CI/CD for an MCP Server: Lint, Test, Build, and Publish with GitHub Actions on macOS</title><link>https://scriptable.com/posts/python/ci-cd-mcp-server-macos/</link><pubDate>Sat, 18 Jul 2026 22:29:52 -0400</pubDate><guid>https://scriptable.com/posts/python/ci-cd-mcp-server-macos/</guid><description>An installable MCP server needs the same release discipline as any Python package: lint and test every change, build the artifact, and publish on a tagged release. This tutorial wires that pipeline…</description></item><item><title>Harden an MCP Server: A Threat Model and Defenses on macOS</title><link>https://scriptable.com/posts/python/mcp-threat-model-hardening-macos/</link><pubDate>Sat, 18 Jul 2026 22:20:54 -0400</pubDate><guid>https://scriptable.com/posts/python/mcp-threat-model-hardening-macos/</guid><description>An MCP server is an attack surface. It runs with real privileges (a filesystem, API credentials, a database), it accepts arguments chosen by a model that may be under an attacker&amp;#39;s influence, and its…</description></item><item><title>Debug an MCP Server with the MCP Inspector on macOS</title><link>https://scriptable.com/posts/python/debug-mcp-server-inspector-macos/</link><pubDate>Sat, 18 Jul 2026 22:13:12 -0400</pubDate><guid>https://scriptable.com/posts/python/debug-mcp-server-inspector-macos/</guid><description>The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) is the official developer tool for MCP servers. It has two faces: a web UI for clicking through tools, resources, and prompts…</description></item><item><title>Fine-Grained Authorization for a FastMCP Server on macOS</title><link>https://scriptable.com/posts/python/per-tool-scopes-mcp-macos/</link><pubDate>Sat, 18 Jul 2026 17:15:08 -0400</pubDate><guid>https://scriptable.com/posts/python/per-tool-scopes-mcp-macos/</guid><description>An email allowlist answers one question: is this caller allowed in at all? Real servers need a second answer: which of my tools may this particular caller use? A reader should be able to list notes…</description></item><item><title>A Testing Strategy for MCP Servers on macOS</title><link>https://scriptable.com/posts/python/testing-strategy-mcp-macos/</link><pubDate>Sat, 18 Jul 2026 16:49:32 -0400</pubDate><guid>https://scriptable.com/posts/python/testing-strategy-mcp-macos/</guid><description>Most MCP servers get a handful of assert result == ... tests bolted on and nothing more. That misses the failures that actually bite: a tool quietly renamed, a parameter that changed type, a result…</description></item><item><title>Wrap a Local CLI as MCP Tools on macOS</title><link>https://scriptable.com/posts/python/wrap-local-cli-mcp-macos/</link><pubDate>Sat, 18 Jul 2026 16:41:50 -0400</pubDate><guid>https://scriptable.com/posts/python/wrap-local-cli-mcp-macos/</guid><description>A command-line tool you already trust makes a good MCP tool: it has a stable interface, it is installed on the box, and its behavior is documented. The work is not reimplementing it, it is exposing…</description></item><item><title>Expose an Existing FastAPI App as MCP on macOS</title><link>https://scriptable.com/posts/python/mcp-from-fastapi-macos/</link><pubDate>Sat, 18 Jul 2026 16:31:42 -0400</pubDate><guid>https://scriptable.com/posts/python/mcp-from-fastapi-macos/</guid><description>If you already run a FastAPI service, you do not have to hand-write an MCP tool for each endpoint or maintain a separate OpenAPI file. FastMCP.from_fastapi takes the app object itself, reads the…</description></item><item><title>Generate an MCP Server from an OpenAPI Spec on macOS</title><link>https://scriptable.com/posts/python/mcp-from-openapi-macos/</link><pubDate>Sat, 18 Jul 2026 08:12:36 -0400</pubDate><guid>https://scriptable.com/posts/python/mcp-from-openapi-macos/</guid><description>If a service already publishes an OpenAPI spec, you do not have to hand-write a tool for each endpoint. FastMCP.from_openapi reads the spec and generates the whole server: every operation becomes an…</description></item><item><title>Serve Resources Well from an MCP Server on macOS</title><link>https://scriptable.com/posts/python/serve-mcp-resources-macos/</link><pubDate>Sat, 18 Jul 2026 08:03:57 -0400</pubDate><guid>https://scriptable.com/posts/python/serve-mcp-resources-macos/</guid><description>Resources are the read side of MCP: addressable, cacheable data a client fetches by URI, separate from the tools that take action. Serving them well means more than returning a string. A resource has…</description></item><item><title>Design MCP Prompts: Arguments, Templates, and Embedded Resources on macOS</title><link>https://scriptable.com/posts/python/mcp-prompts-macos/</link><pubDate>Sat, 18 Jul 2026 07:54:23 -0400</pubDate><guid>https://scriptable.com/posts/python/mcp-prompts-macos/</guid><description>Tools let a model do things; prompts let a user start things. An MCP prompt is a named, parameterized message template a client surfaces as a slash command or a menu entry — the user picks it, fills…</description></item><item><title>Add Argument Completions to an MCP Server on macOS</title><link>https://scriptable.com/posts/python/argument-completions-mcp-server-macos/</link><pubDate>Sat, 18 Jul 2026 07:38:20 -0400</pubDate><guid>https://scriptable.com/posts/python/argument-completions-mcp-server-macos/</guid><description>When a user fills in a prompt argument or a resource URI in an MCP client, the client can offer autocomplete, the same way a shell completes a path. That only works if the server answers a…</description></item><item><title>Build a Dynamic MCP Server: Notifications and Resource Templates on macOS</title><link>https://scriptable.com/posts/python/dynamic-mcp-server-notifications-macos/</link><pubDate>Sat, 18 Jul 2026 07:20:21 -0400</pubDate><guid>https://scriptable.com/posts/python/dynamic-mcp-server-notifications-macos/</guid><description>Most MCP servers are static: a fixed set of tools and resources, decided at startup. Two features let a server change shape at runtime. Resource templates serve a whole family of resources from one…</description></item><item><title>Design Great MCP Tools: Annotations and Semantics on macOS</title><link>https://scriptable.com/posts/python/mcp-tool-annotations-semantics-macos/</link><pubDate>Sat, 18 Jul 2026 07:06:39 -0400</pubDate><guid>https://scriptable.com/posts/python/mcp-tool-annotations-semantics-macos/</guid><description>A working MCP tool is not the same as a well-designed one. A model decides whether to call your tool, and a client decides whether to auto-run it or ask the user first, based entirely on what the…</description></item><item><title>Return Structured Output from a FastMCP Server on macOS</title><link>https://scriptable.com/posts/python/structured-output-fastmcp-server-macos/</link><pubDate>Sat, 18 Jul 2026 06:55:17 -0400</pubDate><guid>https://scriptable.com/posts/python/structured-output-fastmcp-server-macos/</guid><description>A tool that returns only text makes every caller re-parse prose. The model reads &amp;#34;Denver is 21.5°C and clear&amp;#34; and has to extract the number again; a program has to write a regex. MCP&amp;#39;s structured…</description></item><item><title>Use Your MCP Server from VS Code, Cursor, and Zed on macOS</title><link>https://scriptable.com/posts/python/mcp-server-vscode-cursor-zed-macos/</link><pubDate>Fri, 17 Jul 2026 16:49:27 -0400</pubDate><guid>https://scriptable.com/posts/python/mcp-server-vscode-cursor-zed-macos/</guid><description>Two things are common to all three, and to the Claude clients before them:</description></item><item><title>Publish a FastMCP Server to PyPI and Run It Anywhere with uvx</title><link>https://scriptable.com/posts/python/publish-mcp-server-pypi-uvx-macos/</link><pubDate>Fri, 17 Jul 2026 16:12:04 -0400</pubDate><guid>https://scriptable.com/posts/python/publish-mcp-server-pypi-uvx-macos/</guid><description>Two earlier articles bookend this one. Package and Distribute a FastMCP Server as a uvx Tool gets you to uvx macmcp in your own terminal, and Register a FastMCP Server with Claude Desktop and Claude…</description></item><item><title>Add Observability to a FastMCP Server on macOS</title><link>https://scriptable.com/posts/python/observability-fastmcp-server-macos/</link><pubDate>Fri, 17 Jul 2026 12:39:40 -0400</pubDate><guid>https://scriptable.com/posts/python/observability-fastmcp-server-macos/</guid><description>A server in production has to answer three questions: is it up, what is it doing, and when something breaks, why. This tutorial adds the three observability pillars to a…</description></item><item><title>Register a FastMCP Server with Claude Desktop and Claude Code on macOS</title><link>https://scriptable.com/posts/python/register-fastmcp-server-with-claude-macos/</link><pubDate>Fri, 17 Jul 2026 12:21:29 -0400</pubDate><guid>https://scriptable.com/posts/python/register-fastmcp-server-with-claude-macos/</guid><description>You have a working MCP server (see Build an MCP Server with FastMCP and Create and Deploy a FastMCP Server on macOS). A server on its own does nothing until a client connects to it. This tutorial…</description></item><item><title>Secure a FastMCP Server with Clerk on macOS</title><link>https://scriptable.com/posts/python/clerk-fastmcp-server-macos/</link><pubDate>Fri, 17 Jul 2026 11:26:54 -0400</pubDate><guid>https://scriptable.com/posts/python/clerk-fastmcp-server-macos/</guid><description>In Add GitHub OAuth to a FastMCP Server you delegated login to GitHub. That is a good fit when your users already have GitHub accounts, but it ties your server to one social provider. This tutorial…</description></item><item><title>Add an apps/ Folder to a uv Workspace: A Simple App and a FastAPI App</title><link>https://scriptable.com/posts/python/uv-workspaces-apps/</link><pubDate>Fri, 10 Jul 2026 09:57:27 -0400</pubDate><guid>https://scriptable.com/posts/python/uv-workspaces-apps/</guid><description>The [previous tutorial](/posts/python/uv-workspaces/) built a uv workspace with a single packages/ folder holding a library and a CLI. That layout mixes reusable libraries and runnable programs in…</description></item><item><title>Create a Python uv Workspace with a Shared Makefile</title><link>https://scriptable.com/posts/python/uv-workspaces/</link><pubDate>Fri, 10 Jul 2026 09:42:27 -0400</pubDate><guid>https://scriptable.com/posts/python/uv-workspaces/</guid><description>A uv workspace lets several related Python packages live in one repository, share a single lockfile and virtual environment, and depend on each other by name without publishing to a registry. This…</description></item><item><title>Let Agents Talk to Each Other with the A2A Protocol on macOS</title><link>https://scriptable.com/posts/python/a2a-agent-to-agent-protocol-macos/</link><pubDate>Thu, 09 Jul 2026 06:10:59 -0400</pubDate><guid>https://scriptable.com/posts/python/a2a-agent-to-agent-protocol-macos/</guid><description>Most of the MCP articles in this repo connect an agent downward to tools: an agent is a client, and a server exposes functions it can call. That is the vertical axis. The Agent2Agent (A2A) protocol…</description></item><item><title>Build an Agent That Calls Your MCP Server on macOS</title><link>https://scriptable.com/posts/python/agent-mcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 21:53:42 -0400</pubDate><guid>https://scriptable.com/posts/python/agent-mcp-server-macos/</guid><description>The earlier MCP articles built servers that expose tools and a client that calls those tools by hand: you name the tool, you supply the arguments. An agent is the piece that makes those decisions for…</description></item><item><title>Compose and Proxy FastMCP Servers on macOS</title><link>https://scriptable.com/posts/python/compose-proxy-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 16:36:03 -0400</pubDate><guid>https://scriptable.com/posts/python/compose-proxy-fastmcp-server-macos/</guid><description>As an MCP deployment grows, one giant server file stops scaling. [FastMCP](https://gofastmcp.com) offers two ways to build bigger servers from smaller ones:</description></item><item><title>Elicitation and Sampling: Let a FastMCP Tool Ask the Client on macOS</title><link>https://scriptable.com/posts/python/elicitation-sampling-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 16:12:01 -0400</pubDate><guid>https://scriptable.com/posts/python/elicitation-sampling-fastmcp-server-macos/</guid><description>Most tools take their inputs up front and return an answer. Two MCP capabilities turn that around and let a tool ask the client for something mid-run:</description></item><item><title>Stream Progress from a Long-Running FastMCP Tool on macOS</title><link>https://scriptable.com/posts/python/progress-streaming-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 15:57:27 -0400</pubDate><guid>https://scriptable.com/posts/python/progress-streaming-fastmcp-server-macos/</guid><description>A tool that returns in a few milliseconds needs no ceremony. A tool that runs for several seconds does: without feedback, the client looks frozen, and a user (or a model) cannot tell a slow success…</description></item><item><title>Call an External API from a FastMCP Tool on macOS</title><link>https://scriptable.com/posts/python/external-api-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 15:31:21 -0400</pubDate><guid>https://scriptable.com/posts/python/external-api-fastmcp-server-macos/</guid><description>The tools in the earlier articles computed their answers locally. Most useful tools instead reach out to an external service: a weather API, a payments provider, an internal microservice. That…</description></item><item><title>Put a FastMCP Server Behind HTTPS with Caddy on macOS</title><link>https://scriptable.com/posts/python/tls-caddy-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 15:22:55 -0400</pubDate><guid>https://scriptable.com/posts/python/tls-caddy-fastmcp-server-macos/</guid><description>Every deployment article so far bound the server to 127.0.0.1 over plain HTTP. That is correct for local use and unusable for anything else: a client on another machine cannot reach loopback, and…</description></item><item><title>Add Per-Plan Rate Limiting to a FastMCP Server on macOS</title><link>https://scriptable.com/posts/python/rate-limit-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 15:03:30 -0400</pubDate><guid>https://scriptable.com/posts/python/rate-limit-fastmcp-server-macos/</guid><description>FastMCP ships global and per-client rate limiters, but a quota that varies by plan needs a small custom middleware. You will write one on top of FastMCP&amp;#39;s Middleware base and its RateLimitError, back…</description></item><item><title>Verify Signed JWTs with JWKS in a FastMCP Server on macOS</title><link>https://scriptable.com/posts/python/jwt-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 14:39:06 -0400</pubDate><guid>https://scriptable.com/posts/python/jwt-fastmcp-server-macos/</guid><description>Two earlier articles secured a [FastMCP](https://gofastmcp.com) server two ways: Gate a FastMCP Server to Paying Customers verified opaque license keys you minted and stored yourself, and Add GitHub…</description></item><item><title>Add GitHub OAuth to a FastMCP Server on macOS</title><link>https://scriptable.com/posts/python/oauth-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 13:42:50 -0400</pubDate><guid>https://scriptable.com/posts/python/oauth-fastmcp-server-macos/</guid><description>In Gate a FastMCP Server to Paying Customers you minted your own license keys and verified them yourself. That works, but it means you own the hard parts: issuing credentials, storing them, revoking…</description></item><item><title>Build a Stateful FastMCP Server on macOS with SQLite</title><link>https://scriptable.com/posts/python/sqlite-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 11:55:45 -0400</pubDate><guid>https://scriptable.com/posts/python/sqlite-fastmcp-server-macos/</guid><description>The FastMCP tutorials so far returned pure, stateless results. Real tools usually need state that persists — a record that is still there after the process restarts. In this tutorial you will build a…</description></item><item><title>Serve Media from a FastMCP Server on macOS — Inline or as Expiring Links</title><link>https://scriptable.com/posts/python/media-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 11:33:13 -0400</pubDate><guid>https://scriptable.com/posts/python/media-fastmcp-server-macos/</guid><description>MCP tools usually return text. But a tool can also return media (an image, a document), and sometimes the right answer isn&amp;#39;t the bytes at all but a link to them. This tutorial builds a…</description></item><item><title>Package and Distribute a FastMCP Server as a uvx Tool on macOS</title><link>https://scriptable.com/posts/python/uvx-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 11:32:46 -0400</pubDate><guid>https://scriptable.com/posts/python/uvx-fastmcp-server-macos/</guid><description>The friendliest way to ship a Python command-line tool today is to make it runnable with [uvx](https://docs.astral.sh/uv/guides/tools/), uv&amp;#39;s equivalent of pipx run. A user types uvx macmcp and uv…</description></item><item><title>Build and Deploy a FastMCP Server on macOS Without Writing Code — Let Claude Code Do It</title><link>https://scriptable.com/posts/python/claude-code-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 10:43:47 -0400</pubDate><guid>https://scriptable.com/posts/python/claude-code-fastmcp-server-macos/</guid><description>Most tutorials hand you code to type. This one does the opposite: you will stand up a [FastMCP](https://gofastmcp.com) server on your Mac in which you never write a line of application code. You…</description></item><item><title>Gate a FastMCP Server to Paying Customers on macOS</title><link>https://scriptable.com/posts/python/license-gated-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 10:25:19 -0400</pubDate><guid>https://scriptable.com/posts/python/license-gated-fastmcp-server-macos/</guid><description>Building an MCP server is easy; making sure only the people who paid for it can call it is the part that turns a demo into a product. In this tutorial you will build a…</description></item><item><title>Connect to a FastMCP Server from macOS</title><link>https://scriptable.com/posts/python/connect-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 10:03:38 -0400</pubDate><guid>https://scriptable.com/posts/python/connect-fastmcp-server-macos/</guid><description>In the companion article Create and Deploy a FastMCP Server on macOS you built a [FastMCP](https://gofastmcp.com) server and deployed it as a launchd service listening on http://127.0.0.1:8000/mcp/…</description></item><item><title>Create and Deploy a FastMCP Server on macOS</title><link>https://scriptable.com/posts/python/deploy-fastmcp-server-macos/</link><pubDate>Tue, 07 Jul 2026 09:39:26 -0400</pubDate><guid>https://scriptable.com/posts/python/deploy-fastmcp-server-macos/</guid><description>The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) lets AI clients (Claude Desktop, Claude Code, or your own agent) call tools, read resources, and load prompts from an external…</description></item><item><title>Build a Multi-Agent System with Google's Agent Development Kit</title><link>https://scriptable.com/posts/python/multi-agent-google-adk/</link><pubDate>Thu, 25 Jun 2026 22:06:26 -0400</pubDate><guid>https://scriptable.com/posts/python/multi-agent-google-adk/</guid><description>A single LLM agent works well until the job spans several distinct skills. The proven pattern is a coordinator agent that delegates to specialized sub-agents — much like a manager routing work to…</description></item><item><title>Build an MCP Client with FastMCP and Python</title><link>https://scriptable.com/posts/python/mcp-client-fastmcp/</link><pubDate>Thu, 25 Jun 2026 21:55:47 -0400</pubDate><guid>https://scriptable.com/posts/python/mcp-client-fastmcp/</guid><description>A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server exposes tools, resources, and prompts; an MCP client is what connects to that server, discovers those capabilities, and calls…</description></item><item><title>Build an MCP Server with FastMCP and Python</title><link>https://scriptable.com/posts/python/mcp-server-fastmcp/</link><pubDate>Thu, 25 Jun 2026 21:31:32 -0400</pubDate><guid>https://scriptable.com/posts/python/mcp-server-fastmcp/</guid><description>The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) is an open standard that lets AI clients (such as Claude Desktop, Claude Code, or your own agent) call tools, read resources, and…</description></item><item><title>Build a Python Hello World Application</title><link>https://scriptable.com/posts/python/hello-world/</link><pubDate>Wed, 18 Feb 2026 06:26:31 -0500</pubDate><guid>https://scriptable.com/posts/python/hello-world/</guid><description>A minimal Python project that prints a greeting, accepts a name from the command line, includes a pytest test suite, and uses a Makefile to drive common tasks. This tutorial covers project setup with…</description></item><item><title>Build a CLI Task Manager in Python</title><link>https://scriptable.com/posts/python/cli-task-manager/</link><pubDate>Tue, 17 Feb 2026 22:02:56 -0500</pubDate><guid>https://scriptable.com/posts/python/cli-task-manager/</guid><description>A command-line task manager that stores tasks in a local JSON file, supports adding, listing, completing, and deleting tasks, and uses only the Python standard library.</description></item></channel></rss>