Skip to content

Add Python language server to Serena MCP container#920

Merged
lpcox merged 2 commits intomainfrom
claude/add-typescript-python-support
Feb 14, 2026
Merged

Add Python language server to Serena MCP container#920
lpcox merged 2 commits intomainfrom
claude/add-typescript-python-support

Conversation

@Claude
Copy link
Contributor

@Claude Claude AI commented Feb 13, 2026

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

Firewall rules blocked me from connecting to one or more addresses (expand for details)

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:

Original prompt

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:

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_projectSuccess
  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:
    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

  • expires on Feb 19, 2026, 10:53 AM UTC

Comments on the Issue (you are @claude[agent] in this section)

Install python-lsp-server[all] to enable Python language support
in the Serena MCP container. This addresses the issue where Python
projects could not be analyzed due to missing language server.

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
@Claude Claude AI changed the title [WIP] Add TypeScript and Python language support in MCP container Add Python language server to Serena MCP container Feb 13, 2026
@Claude Claude AI requested a review from lpcox February 13, 2026 03:49
@github-actions
Copy link
Contributor

PRs: [test] Add comprehensive tests for launcher.LogHelpers | [log] Add debug logging to main.go
GitHub MCP (last 2 merged PRs): ✅
Serena activate_project: ✅
Playwright title contains GitHub: ✅
File write: ✅
Cat file: ✅
Overall: PASS

AI generated by Smoke Codex

@lpcox lpcox marked this pull request as ready for review February 14, 2026 13:10
Copilot AI review requested due to automatic review settings February 14, 2026 13:10
@lpcox lpcox merged commit 891c160 into main Feb 14, 2026
3 checks passed
@lpcox lpcox deleted the claude/add-typescript-python-support branch February 14, 2026 13:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes missing Python language support in the Serena MCP container by adding the python-lsp-server[all] package installation. The container already had the infrastructure in place (configuration, pre-indexing, tests) but was missing the actual Python language server package, preventing Python code analysis from working.

Changes:

  • Added python-lsp-server[all] installation to the Dockerfile between Serena and TypeScript language server setup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[language-support] TypeScript/JavaScript and Python language support not available in Serena MCP container

2 participants