MCP.so
登录

Cursor Mcp For Java

@saikaNya

关于 Cursor Mcp For Java

一个Cursor或VSCode插件,可将您的VSCode或Cursor作为MCP服务器,为MCP客户端(如Cursor、VSCode copilot、Claude Desktop、Cherry studio)提供高级编码辅助功能。如获取项目中的类,与通过全限定名获取类的源代码等(包含项目源代码,以及项目中所有可访问依赖中的类

基本信息

分类

开发工具

传输方式

stdio

发布者

saikaNya

提交者

Saika Totsuka

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "vscode-java": {
      "command": "npx",
      "args": [
        "vscode-as-mcp-server"
      ]
    }
  }
}

工具

10

Execute a command in a VSCode integrated terminal with proper shell integration. This tool provides detailed output and exit status information, and supports: - Custom working directory - Shell integration for reliable output capture - Output compression for large outputs - Detailed exit status reporting - Flag for potentially destructive commands (potentiallyDestructive: false to skip confirmation for read-only commands)

Retrieve diagnostics from VSCode's language services for the active workspace. Use this tool after making changes to any code in the filesystem to ensure no new errors were introduced, or when requested by the user.

Open the specified file in the VSCode editor and navigate to a specific line and column. Use this tool to bring a file into focus and position the editor's cursor where desired. Note: This tool operates on the editor visual environment so that the user can see the file. It does not return the file contents in the tool call result.

List all active debug sessions in the workspace.

Start a new debug session with the provided configuration.

Restart a debug session by stopping it and then starting it with the provided configuration.

Stop all debug sessions that match the provided session name.

A text editor tool that provides file manipulation capabilities using VSCode's native APIs: - view: Read file contents with optional line range - str_replace: Replace text in file - create: Create new file - insert: Insert text at specific line - undo_edit: Restore from backup Code Editing Tips: - VSCode may automatically prune unused imports when saving. To prevent this, make sure the imported type is actually used in your code before adding the import.

List directory contents in a tree format, respecting .gitignore patterns. Shows files and directories with proper indentation and icons. Useful for exploring workspace structure while excluding ignored files.

Retrieve the output from a specific terminal by its ID. This tool allows you to check the current or historical output of a terminal, which is particularly useful when working with long-running commands or commands started in background mode with the execute_command tool.

概览

What is Cursor Mcp For Java?

Cursor Mcp For Java is an MCP server that enables AI assistants to interact with Java projects through VSCode or Cursor. It acts as a bridge, allowing AI coding tools to access and manipulate Java code context via the Model Context Protocol. This server is for developers using AI assistants with Java development environments.

How to use Cursor Mcp For Java?

First, install the Extension Pack for Java and the MCP Server for Java plugin. Configure your MCP client by adding the command npx with args ["vscode-as-mcp-server"] to the client's config file (e.g., claude_desktop_config.json). Open a Java project and ensure it is fully loaded. Check the status indicator in the bottom-right corner of VSCode or Cursor (✅ running, ∅ click to start).

Key features of Cursor Mcp For Java

  • Integrates with VSCode, Cursor, and other MCP clients.
  • Requires the Extension Pack for Java to be installed.
  • Launched via npx with the vscode-as-mcp-server command.
  • Status indicator in the editor’s bottom-right bar.
  • Works only when a Java project is fully loaded.
  • Supports clients like Claude Desktop, Windsurf, and Cherry Studio.

Use cases of Cursor Mcp For Java

  • AI-assisted code generation and refactoring in Java projects.
  • Enabling AI tools to read and analyze Java project structure.
  • Automating Java project tasks through AI chat interfaces.
  • Integrating Java development workflows with AI coding assistants.

FAQ from Cursor Mcp For Java

What prerequisites are needed to use this server?

You must have the Extension Pack for Java installed and working in your development environment.

How do I start the MCP server?

The server status is shown in the bottom-right corner of VSCode or Cursor. If it shows ∅, click it to start the server.

Which MCP clients are supported?

Supported clients include Claude Desktop, Cursor, Windsurf, VSCode, and Cherry Studio.

What command is used to launch the server?

The server is launched using npx vscode-as-mcp-server in the MCP client configuration.

Do I need to have a project open for the server to work?

Yes, you must open a Java project and ensure it is fully loaded before the server functions correctly.

评论

开发工具 分类下的更多 MCP 服务器