Claude 4, in particular Opus, is amazing for coding. It has only two main downsides: high cost and a relatively small context window.
Fortunately, there is a free, open-source (MIT licensed) solution to help with both: the Serena MCP server, a toolbox that uses language servers (and quite some code on top of them) to allow an LLM to perform symbolic operations, including edits, directly on your codebase. You may have seen my post on it a while ago, when we had just published the project. It turns a vanilla LLM into a capable coding agent, or improves existing coding agents if included into them
Now, a few weeks and 1k stars later, we are nearing a first stable version. I have started evaluating it, and I'm blown away by the results so far! When using it on its own in Claude Desktop, it turns Claude into a careful and token-frugal agent, capable of acting on enormous projects without running into token limits. As a complement to an existing agentic solution, like Claude Code or some other coding agent, Serena significantly reduced costs in all my experiments while keeping or increasing the quality of the output.
None of it is surprising, of course. If you give me an IDE, I will obviously be better and faster at coding than if I had to code in something like word and use pure file-reads and edits. Why shouldn't the same hold for an LLM?
A quantitative evaluation on SWE-verified is on its way, but to just give a taste of what Serena can do, I created one PR on a benchmark task from sympy, with Opus running on Claude Desktop. It demonstrates how Opus intelligently uses the tools to explore, read and edit the codebase in the most token-efficient manner possible. For complete transparency, the onboarding conversation and the solution conversation are included. The same holds for Sonnet, but for Opus it's particularly useful, since due to its high cost, token efficiency becomes key.
Since Claude Code is now included into the pro subscription, the file-read based MCPs are largely obsolete for coding purposes (for example, the codemcp dev said he now stops the project). Not so for Serena, since the symbolic tools it offers give a valuable addition to Claude Code, rather than being replaced by it.
Even though sympy is a huge repository, the Opus+Serena combo went through it like a breeze. For anyone wanting to have cheaper and faster coding agents, especially on larger projects, I highly recommend looking into Serena! We are still early in the journey, but I think the promise is very high.
I am using Serena MCP, but I don't notice that Claude Code works better with it. In fact, anytime it calls Serena's tool, CC slows to a grind. I have my project indexed. Is it just me, or are MCPs just hype and not value adds?
Videos
I'd like to use Serena MCP with Claude Code but the need to manually "prime" it every use is easy to fumble. The Github readme states:
an alternative to the above is adding the instructions as part of the system prompt, then you will not need to run the command above or to remember re-running it after compacting. This can be achieved through starting claude code with claude --append-system-prompt $(uvx --from git+https://github.com/oraios/serena serena print-system-prompt). Note that this is experimental, Claude may not understand the instructions correctly in this way, and we haven't thoroughly tested the resulting behavior. Please report any issues you encounter.
Is anyone doing this, and has anyone tried using a hook for this instead?
Thanks so much to /u/thelastlokean for raving about this.
I've been spending days writing my own custom scripts with grep, ast-grep, and writing tracing through instrumentation hooks and open telemetry to get Claude to understand the structure of the various api calls and function calls.... Wow. Then Serena MCP (+ Claude Code) seems to be built exactly to solve that.
Within a few moments of reading some of the docs and trying it out I can immediately see this is a game changer.
Don't take my word, try it out. Especially if your project is starting to become more complex.
https://github.com/oraios/serena
I randomly saw a YouTube video (sorry forgot the name for credit) where a guy showed an MCP called Serena.
I gave it a go and just wow…..
Claude is better than it ever has been for me.
Not sure if it will work for everyone, but I highly recommend giving it a go.
Ps. I put a “mandatory: must use Serena for any file operations if it all possible” as the first line in my Claude.md
Hope this helps someone!
Edit: https://youtu.be/UqfxuQKuMo8?si=i5_eQKuRYDSZa5vk
Ive been going through this subreddit abit on serena MCP and its often mentioned, same goes for youtube videos - often mentioned - even saw some cool guys just posting some own products they made just for this here today/yesterday.
Im right now trying to get around how to be able to approach large legacy files and it is a pain, and installed serena mcp with claude code, but honestly im unsure if im getting any actual benefit from it - its stated that i will save tokens and get a much better indexing of large codebases, and while i do notice maybe that instead of going filesystem it accesses it with index am simply not feeling the love as to feeling able to work specifically in the larger files or getting better overview than claude out of the box of the codebase.
If anyone ask - what MCP is musthave, Serena will be mentioned - and can find alot of youtube videos with that headline but anyone knows of someone who goes through this with actual large codebases spending time on showing the benefit in real life ? those ive gone through so far is saying 'its great' and show how to install it and then thats about it.
And note i am not dissing Serena at all - its seems to be extremely valuable and i might be using it wrong but would be great if anyone had some real handson with real large codebases or just large source files so i could be pointed in the direction of how i could utilize it.
Or should i go for other tools here mainproblem is ofcourse you can get really really stuck if you have really bad legacy code with huge source file or bad structured code and goal here is trying to be able to ex do some rough refactoring on single large files that goes way above the context window if CC etc.
Or if anyone had a consistant luck in moving through large codebases for refactoring and able to show some working prompting and tools for this ( i am already planning/documenting/subagenting/etc so really looking for some hands on proper practice/right tools ).
Note languages vary - anything from C#, Java, Js, to different web-frameworks.
Thanks !
I've been trying to get the Serena MCP server (https://github.com/oraios/serena) working with Claude Code running in Ubuntu WSL2, but I'm hitting a persistent connection issue. The server launches successfully but Claude Code never actually connects to it.
Environment Details:
OS: Windows 11 with WSL2 (Ubuntu 24)
Claude Code: v2.0.20 (running in WSL terminal)
Terminal: VS Code integrated terminal (working directory:
/mnt/d/Documents/Game Design Documents/Lianji)Serena: Installed via
uvxfrom snap:astral-uv 0.8.17Project: Unity/C# project on Windows filesystem mounted at
/mnt/d/...uvx location:
/snap/bin/uvx(snap package)Node version in WSL: v18.20.6
Configuration Files:
~/.claude/settings.json:
json
{
"feedbackSurveyState": {
"lastShownTime": 1754083318070
},
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"mcpServers": {
"serena": {
"command": "/home/althrretha/.claude/start-serena.sh",
"args": []
}
}
}~/.claude/start-serena.sh:
bash
#!/bin/bash # Serena MCP Server Launcher for Claude Code (stdio mode) exec /snap/bin/uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context ide-assistant --project "/mnt/d/Documents/Game Design Documents/Lianji" ``` (File has Unix line endings, chmod +x applied) **What I've tried:** 1. **Initial attempt:** Used Windows `uvx.exe` path (`/mnt/c/Users/.../uvx.exe`) with Windows-style paths - server couldn't find project due to path format mismatch between WSL and Windows 2. **WSL-native uvx:** Installed via `sudo snap install astral-uv --classic`, updated config to use `/snap/bin/uvx` with WSL paths - server starts successfully when run manually but Claude Code never connects 3. **Fixed line endings:** Initial wrapper script had CRLF line endings causing "required file not found" error - fixed with `sed -i 's/\r$//'` 4. **HTTP transport attempt:** Added `--transport streamable-http --port 9121` - same result (connection starts, never completes) 5. **Verified Ref MCP server works:** The built-in Ref server connects successfully via HTTP, confirming Claude Code's MCP system is functional **Current behavior:** From `~/.claude/debug/latest`: ``` [DEBUG] MCP server "serena": Starting connection with timeout of 30000ms [DEBUG] Writing to temp file: /home/althrretha/.claude.json.tmp.XXXX.XXXXXXXXX
Then... nothing. No completion message, no error, just timeout after 30 seconds.
Manual execution works perfectly:
bash
$ /home/althrretha/.claude/start-serena.sh INFO 2025-10-16 21:08:12,684 [MainThread] serena.agent:__init__:203 - Number of exposed tools: 19 INFO 2025-10-16 21:08:12,927 [MainThread] serena.cli:start_mcp_server:172 - Initializing Serena MCP server INFO [MainThread] serena.agent:setup_mcp_server:563 - MCP server lifetime setup complete
Serena logs confirm full initialization with language server running (C# LSP has expected MSBuild warnings in WSL but core tools are available).
Testing observations:
When Serena runs manually,
ps auxshows two processes: the uv tool wrapper and the Python serena processServer listens on stdio by default (no HTTP port opened unless explicitly configured)
Claude Desktop (non-WSL Windows app) connects to Serena successfully with same project path using Windows-style paths
Closing Claude Desktop before starting Claude Code session doesn't resolve the issue
Hypothesis: The stdio pipe communication between Claude Code (Node.js-based, running in WSL) and the spawned Serena process (Python via uvx) is failing to complete the MCP initialization handshake. The process launches but something in the inter-process communication breaks down, possibly related to:
WSL's stdin/stdout handling with snap-confined applications
File descriptor inheritance issues
Buffering problems in the pipe communication
Questions:
Has anyone successfully run stdio-based MCP servers with Claude Code in WSL2?
Is there a known workaround for snap-installed tools communicating via stdio with Node.js processes in WSL?
Should I try installing uvx via a different method (pip install?) to avoid snap confinement?
Are there any Claude Code debug flags that would give more visibility into why the MCP connection times out?
The fact that Claude Code successfully connects to the HTTP-based Ref server but fails with stdio-based Serena suggests the issue is specifically with stdio transport in my WSL environment.
Any insights appreciated!
I wanted to share my recent experience with two different AI-assisted development setups for a massive Laravel 12 project and get your thoughts. The project involves a migration of the old Laravel 8 to a new, fresh version of Laravel 12 by preserving dual Architecture with Modern Upgrades.
The old app has a package that contains extensive business logic (18+ models, 11+ controllers, complex validation rules)
Migration Strategy:
- Fresh Laravel 12 installation - Filament 3.3 installation - Basic package structure setup - Replace appzcoder/laravel-admin with Filament resources - UserResource, RoleResource, PermissionResource creation - RolePermissionSeeder with language permissions - Test user creation and authentication setup - Update composer.json for Laravel 12 compatibility - Replace deprecated packages with new ones - Update model factories and middleware registration - Fix Laravel 12 compatibility issues - Create a compatibility layer between Filament Shield and existing permissions - Update ApplicationPermission, AdminPermission, CheckRole middleware - Integrate URL-based permission system with Filament - Backup existing database - Run Laravel 12 migrations on fresh database - Create data migration commands for preserving existing data - Migrate users, roles, workers, workplaces, and all HR data - Create Filament pages linking to custom routes used by a custom-written Laravel extension - Update custom Package for Laravel 12 - Update navigation to show both systems - Comprehensive testing of all functionality - Performance optimization and bug fixes
The Contenders:
Claude Desktop app + Serena MCP
Codex + Serena MCP
I was initially using the Claude Desktop app with the Serena MCP, and for a while, it was a solid combination. However, recently I've hit some major productivity roadblocks. Claude started to "overthink" tasks, introducing features I never asked for and generating unnecessary markdown files outlining the tasks I had already explained. It felt like I was spending more time cleaning up after it than it was saving me.
The Game Changer: Codex + Serena MCP
On a whim, I switched to using Codex with the same Serena MCP setup, and the difference has been night and day. Here’s what stood out:
Codex gets it done in one shot. I've been consistently impressed with how Codex handles tasks. I provide my instructions, and it delivers the code exactly as requested, in a single pass. There's no back and forth, no need to correct extraneous additions. It's direct, efficient, and respects the scope of the task.
No unnecessary overhead. With Codex, I haven't had to deal with any of the "creative additions" I was experiencing with Claude. It doesn't add extra logic, features, or documentation that wasn't explicitly requested. This has been a massive time-saver and has made the development process much smoother.
In my experience, for a large, complex project like this, the straightforward, no-nonsense approach of Codex has been far more effective. It feels like a tool that's designed to be a precise instrument for developers, rather than a creative partner that sometimes goes off-script.
Has anyone else had similar experiences when comparing these (or other) AI models on large-scale projects? I'm curious to know if my experience is unique or if others have found certain models to be better suited for specific types of development workflows.
TL;DR: For my complex Laravel project, Codex + Serena MCP has been significantly more efficient and direct than Claude + Serena MCP. Codex completes tasks in one go without adding unrequested features, which has been a major boost to my productivity.
I'm constantly hitting context limits faster with serena than without it
And honestly, I can't even tell if its actually helping/is beneficial at all
Anyone have any thoughts/experiences they'd like the share to help me understand if it's ACTUALLY helpful or not?
Thansk
Many mention the MCPs they use, but not how they use them.
In light of that, I thought I'd show how I use mine and in what scenarios.
Here's my main MCPs:
Serena MCP
Playwright
Sequential Thinking by Anthropic
Context7
Serena
I like using Serena MCP for large projects for two reasons: it uses language servers for popular languages so finding references to symbols in a large project is very effective. Language servers are the same things that your IDE uses to show type information about symbols and references to those.
Similarly to running CC's /init there’s an onboarding process in Serena that gathers technical information about your project and its purpose which helps give context about your project. Apparently Serena pulls this in automatically on every chat, but I tend to prompt CC with "read Serena's initial instructions" at the beginning of every chat or after running /clear. I guess you could say that falls under “context engineering”. I like to think of it as “focused context = focused output”.
I prompt it to use the find_referencing_symbols tool referencing a specific file. This helps when you’re doing refactors, needle in haystack search or need to do surgical insertion of behavior. One really useful way I used it in a large legacy project for a client was “look for all references to symbol_name where [some fuzzy condition]. Start at this file for reference \@filename (the \ is a Reddit quirk DON'T INCLUDE) and prefer using the find_referencing_symbols tool over search_for_pattern”. It did a great job. Something that would’ve taken much more cognitive load to process and time.
There’s several other Serena tools that seem interesting to me, but I haven’t incorporated it into my workflow yet. In particular, the think tools.
Context7
A lot of people talk about using Context7, but this is how I specifically use it. I like to use it to get the latest documentation on a package, but mostly for things that aren’t complex. Since it relies on embeddings and re-ranking sometimes more nuanced context can be missed. For more complex things I might reference actual webpages or even download markdown files to do agentic RAG locally with CC.
Playwright
I use Playwright when I’m working on web apps. Since it can take screenshots and sees the DOM it can give more multimodal context to CC. Useful for tricky frontend work. I’ve even used it to do some marketing stuff like scraping my bookmarks on X and finding information I want.
Sequential Thinking
Last one I use is sequential thinking by Anthropic. It helps for task adherence for tasks that have multiple, complex steps. Anytime that I have a very complex multi-step task I'll finish off the prompt with "use sequential thinking". It works by decomposing multi tasks into discrete tasks and then ensuring each one was done.
------
UPDATE: This post blew up and I'm really appreciative of all of you. Thanks for the upvotes and taking the time to read. I try to provide as much value as I can.
Reached #2 post today that's crazy!
Trying very hard to grow my very small YouTube channel. If you'd like to support me, please subscribe here https://www.youtube.com/@jorgecolonconsulting.
My next video is on how I'm using subagents and some tips there.
UPDATE 2: Just released a new Tutoring for Vibe Coders service for those that value their time and want to understand how to cut through the rough parts of it. Already booked my first customer!
If that sounds interesting to you book a call with me.
I did some search in here and I now understand what Serena and Context7 do. I have also added these MCPs into my Claude Code.
However, I can’t seem to find how I can use these MCPs effectively. Since I have added thses MCPs, will Claude be aware of them automatically and use them as and when needed? or do I need to instruct in CLAUDE.MD for Claude to use them?
After extensive testing, I’ve found that Claude Code (CC) significantly outperforms other AI coding tools, including Windsurf, Cursor, Replit and Serena, despite some claims that Serena is on par with CC.
I recently tested Serena—an MCP platform marketed as being on par with Claude Code while costing 10x less—but the results were disappointing. With each prompt, Serena introduced numerous errors, requiring 1–2 hours of manual debugging just to get an 80% complete result. In contrast, Claude Code delivered 100% accurate output across three significant UI components in just 6 minutes, with only 60 seconds of prompting and no further intervention.
Yes, CC is more expensive in terms of API usage—one task alone cost me $3.92—but the results were flawless. Not a single syntax, logic, or design issue. The time saved and the hands-off experience more than justified the cost in my case.
Some users have argued that Claude Code doesn’t do anything particularly special. I disagree. After testing various tools like Serena and Windsurf, it’s clear that CC consistently delivers superior quality and reliability.
Given Serena's use of Claude Desktop (avoiding per-token API costs), my aim is to explore how we might replicate Claude Code’s capabilities within a Serena-style (MCP) model. As a community, can we analyze what makes Claude Code so effective and find a way to build something comparable—without the API expense?
My goal with this post is to work together as a community to methodically uncover what makes Claude Code so remarkably effective—so we can replicate its performance within Claude Desktop at a fraction of the cost.
Analyzing Anon Kode, an open-source replica of Claude Code, might be a good place to start.
Hi all,
I've been using the serena MCP with claude code inside VSCode, but it breaks the IDE integration workflow that allows me to see a diff view of the code changes. Does anyone have a "compromise" setup that gets most of the benefits of Serena without losing the diff view? Would it work to just remove the editing tools like regex replace, or at that point does Serena become a waste? Thanks!
How would you feel about writing code without proper IDE tooling? Well, Claude Code and any other agent feels the same way! Fortunately, it doesn't have to stay like this. And all you have to do is to just run one shell command
claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena-mcp-server --context ide-assistant --project $(pwd)
Include the open source, MIT licensed serena MCP into your project's toolbox and step into the light!
I use it myself all the time in claude code now and the performance boost is just staggering. If you like it as much as I do, show some support by starring the repo and spreading the word ;)
Before adding serena MCP , it was showing the diff perfectly. But now it shows the diff like this.
Any solution for this?
Are there any cool "MCPs" or a specific workflow you use to make it even better?
Just got Serena MCP up and running and looking to optimize my setup. For those already using it in production or for personal projects: What's your typical workflow? Do you use it mainly for monitoring specific endpoints, tracking API performance, or something else? How do you handle notifications? What alert thresholds have you found most useful without being too noisy? Any integration tips? Especially interested if anyone's integrated it with Claude Code or other development tools. Performance considerations? Any gotchas with resource usage or configuration that caught you off guard? Drop your tips, configs, or lessons learned. Thanks!
Anybody working with Claude past the first WOW moment will know (and probably complain) that it overcomplicates, overengineers, creates stuff nobody asked for, duplicates things, and hallucinates field names.
You quickly end up with multiple outdated docs, duplicated stuff in different places, and as a result, Claude spends half its time trying to understand the codebase and the other half probably making things worse.
Apart from a good CLAUDE .md some cleverly crafted commands, and regular reviews, I believe using MCPs as a single source of truth can really help minimize, if not partly solve the problem.
So, what are some MCPs (Model Context Protocol) you've integrated to Claude, that are lifesavers for you ?
Like for example 7context : lets it fetch updated docs for almost any lib it works with.
I just built myself sequelae-mcp (for the brave and bold only), which lets you get DB schemas, do backups, and run SQL. No more copy-paste SQL or wasting time/tokens on Claude trying to invent failing SQL systems.
And right now I’m co-building api-tools-mcp, for building/retrieving API schemas via OpenAPI—so when working with APIs, it can check instead of guess-inventing.
Honestly, not sure those tools don't already exist, but i'll definitely be adding them to my workflow, hoping for a good boost in time spent and reliability.
Already did some in-app MCP for running SQL, and it's been a really a big positive change in my workflow.
So I setup serena with the help of claude code and currently its running on my code, i am trying to figure out exactly how powerful it is and whats so good about it? Why would my project benefit? Lastly what other mcp servers can I use, I was trying to get gemini in my code base as well to talk to claude code and both be able to give insight on the code but I could not get that server up and running. Lastly I also have playwright which still looking into to see how it will benefit my other projects. One more thing I did add was context7 because i hear its good for postgres, nextjs which is exactly what i have in one of my other projects.... My current project is java based I am just trying to see how can i get the most bank for my $200 bucks