Replies: 2 comments 4 replies
-
|
I've added two new components to my custom build: a separate daemon that handles multiple projects and a PROXY stdio mcp server that connects to the daemon. Usage: I spin up the daemon in advanced (from within a dedicated terminal tab or LaunchAgent) and add the PROXY to Claude Code's user-level mcp server settings. Each session, when it starts, creates a PROXY process that knows which project it's dealing with based on the working directory. I no longer have to worry about which project is currently active. Asking @opcode81 for PR eligibility. Does this design sound ok to you? |
Beta Was this translation helpful? Give feedback.
-
|
I ran into the same class of problem: stdio gives each agent/session its own Serena process, while one shared HTTP Serena instance is only a clean fit when all clients work on the same active project. I am working on 1MCP, and this is one reason we added template servers. Instead of hardcoding Serena once per client or copying MCP JSON per repo, you define Serena once as a template: {
"mcpTemplates": {
"serena": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/oraios/serena",
"serena",
"start-mcp-server",
"--project",
"{{project.path}}",
"--context",
"claude-code"
],
"tags": ["serena", "semantic", "project"]
}
}
}When a client/session connects, 1MCP renders that template from the current project context. Same project plus same rendered config can reuse the same Serena instance; different projects or worktrees get isolated Serena instances. This is not a replacement for Serena's own project model. Serena still provides the semantic code tools. 1MCP handles the runtime layer around it: project-aware config, routing, lifecycle, client-specific context, tags, presets, and tool discovery. Docs:
Disclosure: I am involved with 1MCP. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I typically manage multiple Claude Code sessions across multiple work trees of multiple Git repos. I added the Serena MCP client to the user-level Claude Code config and ended up facing the limitation that one Serena MCP server can have at most one "active project" at a time.
What is the recommended Serena setup for my use case? Is it the only way to run one Serena MCP server process per working tree, or is there an alternative approach?
Beta Was this translation helpful? Give feedback.
All reactions