Tailwind without utility soup: semantic CSS for Python web apps
I maintain fscss , a Python wrapper around FSCSS , and we just shipped 0.2.0 on PyPI and GitHub . The idea is simple: keep semantic CSS, but remove the repetitive parts. The problem Most Python web projects end up in one of two places: Hand-written CSS that grows into a wall of repeated spacing, colors, and mixin-like patterns. A utility-class framework that moves styling into templates and adds…
The article demonstrates how to interact with a remote MCP server using only Python's standard library, without requiring any additional packages or API keys. By leveraging JSON-RPC over HTTPS POST, the author shows how to connect to a real server at https://siftwright.com/mcp.
The author explains that communicating with the MCP server involves three key JSON-RPC methods: initialize, which establishes protocol version and server name; tools/list, which retrieves tool details; and tools/call, which runs a specified tool with provided arguments.
The article provides a concise Python script that showcases these concepts. It begins by importing necessary modules, setting the MCP_URL and an optional API_KEY for authenticated calls. The rpc function handles sending JSON-RPC requests, managing the request ID, and parsing responses. If an API key is provided, it's included in the request headers.
To demonstrate the functionality, the script performs three actions:
1. Calls initialize to confirm protocol version and obtain the server's title and supported protocol version.
2. Calls tools/list to retrieve a list of available tools, including domain_whois and pqc_scan, which can be used without an API key.
3. Calls domain_whois with a sample domain to retrieve WHOIS information without exceeding the daily limit.
The output of these three calls is then printed, providing a clear example of interacting with the MCP server using only the Python standard library.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to
This story
This is one outlet's version. Read the fullest account.