MCP Remote

I’ve been implementing a remote MCP Server. It comes with a hybrid authentication system that supports the OAuth2 flow and, as a fallback, a custom header for those simple clients that cannot handle OAuth. One such client is Claude Desktop, which, at this time, is even worse; it only supports STDIO (local) servers, let alone OAuth2. Today I learned about a nice NPM package called MCP Remote, which bridges the gap by allowing MCP clients that only support local servers to connect to remote MCP Servers, even with authentication support. Thanks to this tool, Claude Desktop is now talking to my remote server1. ...

June 18, 2025

Marp, the markdown presentation ecosystem

Today, I learned about Marp, the “Markdown Presentation Ecosystem,” which comes with an enticing promise: to create beautiful slide decks using an intuitive Markdown experience. For my latest presentation, I utilized the Slides Extended Obsidian plugin, which is based on reveal.js—an excellent option for keeping slide decks within one’s Obsidian vault (I keep all notes, work and personal journals, and knowledge in Obsidian.) Marp could be a viable alternative to the plugin, as Obsidian notes are just markdown files. The advantage here is that I can further elaborate or iterate on my slides, for example, from the command line, as Marp comes with a dedicated CLI tool that lets you export to PDF, HTML, and more. Additionally, Marp is not based on reveal.js, a tool that has given me headaches in the past. ...

June 17, 2025

Reading books and commenting on them with ChatGPT

I just finished reading Paul Auster’s The New York Trilogy1. On this occasion, I discovered a new use for ChatGPT and LLMs. ChatGPT and I chatted about the themes, especially the correlations and connections between the three short novels that comprise the volume. It was an alienating and revealing experience. For the first time, I am reasoning about a book with a machine, not a person. Because it knows everything about the text and draws on the shared global knowledge, it can give more satisfaction than most people do (also, it’s not easy to find someone around with whom I can talk about all the books I read!) Yes, it is wordy and repetitive, but it can stimulate and enrich my analysis2. ...

November 26, 2024

Under ASP.NET 8, NGINX returns 502 Bad Gateway after authentication by IdentityServer

Today, I learned the hard way that NGINX has default buffer sizes, which can cause trouble in specific scenarios like mine.

September 12, 2024

ShellCheck

Today I learned about ShellCheck, a static analysis tool that “finds bugs in your scripts”. It can and should be run on the command line, but an online version is also available. It catches most style and syntax errors and has plenty of options, like ignoring specific errors and warnings, which is helpful in CI scenarios.

July 24, 2024

Bash-Oneliner: a collection of terminal tricks for Linux

Bash-Oneliner is an excellent resource for Bash/Linux users. Most of the “tricks” are well-known, but there is always something to learn. More importantly, finding them all well organized in one file is rare. I use the reverse lookup of bash-history (Ctrl+R) daily. Still, only today (thanks to an HN comment on Bash-Onliner) did I learn that it also preserves one’s comments, which can be exploited to invoke complex commands quickly: $ mv -n ~/Desktop/*.pdf ~/Documents/PDF_Archive/ #pdfsync Then, you simply Ctrl-R and type “pdfsync” to recall the above command when needed. Neat. ...

July 22, 2024

How to handle custom claims in an Open ID Connect-authenticated ASP.NET Core app

Today, I learned how to handle custom claims in an Open ID Connect authenticated ASP.NET Core app. The scenario goes like this. I have an ASP.NET Core app that authenticates with Open Id Connect. It receives a bearer token from the authentication server. Besides OIDC claims, this token has been forged with additional custom claims for use in the app. However, only ODIC claims exist when I parse HttpContext.User.Identity.Claims in my middleware. If I retrieve the token with HttpContext.GetTokenAsync and decode it, I confirm it contains all the claims I need. Where have my custom claims gone? Or, how can I get User.Identity to provide them along with the OIDC ones? ...

May 31, 2024

ChatGPT is the perfect Linux assistant

I spent the day doing remote maintenance on multiple Linux machines via ssh. The revelation is that ChatGPT is the bomb for these tasks: What does that command option do? I am trying to remember. What syntax is to install that peculiar and rarely used package on Debian? I am getting this locale configuration error; what was the fix again? All this stuff is answered much sooner than searching online, no matter the search engine. ...

March 29, 2024

SQLite foreign key constraints are disabled by default

Today, I learned that SQLite only enforces foreign-key constraints if explicitly instructed. I imagine this is well-known and trivial for the SQLite initiated, but we’re a Postgres shop; I have used SQLite sporadically, primarily for experiments like today’s, and this one amenity was certainly unexpected. Anyways. I had all my ON DELETE CASCADE constraints nicely configured, but related records in child tables were not being deleted when I deleted the parent. Perplexed, I looked it up. ...

February 22, 2024

Default ASP NET Core 8 port changed from 80 to 8080

Today, I learned the hard way that the default port for ASP.NET Core 8 container images has been updated from port 80 to 8080, quite a remarkable breaking change. We upgraded our web application from .NET 7 and let the CI pipeline do its work. Finally, we checked the application in the browser to ensure everything was okay, but unfortunately, we got a 502 Bad Gateway error. The Nginx logs revealed that the app was rejecting connections, which was unexpected because we didn’t make any changes there. Further investigation showed that the web app listened on port 8080 while Nginx was reverse-proxied to 80. So that was the problem. But why did the port change? ...

February 20, 2024