-
Notifications
You must be signed in to change notification settings - Fork 275
Adding MCP capability in DAB #2868
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
base: main
Are you sure you want to change the base?
Conversation
…a-api-builder into jerry-mcp-core" This reverts commit 0b649dbbc877a8ad009ac31eb4a082664d49bce3, reversing changes made to 2240172.
## Why make this change? - Introduces a dedicated runtime layer for MCP ## What is this change? - Adds a runtime initialization module that centralizes configuration load, validation, DI registration, and service/materialization order. - Refactors existing startup code into clearer phases; removes duplicated wiring. - Improves logging structure and prepares for future feature flags / layered config overrides. - Cleans up deprecated code paths (overall net +901 / −130 LOC). - No intentional breaking changes (verify before merge). ## How was this tested? - [ ] Integration Tests - [ ] Unit Tests ## Sample Request(s) - Discover tools: POST `http://localhost:5000/mcp` JSON body ``` { "jsonrpc": "2.0", "id": "1", "method": "tools/list", "params": {} } ``` - List entities: POST `http://localhost:5000/mcp` JSON body ``` { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "list_entities" } } ``` --------- Co-authored-by: Rahul Nishant <[email protected]> Co-authored-by: RubenCerna2079 <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Aniruddh Munde <[email protected]>
/azp run |
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
/azp run |
Azure Pipelines successfully started running 6 pipeline(s). |
function parameters should be camelCased.
…constructor parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have resurfaced some of the comments which were not addressed or resolved. A few of them are important. Everything else looks good to me. I can approve the PR once these comments are closed.
src/Service/Startup.cs
Outdated
|
||
services.AddSingleton<DabCacheService>(); | ||
|
||
// special for MCP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not addressed.
src/Azure.DataApiBuilder.Mcp/Core/McpEndpointRouteBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
## Why make this change? - Fixes service tests for mcp-core PR ## What is this change? - It creates the JsonConverterFactory that is needed to serialize and deserialize the MCP properties correctly. - Fixes tests to ensure that the serialization/deserialization works as intended. ## How was this tested? - [ ] Integration Tests - [X] Unit Tests
/azp run |
Azure Pipelines successfully started running 6 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 6 pipeline(s). |
src/Azure.DataApiBuilder.Mcp/Core/McpEndpointRouteBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/Azure.DataApiBuilder.Mcp/BuiltInTools/DescribeEntitiesTool.cs
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 6 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 6 pipeline(s). |
Why make this change?
What is this change?
Introduces an MCP service layer that exposes:
Schema / entity metadata derived from the existing DAB configuration (tables, stored procedures, relationships, GraphQL entity projections).
Operation capabilities (read / create / update / delete) aligned with DAB authorization rules.
A capability negotiation / handshake endpoint so MCP clients can discover features.
MCP endpoint can be accessed with
/mcp
Sample request to discover tools-
How was this tested?
Sample Request(s)