Conversation
7910f8f to
1a53a2a
Compare
1a53a2a to
14bd4f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an MCP (Model Context Protocol) endpoint at
/mcpso LLM-based agents can discover and query the identity API via the standard MCP Streamable HTTP transport.What's new
/mcpendpoint — Serves MCP tools backed by the existing GraphQL API. Executes queries internally (no network hop) with full dataloader support.@mcpTooldirective — Annotates commonly used queries in the GraphQL schema. The codegen tool reads these to generate typed shortcut tools./query).MCP tools exposed
identity_get_schemaidentity_queryidentity_get_vehicleidentity_list_vehiclesDependencies
pkg/mcpserver+cmd/mcpgen)go mod replacefor local development — will be updated to a tagged version after server-garage is mergedFiles changed
graph/schema/directives.graphqls—@mcpTooldirective definitiongraph/schema/vehicle.graphqls—@mcpToolannotations onvehicleandvehiclesqueriesgraph/mcp_tools_gen.go— Generated tool definitions (viamcpgen)graph/resolver.go— Added//go:generate mcpgendirectivegqlgen.yml—mcpTool: skip_runtime: truecmd/identity-api/main.go— Mount MCP handler at/mcpTest plan
/mcpendpoint locally with MCP clientidentity_get_schemareturns introspection dataidentity_get_vehiclereturns vehicle data