Skip to content

[WIP] Test Java MCP agent startup functionality#103

Draft
Copilot wants to merge 1 commit into
gh-pagesfrom
copilot/test-java-mcp-agent-again
Draft

[WIP] Test Java MCP agent startup functionality#103
Copilot wants to merge 1 commit into
gh-pagesfrom
copilot/test-java-mcp-agent-again

Conversation

Copilot AI commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>Test Java MCP agent</issue_title>
<issue_description>I just added an MCP server in this project configuration. The MCP server should download and start a Java language server that should provide so basic informations about the project. could you test it ?</issue_description>

<agent_instructions>This just for me to test the startup of a jdtls mcp server</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI requested a review from sunix March 15, 2026 20:21
Copilot stopped work on behalf of sunix due to an error March 15, 2026 20:21
@sunix

sunix commented Mar 15, 2026

Copy link
Copy Markdown
Owner

@copilot could you try again

Copilot AI commented Mar 15, 2026

Copy link
Copy Markdown
Contributor Author

@copilot could you try again

The JDTLS MCP server started and responded successfully. Here's a summary of what it provided about the project:

Document Symbols in ExcerptExtension.java:

  • Class: ExcerptExtension
  • Constants: MORE_MARKER, HTML_TAG_PATTERN, MAX_EXCERPT_LENGTH, MIN_MATCHING_WORDS, STOP_WORDS, WORD_STEMS
  • Methods: excerpt(Object), getUrl(Object), urlToFilePath(String), getCommonPrefixLength(String,String), extractBeforeMoreMarker(String), removeFrontmatter(String), markdownToHtml(String), stripHtmlTags(String)

Document Symbols in ExcerptExtractionTest.java:

  • Classes: ExcerptExtractionTest, inner MockPost
  • Test methods: testExcerptExtractionForExistingPosts, testEmailMigrationPostExcerpt, testExcerptTruncation, testPostWithoutMoreMarker, testExcerptExtraction, testFuzzyMatchingWithWordStems, testSemanticWordMatching, testHtmlTagStripping

Workspace symbol search found ExcerptExtension correctly.

Hover/Javadoc for excerpt(Object) returned the full type signature and Javadoc:

String org.sunix.blog.ExcerptExtension.excerpt(Object post)Extracts the excerpt from a blog post.

Diagnostics reported unresolved imports for io.quarkus and org.commonmark — expected since the standalone language server doesn't have the Maven dependencies on its classpath.

The JDTLS MCP server is fully operational! 🚀

@sunix

sunix commented Mar 15, 2026

Copy link
Copy Markdown
Owner

@copilot could you try again ? I slightly changed the setup

Copilot AI commented Mar 15, 2026

Copy link
Copy Markdown
Contributor Author

@copilot could you try again ? I slightly changed the setup

Tested again with the updated setup. Here's what I observed:

Notable change vs. before: Workspace-wide diagnostics now return No diagnostics found in workspace 🎉 — previously they would return unresolved import errors. Per-file diagnostics on ExcerptExtension.java still show unresolved imports for io.quarkus and org.commonmark, so the Maven classpath isn't fully wired yet, but the workspace indexing improved.

All JDTLS tools still working correctly:

Tool Result
document_symbols ✅ All classes, methods, fields listed for both source files
workspace_symbols (ExcerptExtension) ✅ Found correctly
hover on MORE_MARKER constant ✅ Returns Pattern MORE_MARKER type info
hover on excerpt(Object) method ✅ Returns full Javadoc
definition on excerpt(Object) ✅ Resolves to correct file+line
references on excerpt(Object) ✅ Finds all usages
diagnostics (workspace) No diagnostics found in workspace (improved!)
diagnostics (per-file) ⚠️ Still shows unresolved io.quarkus/org.commonmark imports

The server is fully operational. If the goal is to get full Maven dependency resolution (to clear the per-file import errors), the classpath/pom.xml discovery may need to be configured in the JDTLS setup.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test Java MCP agent

2 participants