Skip to content

Commit 5eb5930

Browse files
committed
Improve README structure
Remove obsolete section on Goose
1 parent 09d008f commit 5eb5930

1 file changed

Lines changed: 135 additions & 128 deletions

File tree

README.md

Lines changed: 135 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,17 @@ implementation.
9797
- [What Can I Use Serena For?](#what-can-i-use-serena-for)
9898
- [Free Coding Agents with Serena](#free-coding-agents-with-serena)
9999
- [Quick Start](#quick-start)
100-
* [Claude Code](#claude-code)
101-
* [General Setup](#general-setup)
102-
* [Configuration](#configuration)
103-
* [Project Activation](#project-activation)
104-
* [MCP Server (Claude Desktop)](#mcp-server-claude-desktop)
100+
* [Running the Serena MCP Server](#running-the-serena-mcp-server)
105101
+ [Local Installation](#local-installation)
106-
+ [Docker Installation (Experimental)](#docker-installation-experimental)
102+
+ [Using uvx](#using-uvx)
103+
+ [Using Docker (Experimental)](#using-docker-experimental)
104+
+ [Command-Line Arguments](#command-line-arguments)
105+
* [Configuration](#configuration)
106+
* [Project Activation & Indexing](#project-activation--indexing)
107+
* [Claude Code](#claude-code)
108+
* [Claude Desktop](#claude-desktop)
107109
+ [Troubleshooting](#troubleshooting)
108110
* [Other MCP Clients (Cline, Roo-Code, Cursor, Windsurf, etc.)](#other-mcp-clients-cline-roo-code-cursor-windsurf-etc)
109-
* [Goose](#goose)
110111
* [Agno Agent](#agno-agent)
111112
* [Other Agent Frameworks](#other-agent-frameworks)
112113
- [Detailed Usage and Recommendations](#detailed-usage-and-recommendations)
@@ -170,68 +171,89 @@ We thus built Serena with the prospect of being able to cancel most other subscr
170171

171172
Serena can be used in various ways, below you will find instructions for selected integrations.
172173

173-
- If you just want to turn Claude into a free-to-use coding agent, we recommend using Serena through Claude Desktop.
174-
- If you want to use Gemini or any other model and you want a GUI experience, you should use [Agno](#agno-agent). On macOS you can also use the GUI of [goose](#goose).
175-
- If you prefer using Serena through a CLI, you can use [goose](#goose). There again almost any model is possible.
174+
- If you just want to turn Claude into a free-to-use coding agent, we recommend using Serena through [Claude Code](#claude-code) or [Claude Desktop](#claude-desktop).
175+
- If you want to use Gemini or any other model, and you want a GUI experience, you can use [Agno](#agno-agent). On macOS, you can also use the GUI of [goose](#goose).
176176
- If you want to use Serena integrated in your IDE, see the section on [other MCP clients](#other-mcp-clients---cline-roo-code-cursor-windsurf-etc).
177177

178178
Serena is managed by `uv`, so you will need to [install it](https://docs.astral.sh/uv/getting-started/installation/)).
179179

180-
### Claude Code
181-
182-
Serena is a great way to make Claude Code both cheaper and more powerful! We are collecting
183-
several examples for that and have heard very positive feedback so far. Claude Code users can
184-
add serena with (from the project dir)
185-
186-
```shell
187-
claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena-mcp-server --context ide-assistant --project $(pwd)
188-
```
189-
190-
You should ask claude to read the initial instructions as the first prompt, where it will receive information
191-
on how to use Serena's tools.
192-
We also recommend that you index your code once before starting (especially for larger projects), it will accelerate the symbolic operations.
180+
### Running the Serena MCP Server
193181

194-
```shell
195-
# from the project directory, or pass the path to the project as argument
196-
uvx --from git+https://github.com/oraios/serena index-project
197-
```
182+
You have several options for running the MCP server, which are explained in the subsections below.
198183

184+
The typical usage involves the client (Claude Code, Claude Desktop, etc.) running
185+
the MCP server as a subprocess (using stdio communication),
186+
so the client needs to be provided with the command to run the MCP server.
187+
(Alternatively, you can run the MCP server in SSE mode and tell your client
188+
how to connect to it.)
199189

200-
### General Setup
190+
Note that no matter how you run the MCP server, Serena will, by default, start a small web-based dashboard on localhost that will display logs and allow shutting down the
191+
MCP server (since many clients fail to clean up processes correctly).
192+
This and other settings can be adjusted in the [configuration](#configuration) and/or by providing [command-line arguments](#command-line-arguments).
201193

202-
You can either
194+
#### Local Installation
203195

204-
1. Clone the repository and cd into it.
196+
1. Clone the repository and change into it.
197+
```shell
198+
git clone https://github.com/oraios/serena
199+
cd serena
200+
```
205201
2. Optionally create a config file from the template and adjust it according to your preferences.
206202
```shell
207203
cp src/serena/resources/serena_config.template.yml serena_config.yml
208204
```
209205
If you just want the default config, you can skip this part, and a config file will be created when you first run Serena.
206+
3. Run the server with `uv`:
207+
```shell
208+
uv run serena-mcp-server
209+
```
210+
When running from outside the serena installation directory, be sure to pass it, i.e. use
211+
```shell
212+
uv run --directory /abs/path/to/serena serena-mcp-server
213+
```
210214

211-
or use `uvx` to run Serena directly by relying on
215+
#### Using uvx
212216

213-
```shell
214-
uvx --from git+https://github.com/oraios/serena serena-mcp-server.exe
215-
```
217+
`uvx` can be used to run the latest version of Serena directly from the repository, without an explicit local installation.
218+
219+
* Windows:
220+
```shell
221+
uvx --from git+https://github.com/oraios/serena serena-mcp-server.exe
222+
```
223+
* Other operating systems:
224+
```shell
225+
uvx --from git+https://github.com/oraios/serena serena-mcp-server
226+
```
216227

217-
in your MCP config (delete the `.exe` on macOS or Linux).
228+
#### Using Docker (Experimental)
218229

219-
You can now add Serena to your MCP client as described below for various clients and
220-
[activate your first project](#project-activation). For larger projects, we recommend that you first index them
221-
to accelerate Serena's tools on the first usage.
230+
⚠️ Docker support is currently experimental with several limitations. Please read the [Docker documentation](DOCKER.md) for important caveats before using it.
231+
232+
You can run the Serena MCP server directly via docker as follows,
233+
assuming that the projects you want to work on are all located in `/path/to/your/projects`:
222234

223235
```shell
224-
uvx --from git+https://github.com/oraios/serena index-project /path/to/project
236+
docker run --rm -i --network host -v /path/to/your/projects:/workspaces/projects ghcr.io/oraios/serena:latest serena-mcp-server --transport stdio
225237
```
226238

239+
Replace `/path/to/your/projects` with the absolute path to your projects directory. The Docker approach provides:
240+
- Better security isolation for shell command execution
241+
- No need to install language servers and dependencies locally
242+
- Consistent environment across different systems
243+
244+
See the [Docker documentation](DOCKER.md) for detailed setup instructions, configuration options, and known limitations.
245+
246+
#### Command-Line Arguments
247+
248+
The Serena MCP server supports a wide range of command-line options, including the option to run in SSE mode
249+
and to adapt Serena to various [contexts and modes of operation](#modes-and-contexts).
250+
251+
Run with parameter `--help` to get a list of available options.
227252

228-
> In the default configuration, Serena will start a small dashboard on localhost that will display logs and allow shutting down the
229-
> MCP server (since many clients fail to cleanup processes, leaving zombies behind). If you don't want that, simply set `web_dashboard` to `False`
230-
> in your `serena_config.yml` or pass
231253

232254
### Configuration
233255

234-
Serena's behavior (like available projects, active tools and prompts) is configured in four places:
256+
Serena's behavior (active tools and prompts as well as logging configuration, etc.) is configured in four places:
235257
236258
1. The `serena_config.yml` for general settings that apply to all clients and projects
237259
2. In the arguments passed to the `serena-mcp-server` in your client's config (see below),
@@ -254,10 +276,13 @@ want to use Serena.
254276

255277
You can just ask the LLM to show you the config of your session, Serena has a tool for it.
256278

257-
### Project Activation
279+
### Project Activation & Indexing
258280

259281
The recommended way is to just ask the LLM to activate a project by providing it an absolute path to, or,
260-
in case the project was activated in the past, by it's name. The default project name is the directory name.
282+
in case the project was activated in the past, by its name. The default project name is the directory name.
283+
284+
* "Activate the project /path/to/my_project"
285+
* "Activate the project my_project"
261286

262287
All projects that have been activated will be automatically added to your `serena_config.yml`, and for each
263288
project, the file `.serena/project.yml` will be generated. You can adjust the latter, e.g., by changing the name
@@ -267,72 +292,86 @@ same name.
267292
If you are mostly working with the same project, you can also configure to always activate a project at startup
268293
by passing `--project <path_or_name>` to the `serena-mcp-server` command in your client's MCP config.
269294
270-
### MCP Server (Claude Desktop)
271-
272-
Configure the MCP server in your client.
273-
For [Claude Desktop](https://claude.ai/download) (available for Windows and macOS), go to File / Settings / Developer / MCP Servers / Edit Config,
274-
which will let you open the JSON file `claude_desktop_config.json`. Add the following (with adjusted paths) to enable Serena:
295+
ℹ️ For larger projects, we recommend that you index your project to accelerate Serena's tools; otherwise the first
296+
tool application may be very slow.
297+
To do so, run one of these commands the project directory or pass the path to the project as an argument:
275298

276-
#### Local Installation
299+
* When using a local installation:
300+
```shell
301+
uv run --directory /abs/path/to/serena index-project
302+
```
303+
* When using uvx:
304+
```shell
305+
uvx --from git+https://github.com/oraios/serena index-project
306+
```
277307

278-
```json
279-
{
280-
"mcpServers": {
281-
"serena": {
282-
"command": "/abs/path/to/uv",
283-
"args": ["run", "--directory", "/abs/path/to/serena", "serena-mcp-server"]
284-
}
285-
}
286-
}
287-
```
308+
### Claude Code
288309

289-
#### Docker Installation (Experimental)
310+
Serena is a great way to make Claude Code both cheaper and more powerful!
290311

291-
⚠️ **EXPERIMENTAL**: Docker support is currently experimental with several limitations. Please read the [Docker documentation](DOCKER.md) for important caveats before using.
312+
From your project directory, add serena with a command like this,
292313

293-
Alternatively, you can run Serena using Docker:
314+
```shell
315+
claude mcp add serena -- <serena-mcp-server> --context ide-assistant --project $(pwd)
316+
```
294317

295-
```json
296-
{
297-
"mcpServers": {
298-
"serena": {
299-
"command": "docker",
300-
"args": ["run", "--rm", "-i", "--network", "host", "-v", "/path/to/your/projects:/workspaces/projects", "ghcr.io/oraios/serena:latest", "serena-mcp-server", "--transport", "stdio"]
301-
}
302-
}
303-
}
318+
where `<serena-mcp-server>` is your way of [running the Serena MCP server](#running-the-serena-mcp-server).
319+
For example, when using `uvx`, you would run
320+
```shell
321+
claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena-mcp-server --context ide-assistant --project $(pwd)
304322
```
305323

306-
Replace `/path/to/your/projects` with the absolute path to your projects directory. The Docker approach provides:
307-
- Better security isolation for shell command execution
308-
- No need to install language servers and dependencies locally
309-
- Consistent environment across different systems
324+
ℹ️ Once in Claude Code, you should ask Claude to "Read the initial instructions" as your first prompt, such that it will receive information
325+
on how to use Serena's tools.
310326
311-
See the [Docker documentation](DOCKER.md) for detailed setup instructions, configuration options, and known limitations.
327+
328+
### Claude Desktop
329+
330+
For [Claude Desktop](https://claude.ai/download) (available for Windows and macOS), go to File / Settings / Developer / MCP Servers / Edit Config,
331+
which will let you open the JSON file `claude_desktop_config.json`.
332+
Add the `serena` MCP server configuration, using a [run command](#running-the-serena-mcp-server) depending on your setup.
333+
334+
* local installation:
335+
```json
336+
{
337+
"mcpServers": {
338+
"serena": {
339+
"command": "/abs/path/to/uv",
340+
"args": ["run", "--directory", "/abs/path/to/serena", "serena-mcp-server"]
341+
}
342+
}
343+
}
344+
```
345+
* uvx:
346+
```json
347+
{
348+
"mcpServers": {
349+
"serena": {
350+
"command": "/abs/path/to/uvx",
351+
"args": ["--from", "git+https://github.com/oraios/serena", "serena-mcp-server"]
352+
}
353+
}
354+
}
355+
```
356+
* docker:
357+
```json
358+
{
359+
"mcpServers": {
360+
"serena": {
361+
"command": "docker",
362+
"args": ["run", "--rm", "-i", "--network", "host", "-v", "/path/to/your/projects:/workspaces/projects", "ghcr.io/oraios/serena:latest", "serena-mcp-server", "--transport", "stdio"]
363+
}
364+
}
365+
}
366+
```
312367
313368
If you are using paths containing backslashes for paths on Windows
314369
(note that you can also just use forward slashes), be sure to escape them correctly (`\\`).
315370
316-
That's it! Save the config and then restart Claude Desktop. You are ready for activating your first project
371+
That's it! Save the config and then restart Claude Desktop. You are ready for activating your first project.
317372

318-
ℹ️ You can further customize the run command, see
373+
ℹ️ You can further customize the run command using additional arguments (see [above](#command-line-arguments)).
319374

320-
```shell
321-
uv run serena-mcp-server --help
322-
```
323-
324-
ℹ️ You can use Serena without cloning or configuring it explicitly by using the Docker image above or:
325-
326-
```json
327-
{
328-
"mcpServers": {
329-
"serena": {
330-
"command": "uvx",
331-
"args": ["--from", "git+https://github.com/oraios/serena", "serena-mcp-server"]
332-
}
333-
}
334-
}
335-
```
336375

337376
#### Troubleshooting
338377

@@ -356,11 +395,6 @@ community version](https://github.com/aaddrick/claude-desktop-debian).
356395

357396
After restarting, you should see Serena's tools in your chat interface (notice the small hammer icon).
358397
359-
⚠️ Tool Names: Claude Desktop (and most MCP Clients) don't resolve the name of the server. So you shouldn't
360-
say something like "use Serena's tools". Instead, you can instruct the LLM to use symbolic tools or to
361-
use a particular tool by referring to its name. Moreover, in some clients, if you use multiple MCP Servers, you might get
362-
**tool name collisions** which lead to undefined behavior.
363-
364398
ℹ️ Note that MCP servers which use stdio as a protocol are somewhat unusual as far as client/server architectures go, as the server
365399
necessarily has to be started by the client in order for communication to take place via the server's standard input/output stream.
366400
In other words, you do not need to start the server yourself. The client application (e.g. Claude Desktop) takes care of this and
@@ -384,33 +418,6 @@ e.g., for one of the following reasons:
384418
2. You are on Linux and don't want to use the [community-created Claude Desktop](https://github.com/aaddrick/claude-desktop-debian)
385419
3. You want tighter integration of Serena into your IDE and don't mind paying for that
386420
387-
### Goose
388-
389-
[goose](https://github.com/block/goose) is a standalone coding agent which has an integration for MCP servers and offers a CLI (as well as a GUI on macOS).
390-
Using goose is currently the simplest way of running Serena through a CLI-based UI with an LLM of your choice.
391-
392-
Follow the instructions [here](https://block.github.io/goose/docs/getting-started/installation/) to install it.
393-
394-
After that, use `goose configure` to add an extension. For adding Serena, choose the option `Command-line Extension`, name it `Serena` and add the following as command:
395-
396-
```
397-
/abs/path/to/uv run --directory /abs/path/to/serena serena-mcp-server --project /optional/abs/path/to/project
398-
```
399-
400-
Since Serena can do all necessary editing and command operations, you should disable the `developer` extension that goose enables by default.
401-
For that execute
402-
403-
```shell
404-
goose configure
405-
```
406-
again, choose the option `Toggle Extensions`, and make sure Serena is enabled selected while `developer` is not.
407-
408-
That's it. Read through the configuration options of goose to see what you can do with it (which is a lot, like setting different levels of permissions for tool execution).
409-
410-
> Goose does not seem to always properly terminate python processes for MCP servers when a session ends.
411-
> You may want to disable the Serena GUI and/or to manually cleanup any running python processes after finishing your work
412-
> with goose.
413-
414421
### Agno Agent
415422
416423
Agno is a model-agnostic agent framework that allows you to turn Serena into an agent

0 commit comments

Comments
 (0)