Serena + Hermes Agent Locally: IDE Your AI Coding Agent Was Missing
Read the Portuguese translation →
Author: Fahd Mirza · Watch on YouTube
Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.
Original language: English
Original video: Serena + Hermes Agent Locally: IDE Your AI Coding Agent Was Missing · Channel: Fahd Mirza · 07:49 · Watch on YouTube
Topics: AI agents, Software engineering with AI, AI developer tools
Summary
Section titled “Summary”The video demonstrates how Serena gives coding agents IDE-like understanding of a codebase through language server protocol (LSP) capabilities exposed over model context protocol (MCP). The presenter installs Serena, connects it to Hermes Agent, and points it at a local application. Hermes uses Serena to find references to a database column and identify a structurally incorrect join, then safely renames a function and verifies the change. The presenter notes that the same MCP setup pattern can be used with other agent harnesses.
Key points
Section titled “Key points”- Serena provides semantic code tools such as finding symbols and references and safely renaming code.
- LSP supplies code-structure understanding similar to features in IDEs such as autocomplete, go to definition, and refactoring.
- MCP lets agents connect to external tools through a standard interface.
- The presenter installs Serena with UV and initializes it with an LSP backend.
- Serena is registered as an MCP server in Hermes Agent and exposes 21 tools.
- Hermes asks Serena to find all references to the grade column across the application codebase.
- The results distinguish occurrences by their roles and help identify an incorrect SQL join condition.
- The demo shows a function rename performed across its uses and verified by the agent.
- The presenter says the MCP integration pattern can also be used with other agent harnesses.
Chapters
Section titled “Chapters”| Start | Chapter | Summary |
|---|---|---|
| 00:01 | What Serena does | The presenter introduces Serena as a way to give coding agents semantic, IDE-like understanding rather than relying on fragile text edits. |
| 01:37 | LSP, MCP, and setup | The video explains LSP and MCP, then connects Serena to Hermes Agent as an MCP server scoped to the local project. |
| 04:15 | Finding references and a bug | Hermes uses Serena to find references to the grade column and identify a structurally incorrect join in context. |
| 06:48 | Safe rename and other agents | The presenter tests a function rename with verification and notes that Serena’s MCP integration pattern can work with other harnesses. |
Quotes
Section titled “Quotes”It builds itself as the IDE for your coding agent. — 00:01
LSP is language server protocol. — 01:37
Then we have MCP or model context protocol. — 02:11
That’s the difference between grep level search and real code understanding — 05:17
Now, this is something grep generally cannot do safely, a real rename. — 06:48
Concepts and entities
Section titled “Concepts and entities”Serena, LSP, MCP, Hermes Agent, Claude Code, Iron Ore
Full transcript (original language)
Section titled “Full transcript (original language)”00:01 So, what we are looking at here is Serena. It builds itself as the IDE for your coding agent. Normally, what happens is that when an AI agent edits code, it’s working almost blind, grabbing through text, guessing at line numbers, doing fragile text surgery that breaks easily on anything beyond a trivial change. Serena fixes that by giving the agent real IDE level understanding of your code base. It can
00:33 find a symbol, trace every reference to a function across files, rename something safely everywhere it’s used, all through proper semantic tooling instead of text hacks. We are going to install it, and then I’m going to use it on this live local application which has some bugs, but it is already running on my Ubuntu system with some back end, front end, and a lot of other things. Application is not really in question here. The most important thing is how Serena does what
01:04 it promises that it does. So, I’m just going to get it installed through UV. It’s a simple command which installs it fairly quickly in a virtual environment. That’s already done. Let’s quickly initialize it. And by the way, this is Fahad Mirza, and I welcome you to the channel. Recently, I also have started this free weekly AI newsletter which you can subscribe at fahadmirza.substack.com. And if you’re looking to rent a GPU on very good price, you can find the link to Mass Compute in video’s description.
01:37 Serena is initialized, and you can see that the language back end is set to this LSP. Now, there are two terms which you need to be aware of, LSP and MCP. LSP is language server protocol. It is the same technology that powers auto complete, go to definition, and refactoring in editors like VS code or PyCharm. It’s a background process that actually understands your code structure, the symbols, the function calls, the references, rather than treating it as plain text. Serena uses LSP as its brain
02:11 for code intelligence. Then we have MCP or model context protocol. This is a connector layer. It’s how any agent, whether that’s Cloud Code, Cursive Hermes Agent, Open Claw, um can talk to external tools in a standard way. Serena exposes its LSP-powered capabilities as MSP tools. So, whatever agent you are using can call things like find symbol or find references directly. Um now I already have Cloud Code installed
02:42 and Hermes Agent installed, and it has already um even told us that we can use that Cloud Code, but I’m going to use Hermes Agent for this one. And this diagram, which I just showed you, also tells you the whole stuff which I just uh explained. Okay, so everything is set up. I already have Hermes Agent installed. So, what I’m going to do, I’m going to hook this Serena up to Hermes Agent as an MCP server, and then I’m going to point it
03:12 at our this buggy Iron Ore application so it can see the code. That is what I’m going to do here. So, this is the command which I’m going to run. This registers a new MCP server named Serena, and tells Hermes how to actually launch it. Where it is running the Serena binary with the start MCP server command in IDE assistant mode scoped to our project folder, which is on my local system. So, you see it already has found Serena.
03:44 It got connected to that MCP server, and these are all the tools, 21 of them, which Serena exposes. So, I’m to just press capital Y to expose all the tools and enable them. And now everything has been saved in this uh dot Hermes config.yml file. And by the way, I’m using the latest version of Hermes agent, so make sure you’re also using that. And this is my Hermes version if you want to check it out as a reference.
04:15 And next up, let me launch Hermes agent on my terminal. I’m just going to launch it uh as a vanilla Hermes agent, and it should find that um MCP server, too. So, it is launched. If I just scroll up, it should be here somewhere. There you go. So, this is our MCP server Serena where it is connected to it. So, let me first ask it a simple question from this code base. So, I’m asking it, “Find all references to the grade column across this code base.”
04:46 It’s a simple enough one. And let’s wait for it. You can ignore these warnings because it is just asking me to update the Hermes agent. That update happens like every other hour every day. So, I will let it run so that you could also see how it is using the tool. And then it is going to that Iron Ore DB, as you can see. And now it has found all the references. And it is giving us uh the whole flavor of the tool. So, I’ll just go up. There you go. You see?
05:17 So, this is Serena semantic search and action. It just scanned every reference to grade across the whole code base, grouped by role, and pinpointed the exact bug on line um this one, 123, without me telling it where to look. That’s the difference between grep level search and real code understanding, and that is what this whole repo is all about. Now, this is the point where uh I will just again explain what makes this semantic, not just text search, because
05:47 that is what makes it different. Hermie’s isn’t just matching the word grade wherever it happens. It’s using Serena to actually understand what each occurrence means in context. It look It knows, for example, this line 44. Look at this. It is a column definition, and then line 80 is a Pydantic model field. Line, uh, let’s say 123, which I showed you earlier. That, uh, is a join condition inside a SQL string, and then it can tell that
06:17 one join is structurally wrong because it’s comparing against a column that doesn’t exist on the table. If you would do just a plain grep in shell, that would have dumped all 32 matches flat, with no idea which one is a schema, which is a variable, and which is actually broken. You would still have to read through them yourself. Serena’s language server back end, LSP, actually passes the code’s structure, so the agent gets it pre-organized and even
06:48 flags the real bug on its own. Let me ask it another question. Okay, let me do another final test where I think you will understand a bit more. I’m asking it to rename the function shipment summary to get tonnage by grade. Now, this is something grep generally cannot do safely, a real rename. So, we’re asking it to rename this function to something else everywhere it is used. A text-based rename risks renaming the wrong shipment or comment, whereas this should be, uh,
07:18 able to rename it, which you can see it is already doing it pretty nicely. And hopefully it is going to update them all together as one atomic operation, and that is the key part here. There you go. You see? The rename test one place, and that is correct. And it has not only renamed it, but also it verified it, and then given us the exact answer. How good is that? Really good stuff. So, I think the project seems quite promising and as I said it is not really fixated on one
07:49 harness. You can use it with any harness of your choice just like we did with Hermes Agent, same thing. Um you will you will just replicate the same pattern of MCP with open code, claw, you know, whatever claw you are using or claw code. That’s it. Let me know in the comments what do you think about this tool. Again, if you want to help out the channel, please become a member and subscribe to this newsletter. Thank you for all the support.