If the code base is bad with lots of large files you might need to do some prep work and split them up first before unleashing Claude. Our actual code isn’t too bad, but test classes are frequently over 1000 lines and Claude does struggle with them. I’m slowing splitting them down into 300-500 line chunks and it is getting better. I guess it depends on have far you can reasonably split up your code; could partial classes be an option to split files without massive refactoring? Answer from New_Goat_1342 on reddit.com
🌐
Reddit
reddit.com › r/claudeai › try out serena mcp. thank me later.
r/ClaudeAI on Reddit: Try out Serena MCP. Thank me later.
June 20, 2025 -

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

🌐
Reddit
reddit.com › r/claudeai › am i the only who is not finding any value in serena mcp or mcps in general? (using claude code)
r/ClaudeAI on Reddit: Am I the only who is not finding any value in Serena MCP or MCPs in general? (using Claude Code)
July 4, 2025 -

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?

Top answer
1 of 5
17
Don't use MCP servers unless they fulfil something that Claude Code cannot do on it's own. I use Notion, Playwright, and Context7. Notion because I also use Claude Code on my Android phone and I use the Notion MCP to save stuff and restore it on other devices. Playwright because when you're creating a website Claude Code can use playwright to interact and screenshot the website, which helps Claude Code develop the website. Context7 because it helps Claude Code retrieve the latest documentation on stuff like API's. Why are you using Serena MCP? I don't see a good reason for me to use it with Claude Code.
2 of 5
10
Hi, Serena dev here. It's a young project, and we are working on smoothing the edges, improving the performance and the documentation. We are not even at the first release yet :) I'd like to invite everyone who had problems to report them on GitHub as issue, we are very responsive there. Also, not yet written in the documentation: you will not notice much benefits from Serena on small projects, or on tasks that are restricted to edits within one (not too large) file, or if your task mainly involves writing entire new files instead of editing existing ones. You will, however, notice significantly more intelligent and token efficient behavior when working on medium-size to large projects, especially for tasks that involve understanding or editing multiple files in the code. Serena fundamentally gives the agent better tools for context engineering, but if the context engineering on your project/task is very simple, you will not have gains, and instead Serena might get in the way.
🌐
Reddit
reddit.com › r/claudeai › claude and serena mcp - a dream team for coding
r/ClaudeAI on Reddit: Claude and Serena MCP - a dream team for coding
June 5, 2025 -

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.

🌐
Reddit
reddit.com › r/claudecode › serena mcp - working with large codebases & monoliths - actually working ?
r/ClaudeCode on Reddit: Serena MCP - working with large codebases & monoliths - actually working ?
June 20, 2025 -

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 !

🌐
Reddit
reddit.com › r/modelcontextprotocol › try out serena mcp. thank me later.
r/modelcontextprotocol on Reddit: Try out Serena MCP. Thank me later.
April 29, 2025 - 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.
🌐
Reddit
reddit.com › r/claudeai › mcp servers are scary unsafe. always check who's behind them!
r/ClaudeAI on Reddit: MCP servers are scary unsafe. Always check who's behind them!
July 28, 2025 -

Background: I'm one of the devs of Serena MCP, and I recently got scared at realizing how easy it would be to deploy an attack.

Serena is backed by our company, a proper legal entity, so our users are safe. But I doubt that many have realized that fact, or frankly, that many cared.

By now we have thousands of users, the majority uses uvx, which automatically pulls everything from the main branch. Their MCP client automatically starts the server in their repo, many use Serena on private code.

If I wanted to hack them, I could push something on main that will send me their entire codebase (including any secrets). Hell, for those not using docker (likely the majority), it could send me anything from their computer! I could then force-push over that commit and pretend like nothing ever happened. It's honestly insane

Stay safe out there, and my recommendation is to only run MCP Servers from someone whom you could actually sue... Especially when using auto-updates, which seems to be the default nowadays.

