Tales from the jar side: Claude Code MCPs, Playwright tests, A bug that wasn't, New glasses, OmniControl art, and the usual social media posts
How do you recognize AI-generated code? It has actual comments in it. (rimshot)
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of June 22 - 29, 2025. This week I taught a Reactive Spring course on the O’Reilly Learning Platform.
Claude Code
Last week I talked about how to add MCP servers to Claude Code. That gives the agent access to lots of useful tools that it can use to help you work. I specifically mentioned the context7 service, which gives the tool up-to-date information on APIs and code examples, and how to add the Docker MCP Toolkit to Claude Code, which collects many different MCP services together.
(Including, as it turns out, Context7. I wound up adding both at the same time, because I added it at user scope using the stdio protocol (stored locally), and via the Docker MCP Toolkit using the http protocol. As it happened, I called one of them context7 and the other Context7, so that meant they didn’t conflict. I think if I’d used the exact same name, the second would have overridden the first, but I don’t know for sure. Then for some reason today the local one couldn’t connect, so I guess it was good to have both.
Context7 FTW
One of the servers I added (via docker) was a weather app based on OpenWeatherMap. I already have a key for that and I’ve implemented access myself, but I wondered how they would do it via docker. Here’s the basic configuration:
{
"mcpServers": {
"openweather": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"OWM_API_KEY",
"mcp/openweather"
],
"env": {
"OWM_API_KEY": "<OWM_API_KEY>"
}
}
}
}
OWM is OpenWeatherMap, of course. I don’t like embedding my key in there, but Docker MCP Toolkit lets you avoid that. I had trouble getting the access to work, because I didn’t know what the arguments needed to be. Inside Claude Code I could ask about the tool and see them:
That left me with a question. What happens when you put in a city name that appears in multiple locations? What if I just say “Springfield”? Would that give me the weather for Springfield, MA, Springfield, IL, or Springfield, MO, or a different one I don’t know?
(I’m pretty sure it defaults to Springfield, IL, in case you were wondering.)
Claude Code acted like it didn’t know either, but I told it to “use Context7” to investigate the API, and it turned out the proper format for the city parameter is “city, state, country_code”, as in “Springfield, MA, US”. If you leave out the “US”, it doesn’t work.
Go figure. But at least it’s working now, and I can see why Context7 is valuable again.
String method name too long
But here’s where the fun happened. Using any of those tools started to give me errors, with a really lousy error message. The error claimed it had a problem with the name of a method exceeding their limit, which was 64 characters.
Huh. I went digging into the servers I had enabled through Docker MCP Toolkit, and I hit upon the “Official GitHub MCP server”. One of its methods is:
add_pull_request_review_comment_to_pending_review
That’s 49 characters, so it’s long but still inside the limit. But when I dug into the full name, it turns out it’s
mcp__MCP_DOCKER__add_pull_request_review_comment_to_pending_review
And that, believe it or not, is 66 characters long. Oops.
There’s a slash command I hadn’t tried yet in Claude Code, which is called /bug
. That let’s me file a bug report. I went through the process, which added an issue to the Anthropic Claude Code repository on GitHub.
I got a response about three hours later:
And there you go. Apparently I hit a very narrow window when the 66 character length was a problem, and by the time I filed the bug report, it was already fixed. Yay.
As a Java developer, I have no idea why the strings they’re using have a limit at all (or, if so, why it’s not incredibly long), but so be it. At least it’s working now.
Playwright MCP
There’s a popular testing tool for browser automation called Playwright, from Microsoft. I heard about it twice this a week. Once was when one of my more ambitious Trinity students contacted me about using it, which is pretty impressive given that we’re in our summer break. The other is that as I mentioned in last week’s newsletter, I’m now using Slidev for my slide presentations. In Slidev, when you want to export the slides into pdf form, the export tool uses Playwright under the hood to navigate through the slides, taking snapshots of each and converting them to PDF pages.
I watched a YouTube video about it, and it looked solid, though with a learning curve. That’s pretty typical for tools like that. I remember using Geb (from the Groovy ecosystem) a decade ago to do something similar.
It turns out, though, that Playwright has an MCP server. That meant I was able to work with my lyrics trainer app, which I wrote several weeks ago when I was trying to memorize some song lyrics. I installed the MCP server, started up Claude Code, and told it to generate a set of test cases for the user interface.
The results were rather amazing. Not only did it generate about 150 tests that included specifics for Chrome, Firefox, Safari, and mobile browsers for both iOS and Android, it helped me set up a GitHub Action to run everything and make sure they’re all passing whenever I update the code. All of that took me, oh, about 20 minutes.
Once again, that falls in the category I’m starting to call scary awesome, which means it’s fantastic to be that productive, but after that what does the tool need me for? Sure, I’m the one making the judgement calls, deciding what to do and what not, and so on, but for how much longer? I guess we’ll see.
New Glasses
A few years ago, I remember talking to Neal Ford when he said he was an adult now, and therefore it was okay to buy a second pair of glasses. I finally got around to doing the same. Here they are:
They’ve got a cool blue sheen to them that shows up mostly in natural light. Admittedly, the ten minutes I spent on our deck was more direct sunlight than I typically get in a month (I am, after all, quite the pasty geek), but the exposure was probably worth it and maybe even good for me.
I’m not sure how often I’ll wear the new glasses, but it’s nice having a second pair. The whole experience feels like I’m basking in wealth beyond the dreams of avarice. I believe I’ll celebrate by going to a restaurant that wraps its silverware in cloth napkins rather than just paper ones. Oooh, aaaah.
(Hey, it’s not your money. This newsletter is still free.)
OmniControl Art
I watched a video where Sam Witteveen added the HuggingFace MCP server to Claude Code. That’s got a lot of capabilities that are useful to individual users, but I’m not sure how much they benefit Claude Code. Still, I wanted to try it, and I stumbled upon OmniControl Art, one of those image generation spaces that renders an existing picture in various styles.
For example, I used this image, which my wife and I took for a concert we gave a few years ago (July 2018), when I had more hair than I do now:
Here are the options on the web page:
So I started by rendering our image in Studio Ghibli form:
Here it is in the Snoopy style option, which presumably means Peanuts:
Not sure where my mustache went on that one.
Here we are as though we were characters on the Simpsons:
It did not escape my notice that I look various stages of goofy, while my wife looks good in every picture. That figures, though. She does look good in every picture.
(Plus she reads my newsletter. Just saying.)
While that was fun to play with, I’m not sure I see a use case for Claude Code in there. You might want to play with it, though. Feel free to leave an image in the comments.
Social Media
Danger, Will Robinson: Seriously bad pun ahead
Mea culpa. Mea maxima culpa. But lol anyway.
I hear you, ‘bub
I try to avoid Twitter as much as possible, but there are still too many people there to avoid it entirely.
Now that’s just mean
For my non-technical readers, CRUD actually stands for Create, Read (or Retrieve), Update, Delete, which are the actions relational databases do. Still, presumably the attendees loved this gag. It reminded me of this classic:
The caption is something like, “Some men just want to watch the world burn.”
Been a while
I hate when they ask questions they already know the answer to.
Oh no
Chewbacca should have gotten the same medal Hans got at the end of A New Hope. Right?
Vaccinations FTW
Both Magnus Carlsen and I play chess, too.
It’s only getting hotter, too
At least we know that wasn’t AI generated. I think.
Okay, fine, one Elon joke
Rocket go boom. Sad, but couldn’t happen to a nicer guy.
Finally, there’s a whole routine for that
Have a great week, everybody. :)
Last week:
Reactive Spring, on the O’Reilly Learning Platform
This week:
Claude Code, on the O’Reilly Learning Platform