A containerized version of the Serena MCP Server with support for multiple programming languages.
- Multi-language support: Python, Java, JavaScript/TypeScript, and Go
- Semantic code analysis: IDE-like capabilities for code navigation and editing
- MCP protocol: Compatible with any MCP client (Claude Desktop, Cursor, VSCode, etc.)
- Pre-installed language servers: Ready to use out of the box
- Python (3.11+) - via pyright and python-lsp-server
- Java (JDK 21) - via Serena's built-in LSP integration
- JavaScript/TypeScript - via typescript-language-server
- Go - via gopls
Run the Serena MCP server with the MCP Gateway:
{
"mcpServers": {
"serena": {
"type": "stdio",
"container": "ghcr.io/github/serena-mcp-server:latest",
"mounts": [
"/path/to/your/workspace:/workspace:ro"
]
}
}
}SERENA_WORKSPACE- Workspace directory (default:/workspace)SERENA_CACHE_DIR- Cache directory for language server data (default:/tmp/serena-cache)
Always mount your codebase to /workspace for Serena to analyze:
{
"mounts": [
"/path/to/project:/workspace:ro"
]
}config.toml:
[servers.serena]
command = "docker"
args = [
"run", "--rm", "-i",
"-v", "/path/to/workspace:/workspace:ro",
"-e", "NO_COLOR=1",
"-e", "TERM=dumb",
"ghcr.io/github/serena-mcp-server:latest"
]config.json:
{
"mcpServers": {
"serena": {
"type": "stdio",
"container": "ghcr.io/github/serena-mcp-server:latest",
"mounts": [
"/path/to/workspace:/workspace:ro"
],
"env": {
"NO_COLOR": "1",
"TERM": "dumb"
}
}
}
}To build the container image locally:
cd containers/serena-mcp-server
docker build -t serena-mcp-server:local .To build for multiple architectures (amd64 and arm64):
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/github/serena-mcp-server:latest \
--push \
.Test the container locally:
# Test Python support
docker run --rm -i \
-v $(pwd):/workspace:ro \
serena-mcp-server:local \
--help
# Interactive test
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | \
docker run --rm -i \
-v $(pwd):/workspace:ro \
serena-mcp-server:local- Pyright is included by default (part of Serena dependencies)
- python-lsp-server provides additional features
- Requires Python 3.11+
- OpenJDK 21 is pre-installed (via default-jdk package)
- Java language server support provided by Serena's built-in LSP integration
- Works with Maven and Gradle projects
- Note: Eclipse JDT Language Server is managed by Serena internally
- Node.js and npm are pre-installed
- TypeScript and typescript-language-server included
- Supports both .js and .ts files
- Go 1.x runtime pre-installed
- gopls (official Go language server) included
- Supports Go modules
If a language server isn't working properly:
- Check that your workspace is properly mounted
- Verify the language-specific files exist in
/workspace - Check container logs for language server startup errors
If Serena is slow:
- Ensure sufficient memory is allocated to Docker
- Use read-only mounts when possible (
:ro) - Consider caching the language server data between runs