Top answer
1 of 5
60
low key advertising
2 of 5
21
Ideally you should be running your own MCP servers using source code you control. Not sure what everyone is doing connecting to online services when most MCP use cases seem to work best on your own local compute or something hosted on a private network. (EDIT: ^ I was too harsh on public MCP servers, in some scenarios they make sense and can be secured) In the case where you absolutely must run a publicly built MCP then pin it to a version you feel is safe (have AI agents review it - be very cautious about weird dependencies) and consider tracking hashes of those packages or mirroring the package somewhere for your various install processes (e.g. Dockerfile) so it uses the vetted package that can't be swapped out by a third party. In theory you could also limit internet access to the agent running that MCP tool by setting up a local LLM or a intranet proxy to a public one on the internet - so your agent can still work in this extremely limited internet access state. You could also limit that public MCP tool to 1 specific subagent so no other MCP tools can be called with it in unison. But that's a lot of friction and setup, so consider the following approach instead: Opt to make your own MCPs wherever possible ( template repo and mcps ) so you don't have to do anything beyond running things in a VM and taking regular git backups . And for protecting secrets from accidentally being leaked by your agent, such as the agent accidentally trying to commit .env or log its values somewhere public: use agent PreToolUse hooks to mask or prevent commands that use secrets in unauthorized ways. It won't stop every possible leak of secrets, but it will greatly reduce them. The best protection is going to be limiting what secrets the agent can see and making those secrets rotate frequently.
🌐
Reddit
reddit.com › r/claudeai › serena mcp users - share your setup and best practices?
r/ClaudeAI on Reddit: Serena MCP users - share your setup and best practices?
November 15, 2025 -

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!

Find elsewhere
🌐
Reddit
reddit.com › r/chatgptcoding › serena mcp goes codex
r/ChatGPTCoding on Reddit: Serena MCP goes Codex
August 11, 2025 - It still lags behind Claude Code in usability IMO, but hopefully it will become better soon, and maybe Serena can help bridge the gap a bit. Standard MCPs may not work in Codex, since it's not fully MCP compliant, and some massaging of the tool schema needs to be done.
🌐
Reddit
reddit.com › r/claudeai › automating serena mcp with claude code?
r/ClaudeAI on Reddit: Automating Serena MCP with Claude Code?
July 31, 2025 -

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?

🌐
Reddit
reddit.com › r/claudecode › a developer's tale: codex + serena mcp vs. claude + serena mcp on a huge laravel project
r/ClaudeCode on Reddit: A Developer's Tale: Codex + Serena MCP vs. Claude + Serena MCP on a Huge Laravel Project
October 7, 2025 -

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:

  1. Claude Desktop app + Serena MCP

  2. 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.

🌐
Reddit
reddit.com › r/claudeai › mcps that are part of my day-to-day claude code workflow
r/ClaudeAI on Reddit: MCPs that are part of my day-to-day Claude Code workflow
July 16, 2025 -

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.

🌐
Reddit
reddit.com › r/mcp › mcp servers are scary unsafe. always check who's behind them!
r/mcp on Reddit: MCP servers are scary unsafe. Always check who's behind them!
July 28, 2025 -

Background: I'm one of the devs of Serena MCP, and I recently got scared at realizing how easy it would be to deploy an attack.

Serena is backed by our company, a proper legal entity, so our users are safe. But I doubt that many have realized that fact, or frankly, that many cared.

By now we have thousands of users, the majority uses uvx, which automatically pulls everything from the main branch. They start the server in their repo, many use Serena on private code.

If I wanted to hack them, I could push something on main that will send me their entire codebase (including any secrets). Hell, for those not using docker (likely the majority), it could send me anything from their computer! I could then force-push over that commit and pretend like nothing ever happened. It's honestly insane.

The same is largely true when installing any python package (arbitrary code execution). But I feel like there people follow better standards for due diligence, and folks usually pin their versions. But for MCP, the prevailing attitude seems to be "anything goes". In parts that may be due to the many non-programmers or juniors using this technology.

Stay safe out there, and my recommendation is to only run MCP Servers from someone whom you could actually sue... Especially when using auto-updates, which seems to be the default nowadays.

🌐
Reddit
reddit.com › r/claudecode › serena mcp diffs in interactive mode
r/ClaudeCode on Reddit: Serena MCP diffs in interactive mode
July 30, 2025 -

I’ve been trying out Serena and quite like the improved token efficiency but one thing lowkey bothers me - when running CC without auto-accept it renders generally ok, readable diffs when it touches files. With Serena, however I only can see a tool call and can’t interactively review and effectively “micromanage” CC the same way. Is there something I could configure to get readable diffs with CC and Serena? How do you solve this and use Serena generally?

🌐
Reddit
reddit.com › r/claudeai › mcp - get someone else’s or build my own? i want codebase understanding
r/ClaudeAI on Reddit: MCP - get someone else’s or build my own? I want codebase understanding
August 2, 2025 -

I’m using Claude code to build a web app that has a front end and backend in node js and typescript. My current codebase is growing and growing.

I have an architecture document that I have the AI keep up to date via a rule I set and that document generally helps it navigate the codebase.

But it’s just pointers to high level information. Not an index of all the types and things I’ve build with it.

Is there a good MCP that will help with this problem? Or others yall recommend?

Are people just making their own with vibe coding or are they using “off the shelf” MCPs. I realize they can be a little risky and I’m not skilled enough to be able to read them and know if they can be trusted.

