Add MCP (Model Context Protocol) support to prompt registry microservice#1855
Merged
chensuyue merged 8 commits intoopea-project:mainfrom Aug 22, 2025
Merged
Conversation
Signed-off-by: dittops <dittops@gmail.com>
Signed-off-by: dittops <dittops@gmail.com>
Signed-off-by: dittops <dittops@gmail.com>
Signed-off-by: dittops <dittops@gmail.com>
Signed-off-by: dittops <dittops@gmail.com>
Collaborator
|
Wait for CI machine back for test. |
ftian1
approved these changes
Aug 14, 2025
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
Collaborator
|
Hi @dittops could you please help check the CI failures? Thanks. |
Signed-off-by: dittops <dittops@gmail.com>
Signed-off-by: dittops <dittops@gmail.com>
chensuyue
pushed a commit
that referenced
this pull request
Aug 22, 2025
…ice (#1855) * MCP support for prompt registry comp Signed-off-by: dittops <dittops@gmail.com> * Fix test for the mcp Signed-off-by: dittops <dittops@gmail.com> * fix: prompt response format in test Signed-off-by: dittops <dittops@gmail.com> * fix: prompt response format in test Signed-off-by: dittops <dittops@gmail.com> * fix: mcp test Signed-off-by: dittops <dittops@gmail.com> * fix: update test for mcp Signed-off-by: dittops <dittops@gmail.com> * fix: mcp test Signed-off-by: dittops <dittops@gmail.com> --------- Signed-off-by: dittops <dittops@gmail.com> (cherry picked from commit 0f1ba3b)
jilongW
pushed a commit
to jilongW/GenAIComps
that referenced
this pull request
Dec 18, 2025
…ice (opea-project#1855) * MCP support for prompt registry comp Signed-off-by: dittops <dittops@gmail.com> * Fix test for the mcp Signed-off-by: dittops <dittops@gmail.com> * fix: prompt response format in test Signed-off-by: dittops <dittops@gmail.com> * fix: prompt response format in test Signed-off-by: dittops <dittops@gmail.com> * fix: mcp test Signed-off-by: dittops <dittops@gmail.com> * fix: update test for mcp Signed-off-by: dittops <dittops@gmail.com> * fix: mcp test Signed-off-by: dittops <dittops@gmail.com> --------- Signed-off-by: dittops <dittops@gmail.com> Signed-off-by: sunzhonghua2004 <137033036@qq.com>
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.
Description
This PR adds Model Context Protocol (MCP) support to the prompt registry microservice, enabling AI agents to discover and use prompt management capabilities through the OPEA MCP framework.
Changes Made
- Added MCP support to the prompt registry service with three exposed tools:
- Enabled via ENABLE_MCP environment variable
- Fixed service registration pattern to use unified service name opea_service@prompt_registry for all endpoints
- Added ServiceType.PROMPT_REGISTRY to the constants enum
- Updated service startup logic in the main block
- Updated README files to explain MCP functionality and usage
- Documented important limitation: When MCP is enabled, regular HTTP endpoints are not available (MCP-only mode)
- Added examples of MCP client usage
- Added comprehensive test script (test_prompt_registry_mcp.sh) that tests both MCP-enabled and disabled scenarios
- Created unit tests for MCP functionality (test_prompt_registry_mcp_unit.py)
- Tests verify backward compatibility and proper MCP tool registration
- Added mcp library to requirements
Technical Details
Testing
The PR includes comprehensive tests that verify: