Commit 891c160
authored
Add Python language server to Serena MCP container (#920)
The Serena MCP container was missing the Python language server,
preventing Python code analysis despite having the Python runtime
installed. Only Go language support was functional.
## Changes
- **Dockerfile**: Added `python-lsp-server[all]` installation between
Serena and TypeScript language server setup
The container already had:
- Go support via `gopls`
- TypeScript/JavaScript support via `typescript-language-server`
- Startup script correctly configuring all three languages in
`.serena/project.yml`
Only the Python language server package was missing. The `[all]` extra
includes optional dependencies for full LSP functionality.
> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `example.com`
> - Triggering command: `/tmp/go-build1194592432/b279/launcher.test
/tmp/go-build1194592432/b279/launcher.test
-test.testlogfile=/tmp/go-build1194592432/b279/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true
ternal/fips140/bigmod/nat_amd64.--gdwarf-5 HEAD x_amd64/compile
/tmp/apt-dpkg-in/opt/hostedtoolcache/go/1.25.7/x64/pkg/tool/linux_amd64/vet
tar amd64/compile x_amd64/compile add go -v x_amd64/vet -f 4971347/b009/
es x_amd64/vet` (dns block)
> - `invalid-host-that-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build1194592432/b264/config.test
/tmp/go-build1194592432/b264/config.test
-test.testlogfile=/tmp/go-build1194592432/b264/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo
zclWGwGwi ache/go/1.25.7/x64/pkg/tool/linu-o .util;
print(imp/opt/hostedtoolcache/go/1.25.7/x64/pkg/tool/linux_amd64/vet
r/runc-log.json /usr/sbin/tar 06.o ortc�� 64/src/runtime/cgo go
x_amd64/compile -f - /usr/sbin/dpkg-d-unreachable=false x_amd64/compile`
(dns block)
> - `nonexistent.local`
> - Triggering command: `/tmp/go-build1194592432/b279/launcher.test
/tmp/go-build1194592432/b279/launcher.test
-test.testlogfile=/tmp/go-build1194592432/b279/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true
ternal/fips140/bigmod/nat_amd64.--gdwarf-5 HEAD x_amd64/compile
/tmp/apt-dpkg-in/opt/hostedtoolcache/go/1.25.7/x64/pkg/tool/linux_amd64/vet
tar amd64/compile x_amd64/compile add go -v x_amd64/vet -f 4971347/b009/
es x_amd64/vet` (dns block)
> - `slow.example.com`
> - Triggering command: `/tmp/go-build1194592432/b279/launcher.test
/tmp/go-build1194592432/b279/launcher.test
-test.testlogfile=/tmp/go-build1194592432/b279/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true
ternal/fips140/bigmod/nat_amd64.--gdwarf-5 HEAD x_amd64/compile
/tmp/apt-dpkg-in/opt/hostedtoolcache/go/1.25.7/x64/pkg/tool/linux_amd64/vet
tar amd64/compile x_amd64/compile add go -v x_amd64/vet -f 4971347/b009/
es x_amd64/vet` (dns block)
> - `this-host-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build1194592432/b288/mcp.test
/tmp/go-build1194592432/b288/mcp.test
-test.testlogfile=/tmp/go-build1194592432/b288/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo
64/src/maps/iter.go ache/go/1.25.7/x64/pkg/tool/linu-o r/runc-log.json
abis /systemd-sysctl 08.o main�� ; then \
$GOPATH/bin/golangci-lint run --timeout=5m || echo "��� Warning:
golangci-lint failed
/opt/hostedtoolcache/go/1.25.7/x64/pkg/tool/linux_amd64/vet --auto
x_amd64/vet --detach 4971347/b004/ d-dispatcher/off-unreachable=false
x_amd64/vet` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/github/gh-aw-mcpg/settings/copilot/coding_agent)
(admins only)
>
> </details>
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>[language-support] TypeScript/JavaScript and Python
language support not available in Serena MCP container</issue_title>
> <issue_description>## Summary
>
> Testing of language support for Go, TypeScript/JavaScript, and Python
revealed that only **Go language support is working correctly**.
TypeScript/JavaScript and Python language servers are not available or
configured in the Serena MCP container.
>
> ## Test Results
>
> ### ✅ Go Language Support - PASSED
>
> All Go language operations work correctly:
> - **Symbol overview**: Successfully retrieved functions and constants
from `main.go`
> - **Symbol finding**: Located `main` and `buildVersionString`
functions with detailed info
> - **Pattern search**: Found function declarations using regex patterns
> - **Reference finding**: Discovered all references to
`buildVersionString` across multiple files
> - **Code body retrieval**: Successfully retrieved complete function
implementations
>
> ### ❌ TypeScript/JavaScript Language Support - FAILED
>
> **Issue**: Cannot activate TypeScript/JavaScript projects
> - The Serena configuration (`.serena/project.yml`) only includes `go`
in the `languages:` list
> - Attempts to activate a JavaScript project failed with
`ProjectNotFoundError`
> - `tsserver` binary exists at `/usr/local/bin/tsserver` but no
TypeScript language server wrapper found
> - Configuration file is owned by root and cannot be modified due to
container security restrictions
>
> ### ❌ Python Language Support - FAILED
>
> **Issue**: Cannot activate Python projects
> - The Serena configuration (`.serena/project.yml`) only includes `go`
in the `languages:` list
> - Attempts to activate a Python project failed with
`ProjectNotFoundError`
> - No Python language servers found in the container (checked for
`pyls`, `pylsp`, `jedi-language-server`)
> - Configuration file permissions prevent adding Python to supported
languages
>
> ## Root Cause
>
> The Serena MCP container is configured with only Go language support.
The `.serena/project.yml` file contains:
>
> ``````yaml
> languages:
> - go
> ``````
>
> According to the project configuration documentation, supported
languages include:
> - `typescript` (also handles JavaScript files)
> - `python` (or `python_jedi` as alternative)
>
> However, these are not enabled in the current configuration, and the
configuration file cannot be modified at runtime due to permission
restrictions.
>
> ## Impact
>
> - **Go projects**: ✅ Fully functional
> - **TypeScript/JavaScript projects**: ❌ Cannot be analyzed
> - **Python projects**: ❌ Cannot be analyzed
> - **Multi-language repositories**: Limited to Go code only
>
> ## Reproduction Steps
>
> 1. Start Serena MCP server with current configuration
> 2. Activate main Go project: `serena-activate_project` → **Success**
> 3. Try to activate TypeScript/JavaScript project:
`serena-activate_project` with JS path → **Fails with
ProjectNotFoundError**
> 4. Try to activate Python project: `serena-activate_project` with
Python path → **Fails with ProjectNotFoundError**
> 5. Check configuration: `cat .serena/project.yml` shows only `go` in
languages list
>
> ## Recommendations
>
> 1. **Update Serena container configuration** to include TypeScript and
Python language servers
> 2. **Modify `.serena/project.yml`** to include:
> ``````yaml
> languages:
> - go
> - typescript
> - python
> ``````
> 3. **Install required language servers** in the container:
> - TypeScript: `typescript-language-server` or equivalent
> - Python: `python-lsp-server` (pylsp) or `jedi-language-server`
> 4. **Test sample projects** at `test/serena-mcp-tests/samples/` once
language servers are available
>
> ## Environment Details
>
> - Repository: github/gh-aw-mcpg
> - Sparse checkout: 33% of files (Go code is present, test samples may
not be available)
> - Serena version: 0.1.4
> - Container: ghcr.io/github/serena-mcp-server:latest
> - Test date: 2026-02-12
>
>
>
>
> > AI generated by [Language Support
Tester](https://github.com/github/gh-aw-mcpg/actions/runs/21943451066)
> > - [x] expires <!-- gh-aw-expires: 2026-02-19T10:53:23.898Z --> on
Feb 19, 2026, 10:53 AM UTC
>
> <!-- gh-aw-agentic-workflow: Language Support Tester, engine: copilot,
run: https://github.com/github/gh-aw-mcpg/actions/runs/21943451066 -->
>
> <!-- gh-aw-workflow-id: language-support-tester
--></issue_description>
>
> ## Comments on the Issue (you are @claude[agent] in this section)
>
> <comments>
> </comments>
>
</details>
<!-- START COPILOT CODING AGENT SUFFIX -->
- Fixes #9131 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
0 commit comments