Skip to main content
Glama

MCP Language Server

MCP 언어 서버

이것은 LLM에 언어 서버를 실행하고 노출하는 MCP 서버입니다. MCP용 언어 서버가 아닙니다.

데모

mcp-language-server 정의, 참조, 이름 바꾸기, 진단 등의 의미 도구에 대한 액세스를 제공하여 MCP 지원 클라이언트가 코드베이스를 더 쉽게 탐색할 수 있도록 돕습니다.

데모

설정

  1. Go 설치 : https://golang.org/doc/install 의 지침을 따르세요.
  2. 이 서버를 설치하거나 업데이트하세요 : go install github.com/isaacphi/mcp-language-server@latest
  3. 언어 서버 설치 : 아래 가이드 중 하나를 따르세요.
  4. MCP 클라이언트 구성 : 아래 가이드 중 하나를 따르세요.

지엑스피1

도구

  • definition : 코드베이스에서 모든 심볼(함수, 유형, 상수 등)의 전체 소스 코드 정의를 검색합니다.
  • references : 코드베이스 전체에서 심볼의 모든 사용법과 참조를 찾습니다.
  • diagnostics : 경고 및 오류를 포함하여 특정 파일에 대한 진단 정보를 제공합니다.
  • hover : 지정된 위치에 대한 문서, 유형 힌트 또는 기타 호버 정보를 표시합니다.
  • rename_symbol : 프로젝트 전체에서 심볼의 이름을 변경합니다.
  • edit_file : 줄 번호를 기준으로 파일에 여러 텍스트를 편집할 수 있습니다. 검색 및 바꾸기 기반 편집 도구에 비해 더욱 안정적이고 상황에 맞는 효율적인 파일 편집 방법을 제공합니다.

에 대한

이 코드베이스는 LSP 통신을 처리하기 위해 gopls 의 편집된 코드를 사용합니다. 자세한 내용은 ATTRIBUTION을 참조하세요. 여기에 있는 모든 내용은 관대한 BSD 스타일 라이선스의 적용을 받습니다.

mcp-go는 MCP 통신에 사용됩니다. 서비스해 주셔서 감사합니다.

베타 소프트웨어입니다. 문제가 발생하거나 제안 사항이 있으시면 '문제 생성'을 통해 알려주세요.

기여하다

PR은 작게 유지하고, 중요한 문제는 먼저 공개해 주세요. AI가 테스트를 거쳐 검증을 통과하고 냄새가 심하지 않다면 괜찮습니다.

설정

저장소를 복제합니다.

git clone https://github.com/isaacphi/mcp-language-server.git cd mcp-language-server

편의를 위해 justfile 이 포함되어 있습니다.

just -l Available recipes: build # Build check # Run code audit checks fmt # Format code generate # Generate LSP types and methods help # Help install # Install locally snapshot # Update snapshot tests test # Run tests

로컬 바이너리를 사용하도록 Claude Desktop(또는 유사한 프로그램)을 구성하세요.

{ "mcpServers": { "language-server": { "command": "/full/path/to/your/clone/mcp-language-server/mcp-language-server", "args": [ "--workspace", "/path/to/workspace", "--lsp", "language-server-executable" ], "env": { "LOG_LEVEL": "DEBUG" } } } }

변경 후 다시 빌드합니다.

벌채 반출

LOG_LEVEL 환경 변수를 DEBUG로 설정하면 언어 서버와의 메시지와 언어 서버의 로그를 포함한 모든 구성 요소에 대한 자세한 로깅이 stderr에 기록됩니다.

LSP 상호 작용

  • internal/lsp/methods.go 에는 연결된 언어 서버에 대한 호출을 수행하는 생성된 코드가 포함되어 있습니다.
  • internal/protocol/tsprotocol.go 에는 LSP 유형에 대해 생성된 코드가 포함되어 있습니다. gopls 의 소스 코드에서 이 코드를 가져왔습니다. 서비스해 주셔서 감사합니다.
  • LSP를 사용하면 언어 서버가 동일한 메서드에 대해 서로 다른 유형을 반환할 수 있습니다. Go에서는 이러한 문제가 발생하지 않으므로 internal/protocol/interfaces.go 에 몇 가지 불편한 해결 방법이 있습니다.

로컬 개발 및 스냅샷 테스트

도구 변경 사항을 훨씬 쉽게 시험해 볼 수 있는 스냅샷 테스트 모음이 있습니다. 이 도구는 모의 작업 공간에서 실제 언어 서버를 실행하고 출력과 로그를 캡처합니다.

실행하려면 언어 서버가 로컬에 설치되어 있어야 합니다. Go, Rust, Python, TypeScript에 대한 테스트가 있습니다.

integrationtests/ ├── tests/ # Tests are in this folder ├── snapshots/ # Snapshots of tool outputs ├── test-output/ # Gitignored folder showing the final state of each workspace and logs after each test run └── workspaces/ # Mock workspaces that the tools run on

스냅샷을 업데이트하려면 UPDATE_SNAPSHOTS=true go test ./integrationtests/... 실행합니다.

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

언어 서버를 운영하고 통신 도구를 제공합니다. 언어 서버는 LLM이 종종 어려움을 겪는 유형, 관계, 정확한 기호 참조 제공 등의 작업에 탁월합니다.

  1. 데모
    1. 설정
      1. 도구
        1. 에 대한
          1. 기여하다
            1. 설정
            2. 벌채 반출
            3. LSP 상호 작용
            4. 로컬 개발 및 스냅샷 테스트

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            This is a server that lets your LLMs (like Claude) talk directly to your BigQuery data! Think of it as a friendly translator that sits between your AI assistant and your database, making sure they can chat securely and efficiently.
            Last updated -
            1
            241
            81
            JavaScript
            MIT License
          • A
            security
            A
            license
            A
            quality
            This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.
            Last updated -
            1
            54,491
            JavaScript
            MIT License
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            A TypeScript-based server that provides a memory system for Large Language Models (LLMs), allowing users to interact with multiple LLM providers while maintaining conversation history and offering tools for managing providers and model configurations.
            Last updated -
            20
            JavaScript
            • Apple
          • -
            security
            F
            license
            -
            quality
            This server provides an API to query Large Language Models using context from local files, supporting various models and file types for context-aware responses.
            Last updated -
            1
            TypeScript

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/isaacphi/mcp-language-server'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server