Feat: add mcp server - #62
Merged
Merged
Conversation
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
lukasdotcom
force-pushed
the
feat/mcp-server
branch
from
July 31, 2025 20:32
66b9525 to
e313892
Compare
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
lukasdotcom
force-pushed
the
feat/mcp-server
branch
from
July 31, 2025 20:33
e313892 to
1319bec
Compare
marcelklehr
reviewed
Aug 1, 2025
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
lukasdotcom
force-pushed
the
feat/mcp-server
branch
from
August 1, 2025 12:46
143e0fd to
d99f46e
Compare
marcelklehr
reviewed
Aug 1, 2025
marcelklehr
reviewed
Aug 1, 2025
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds Model Context Protocol (MCP) server functionality to the Nextcloud Context Agent, exposing available tools through a standardized MCP interface for external AI systems to consume.
Key changes:
- Integrates FastMCP library to create an MCP server with user authentication and dynamic tool loading
- Adds MCP server routing configuration to expose the server at
/mcpendpoint - Implements middleware for user authentication and dynamic tool registration
Reviewed Changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Adds fastmcp dependency for MCP server functionality |
| ex_app/lib/mcp_server.py | Core MCP server implementation with authentication and tool management |
| ex_app/lib/main.py | Integrates MCP server into main FastAPI application with proper lifecycle management |
| appinfo/info.xml | Configures routing for MCP endpoints through app API proxy |
| ex_app/lib/tools.py | Removes unused import that is no longer needed |
| ex_app/lib/all_tools/calendar.py | Minor formatting change (empty line addition) |
| ex_app/lib/all_tools/audio2text.py | Minor formatting change (empty line addition) |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
marcelklehr
approved these changes
Aug 25, 2025
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.
Exposes an MCP server with all tools that are a function on the route
/index.php/apps/app_api/proxy/context_agent/mcp/when exposed through app api proxyNotes/WIP
Have been using https://github.com/modelcontextprotocol/inspector to test it.