Skip to content

implement completions #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

jitokim
Copy link
Contributor

@jitokim jitokim commented Apr 11, 2025

Motivation and Context

Add the initial implementation for completion

How Has This Been Tested?

add integration test named testCompletionShouldReturnExpectedSuggestions

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@jitokim jitokim closed this Apr 11, 2025
@jitokim jitokim reopened this Apr 11, 2025
@jitokim jitokim force-pushed the serverCapabilities-completions branch from 8306a87 to 98450f7 Compare April 11, 2025 08:53
Signed-off-by: jitokim <pigberger70@gmail.com>
@jitokim jitokim force-pushed the serverCapabilities-completions branch from 98450f7 to 09cbe0a Compare April 11, 2025 08:57
Signed-off-by: jitokim <pigberger70@gmail.com>
@jitokim jitokim force-pushed the serverCapabilities-completions branch from c683541 to 768d123 Compare April 11, 2025 09:24
@jitokim jitokim changed the title implement handler to support serverCapabilities completions implement completions Apr 12, 2025
@tzolov tzolov self-assigned this Apr 16, 2025
@tzolov tzolov added this to the 0.10.0 milestone Apr 16, 2025
@tzolov tzolov added enhancement New feature or request client server labels Apr 16, 2025
@tzolov
Copy link
Contributor

tzolov commented Apr 16, 2025

Great contribution. Thank you @jitokim
rebased/cherry-picked and merged at 7853efe

@tzolov tzolov closed this Apr 16, 2025
@jitokim
Copy link
Contributor Author

jitokim commented Apr 16, 2025

Thanks 😀

tzolov pushed a commit that referenced this pull request Apr 16, 2025
Add completion API support to the MCP protocol implementation:

- Add CompleteRequest and CompleteResult schema classes
- Implement completion capabilities in ServerCapabilities
- Add completion handlers in McpAsyncServer and McpServer
- Add completion client methods in McpAsyncClient and McpSyncClient
- Add CompletionRefKey and completion specifications in McpServerFeatures
- Add integration test for completion functionality
- Fix isPresent() check to use isEmpty() in WebMvcSseServerTransportProvider

Signed-off-by: jitokim <pigberger70@gmail.com>
tzolov pushed a commit that referenced this pull request Apr 16, 2025
Add completion API support to the MCP protocol implementation:

- Add CompleteRequest and CompleteResult schema classes
- Implement completion capabilities in ServerCapabilities
- Add completion handlers in McpAsyncServer and McpServer
- Add completion client methods in McpAsyncClient and McpSyncClient
- Add CompletionRefKey and completion specifications in McpServerFeatures
- Add integration test for completion functionality
- Fix isPresent() check to use isEmpty() in WebMvcSseServerTransportProvider

Signed-off-by: jitokim <pigberger70@gmail.com>
tzolov pushed a commit that referenced this pull request Apr 16, 2025
Add completion API support to the MCP protocol implementation:

- Add CompleteRequest and CompleteResult schema classes
- Implement completion capabilities in ServerCapabilities
- Add completion handlers in McpAsyncServer and McpServer
- Add completion client methods in McpAsyncClient and McpSyncClient
- Add CompletionRefKey and completion specifications in McpServerFeatures
- Add integration test for completion functionality
- Fix isPresent() check to use isEmpty() in WebMvcSseServerTransportProvider
- Replace McpServerFeatures.CompletionRefKey by McpSchemaCompleteReference

Co-authored-by: Christian Tzolov <christian.tzolov@broadcom.com>

Signed-off-by: jitokim <pigberger70@gmail.com>
@tzolov
Copy link
Contributor

tzolov commented Apr 17, 2025

@jitokim, fyi, I've made some changes like replacing the McpServerFeatures#CompletionRefKey by McpSchema#CompleteReference ...

@jitokim
Copy link
Contributor Author

jitokim commented Apr 17, 2025

That is a better name indeed. Appreciate the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client enhancement New feature or request server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants