Add code-search-mcp module: JavaParser index, swappable embedder and three MCP tools on the 2026-07-28 stateless spec (MCP Java SDK 2.2.0)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6BHcz4muRH44T3br3
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
26e0a3875a
commit
e116c4d5a4
@@ -0,0 +1,12 @@
|
||||
# java -jar target/code-search-mcp.jar sample-monorepo 8791, then curl
|
||||
[main] WARN io.modelcontextprotocol.modern.server.HmacRequestStateCodec - HmacRequestStateCodec: no key configured, generated a random per-process key. State sealed by this instance cannot be opened by another instance; configure a shared key for multi-instance deployments.
|
||||
indexed 30 units from sample-monorepo with the hashing-512 embedder
|
||||
serving MCP 2026-07-28 at http://127.0.0.1:<port>/mcp
|
||||
|
||||
$ curl ... -H "Mcp-Method: tools/call" -H "Mcp-Name: search_code" -d {"query":"cancel an order","k":2}
|
||||
1. 0.844 OrderService#cancelOrder orders/src/main/java/shop/orders/OrderService.java:38
|
||||
public void cancelOrder(String orderId)
|
||||
// Cancels an order, puts the stock back on the shelf and returns the money to the customer.
|
||||
2. 0.541 OrderService orders/src/main/java/shop/orders/OrderService.java:11
|
||||
class OrderService
|
||||
// Places and cancels customer orders by coordinating stock, payment and email.
|
||||
Reference in New Issue
Block a user