ArticleOctober 12, 2025Free to read

Make Claude Code More Powerful: Unlock Symbol-Level Code Retrieval

Code is not plain text; it has structure, semantics, and dependencies. AI tools need symbol-level retrieval to improve efficiency and accuracy in programming tasks.

Originally published . English translation: . Read the Chinese original.

Original video in Chinese.

Key Takeaway

  • The importance of code retrieval: code is not plain text; it has structure, semantics, and dependencies. AI tools need symbol-level retrieval to improve the efficiency and accuracy of programming tasks.
  • Serena recommendation: a free open-source tool that connects to Claude Code via MCP and uses LSP to provide symbol-level code understanding. It’s easy to install, configured for a specific project, and suitable for large projects (though it may be a bit slow).
  • Design trade-offs: AI tools do not have built-in language servers to avoid bloat and maintenance difficulty; they choose extensibility instead. Serena fills this gap and significantly improves complex code handling.

There are many tools that can make Claude Code more powerful. Among them, the one I think should be installed first, and is most worth installing first, is a tool that improves code retrieval.

In this video, I’ll recommend a very useful free tool and explain exactly why it’s good and why you need it.

Unlike other scenarios, programming involves an enormous amount of information. No matter how large the context window is, it still can’t handle it, so retrieval is a must.

What’s more, code generation, code refactoring, architecture analysis, cross-file debugging, and so on all strongly depend on deep understanding of the entire codebase and efficient access to it.

On this front, even Claude Code only stays at a relatively shallow level, because it treats code as plain text.

The problem is, code is not text.

Code may look like a bunch of plain text characters, but it also has structure, semantics, and dependencies.

Through keyword search, regular expression search, or embedding-vector search, Claude Code can find code, but that doesn’t make it truly understand the code.

And this gap is left for developers to fill.

Hello everyone, welcome back to my channel. Humbly speaking, I’m one of the few bloggers in China who can clearly explain the Why and How of AI. What I offer is worth far more than tutorials. Remember to follow me. If you want to connect with me, come to our newtype community. This community has been running for 500 days, and more than 1,500 friends have joined as paying members.

Back to today’s topic: improving code retrieval to make Claude Code more powerful.

Serena is an open-source toolkit designed specifically to enhance the code understanding, retrieval, and editing capabilities of AI programming tools. It connects to Claude Code through MCP, giving Claude Code symbol-level understanding and greatly improving the efficiency and accuracy of code handling.

Installing and using Serena is very simple; anyone can do it.

The Serena GitHub includes a long list of configuration methods, but for Claude Code, the easiest way is to run this command in the terminal. Since it includes the project parameter, even activation is unnecessary, which is especially convenient.

Then, open Claude Code and type /mcp, and you can see Serena connecting. Wait about 5 to 10 seconds and it will connect. At this point, it will automatically open a webpage showing specific information.

Finally, enter this MCP command. Its purpose is to tell Claude Code how to use Serena.

There are two things I need to remind everyone about here:

First, Serena is not a global configuration; it is specific to a particular project. If you switch to another project, you’ll need to run the command again. It will generate a file in the project’s root directory to record the project information.

Second, the effect of that MCP command just now is temporary. In other words, the next time you open a new conversation, you’ll have to enter it again. If you don’t want to make it that much trouble, you can save the content into claude.md, and then Claude Code will always remember how to use it.

That’s how simple Serena installation and use are—there’s not much else to say. What really attracts me is actually how it is implemented.

The reason Serena can provide symbol-level code retrieval for AI programming tools like Claude Code is that it uses two things: “language servers” and the “Language Server Protocol.”

The abbreviation for the Language Server Protocol is LSP, Language Server Protocol. It is an open-source standard protocol created by Microsoft many years ago. For the industry, this protocol is extremely useful—it really has been a huge help.

Because before this protocol existed, if you were a developer of some editor and wanted that editor to support analysis features for certain code, you had to build it yourself. That led to problems like reinventing the wheel, inconsistent experiences, high maintenance costs, and poor support for niche languages.

After the LSP protocol came along, the industry gained a “universal interface.” Developers build and maintain their own language servers based on this protocol and this universal interface. Any editor that supports this protocol and this universal interface can use language servers.

It’s a lot like a USB interface or the MCP protocol—much more convenient.

So on one hand, Serena communicates with Claude Code through the MCP protocol; on the other hand, it uses the LSP protocol to uniformly coordinate various language servers.

And language servers understand code at the “symbol level,” which is much stronger than plain text retrieval. That’s how Claude Code’s code retrieval capability gets enhanced.

At this point, you may ask: since language servers are so useful and the protocol already exists, why don’t these AI programming tools build it in?

Everything has a cost. If language servers were built in, the whole tool might become bloated, start slowly, and be troublesome to maintain. In addition, using it might feel slower. That’s because communication with language servers is interprocess communication, which is slower than direct memory operations. And when dealing with large codebases, language servers also need more time to parse files and relationships. So this is the exact cost.

So after weighing the trade-offs, these tools choose an extensible design and let users decide whether to install it. My advice is: if your project is relatively large, install it—it will bring a very real improvement.

OK, that’s it for this episode. If you want to understand AI, want to become a super individual, and want to find like-minded people, come to our newtype community. See you next time!