Skip to content

Commit 48515dd

Browse files
committed
feat(server): support sync stateless primitive repositories
1 parent b1a7d5f commit 48515dd

10 files changed

Lines changed: 1743 additions & 267 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2024-2026 the original author or authors.
3+
*/
4+
5+
package io.modelcontextprotocol.server;
6+
7+
import io.modelcontextprotocol.common.McpTransportContext;
8+
import io.modelcontextprotocol.spec.McpSchema;
9+
10+
/**
11+
* Repository contract for handling stateless completion requests from the current MCP
12+
* request context.
13+
*
14+
* @author Taewoong Kim
15+
*/
16+
public interface CompletionsRepository {
17+
18+
/**
19+
* Complete the request for the current request context.
20+
* @param request the completion request
21+
* @param transportContext the transport context for the current request
22+
* @return the completion result
23+
*/
24+
McpSchema.CompleteResult complete(McpSchema.CompleteRequest request, McpTransportContext transportContext);
25+
26+
}

mcp-core/src/main/java/io/modelcontextprotocol/server/McpServer.java

Lines changed: 131 additions & 36 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)