I guess my question is - should I just make my own MCPs or get one and if so what do yall recommend for my specific issue and maybe other use cases I haven’t thought of?

I truly just don’t “get” MCPs too well.

Edit to add: Serena sounds like exactly what I am looking for has anyone tried it and have feedback ?

🌐
Reddit
reddit.com › r/claudeai › fully featured ai coding agent as mcp server
r/ClaudeAI on Reddit: Fully Featured AI Coding Agent as MCP Server
April 2, 2025 -

We've been working like hell on this one: a fully capable Agent, as good or better than Windsurf's Cascade or Cursor's agent - but can be used for free.

It can run as an MCP server, so you can use it for free with Claude Desktop, and it can still fully understand a code base, even a very large one. We did this by using a language server instead of RAG to analyze code.

Can also run it on Gemini, but you'll need an API key for that. With a new google cloud account you'll get 300$ as a gift that you can use on API credits.

Check it out, super easy to run, GPL license:

https://github.com/oraios/serena

🌐
Reddit
reddit.com › r/claudeai › watch out when you are using serena mcp with worktrees!
r/ClaudeAI on Reddit: Watch out when you are using Serena MCP with worktrees!
August 30, 2025 -

I had 5 instances going on - one on main repo, and 4 worktrees. I kicked off a series of coding for each worktree, feeling good that it's chugging along, cuz, you know, I want to be a 4x engineer too! And when one of them was done, I checked the files and... nothing was changed....

At first I thought it was Claude trolling me (cuz, you know, sometimes it tells you it did the work and it really didn't), and then I checked all other active worktrees to find out that NONE OF THEM had changed files. And then I had this gut feeling it must be Serena.

And voila! All the file changes were happening in the first main repo (where I was initially working on). So whenever Claude was working through Serena to change files and whatnot, Serena was making changes in the first instance (the main repo)...

Not sure if it's due to how I set up things or if Serena just doesn't support concurrent development with multiple worktrees, but yeah a word of caution when you are using Serena.

🌐
Reddit
reddit.com › r/claudeai › claude code + serena mcp inside the ide - your working system?
r/ClaudeAI on Reddit: Claude Code + Serena MCP inside the IDE - your working system?
June 18, 2025 -

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!

🌐
Reddit
reddit.com › r/claudeai › [help] cannot get serena mcp server working with claude code in wsl2 - server starts but tools never become available
r/ClaudeAI on Reddit: [Help] Cannot get Serena MCP server working with Claude Code in WSL2 - Server starts but tools never become available
October 17, 2025 -

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 uvx from snap: astral-uv 0.8.17

  • Project: 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 aux shows two processes: the uv tool wrapper and the Python serena process

  • Server 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:

  1. Has anyone successfully run stdio-based MCP servers with Claude Code in WSL2?

  2. Is there a known workaround for snap-installed tools communicating via stdio with Node.js processes in WSL?

  3. Should I try installing uvx via a different method (pip install?) to avoid snap confinement?

  4. 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!

Top answer
1 of 2
1
When your server starts but the tools don’t show up in WSL2, it usually comes down to networking or permission hiccups. First, double-check that the MCP server’s ports are properly forwarded and that WSL2 can actually reach them. Also, make sure your firewall or antivirus isn’t getting in the way by blocking connections. Sometimes, just restarting your WSL2 instance and making sure the environment variables for the server path are set right can do the trick. And don’t forget to peek at the server logs during tool startup,they often give clues about missing dependencies or config issues. Hope that helps you get things running smoothly!
2 of 2
1
Networking is unreliable in WSL 2 So the first thing you should do is clone Serena, and get it running locally. cd /mnt/c/projects/ && git clone https://github.com/oraios/serena.git (ask claude code to get it running locally) Then add the MCP server from your claude starting directory (in my case - I start claude from /mnt/c/projects) cd /mnt/c/projects/ && claude mcp add serena -- uv run --directory /mnt/c/projects/serena serena start-mcp-server (Always add the MCP server at whatever level you start claude from - not the main project folder) On WSL2 the Claude Code MCPs are installed at ~/.claude.json Your claude.json should resemble this: { "mcpServers": { "serena": { "type": "stdio", "command": "uv", "args": [ "run", "--directory", "/mnt/c/projects/serena", "serena", "start-mcp-server" ], "env": {} } } Then test it: cd /mnt/c/projects/ && claude mcp list Start Claude Code in the root, and navigate to your project: cd /mnt/c/projects/ && claude ▗ ▗   ▖ ▖  **Claude Code** v2.0.14 Sonnet 4.5 · Claude Max ▘▘ ▝▝    `/mnt/c/projects/` > Read the project at `/mnt/c/Documents/Game Design Documents/Lianji` and use Serena MCP and activate_project