-
Notifications
You must be signed in to change notification settings - Fork 59
feat: add Claude Code plugin support #4575
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
Open
mustafamengutay-sap
wants to merge
13
commits into
main
Choose a base branch
from
feat/add-claude-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7ffb05f
feat: add Claude plugin metadata
mustafamengutay-sap 0d47a3b
feat: add MCP server config
mustafamengutay-sap 1b99387
feat: add AGENTS.md
mustafamengutay-sap d3ffb82
feat: sync plugin.json version automatically
mustafamengutay-sap 1da66c5
rename sync script and update references
mustafamengutay-sap 2ad7bd2
feat: add robust JSON reading & error handling
mustafamengutay-sap abd1199
chore: clarify homepage field in AGENTS.md
mustafamengutay-sap 8f69cbe
chore: add changeset
mustafamengutay-sap d292d38
refactor: update version for all package entries
mustafamengutay-sap 226cef7
Merge branch 'main' into feat/add-claude-plugin
mustafamengutay-sap 644542e
refactor: rename package loop variable
mustafamengutay-sap 2eec792
Merge branch 'main' into feat/add-claude-plugin
heimwege e972460
Merge branch 'main' into feat/add-claude-plugin
vinayhospete File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@sap-ux/fiori-mcp-server': patch | ||
| --- | ||
|
|
||
| feat: add Claude Code plugin support |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "name": "fiori-mcp-server", | ||
| "version": "0.6.49", | ||
| "description": "MCP server for SAP Fiori development tools for Claude Code. Build and modify SAP Fiori applications with AI assistance.", | ||
| "author": { | ||
| "name": "SAP SE", | ||
| "url": "https://sap.com/" | ||
| }, | ||
| "homepage": "https://github.com/SAP/open-ux-tools/tree/main/packages/fiori-mcp-server", | ||
| "repository": "https://github.com/SAP/open-ux-tools", | ||
| "license": "Apache-2.0", | ||
| "keywords": ["sap", "fiori", "ui5", "cap", "mcp", "fiori-elements"] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "mcpServers": { | ||
| "fiori-mcp": { | ||
| "type": "stdio", | ||
| "command": "npx", | ||
| "args": ["--yes", "@sap-ux/fiori-mcp-server@latest", "fiori-mcp"] | ||
| } | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # AI Agent Guidelines for `@sap-ux/fiori-mcp-server` | ||
|
|
||
| This document describes the purpose of the key configuration files in this package that relate to MCP server distribution and plugin registries. | ||
|
|
||
| ## Configuration Files | ||
|
|
||
| ### `server.json` | ||
|
|
||
| This file is the **MCP server registry manifest**. It conforms to the [MCP server schema](https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json) and is used to list this server in MCP server registries (e.g., the official MCP server registry at `registry.modelcontextprotocol.io`). | ||
|
|
||
| Key fields: | ||
| - `name` — Unique server identifier in reverse-domain notation (`io.github.SAP/fiori-mcp-server`) | ||
| - `description` — Short description shown in registry listings | ||
| - `repository` — Points to the GitHub source repository and subfolder | ||
| - `version` — Must be kept in sync with `package.json` | ||
| - `packages[].environmentVariables` — Documents environment variables users can configure (e.g., `LOG_LEVEL`, `SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY`) | ||
|
|
||
| > **Important:** Do not manually update `version` in `server.json` or `.claude-plugin/plugin.json`. The `scripts/sync-mcp-manifests.js` script runs automatically in the CI/CD pipeline (`version` job in `pipeline.yml`) after changesets bump `package.json`, and keeps all three files in sync. | ||
|
|
||
| ### `.claude-plugin/plugin.json` | ||
|
|
||
| This file is the **Claude Code plugin manifest**. It registers this MCP server as a plugin in the [Claude Code plugin registry](https://code.claude.com/docs/en/plugins), allowing users to discover and install it from within Claude Code. | ||
|
|
||
| Key fields: | ||
| - `name` — Plugin identifier shown in the Claude Code registry | ||
| - `description` — Brief explanation of what the plugin does (shown to users in registry) | ||
| - `author` — Organization name and URL | ||
| - `homepage` — URL to the package folder (documentation and README) | ||
| - `repository` — URL to the source code repository root | ||
| - `license` — SPDX license identifier | ||
| - `keywords` — Discovery tags used for search in the registry | ||
|
|
||
| The `.mcp.json` file at the plugin root is automatically picked up by Claude Code to configure the bundled MCP server when the plugin is enabled. | ||
|
|
||
| ### `.mcp.json` | ||
|
|
||
| This file is the **project-scoped MCP server configuration** for Claude Code. It follows the [Claude Code `.mcp.json` format](https://code.claude.com/docs/en/mcp#option-1-exclusive-control-with-managed-mcp-json) and serves two purposes: | ||
|
|
||
| 1. **Plugin bundling** — When this package is installed as a Claude Code plugin (via `.claude-plugin/plugin.json`), Claude Code reads `.mcp.json` to automatically start the MCP server. | ||
| 2. **Local development** — Developers working in this repository can use this file directly to connect the locally published server to Claude Code. | ||
|
|
||
| Key fields: | ||
| - `mcpServers.fiori-mcp.type` — Transport type (`stdio` for local process) | ||
| - `mcpServers.fiori-mcp.command` / `args` — How to launch the server via `npx` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| #!/usr/bin/env node | ||
| // Syncs the version in server.json and .claude-plugin/plugin.json with package.json. | ||
| // Called from the version job in pipeline.yml after `changeset version` bumps package.json. | ||
|
|
||
| 'use strict'; | ||
|
|
||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
|
|
||
| const pkgPath = path.join(__dirname, '..', 'package.json'); | ||
| const serverJsonPath = path.join(__dirname, '..', 'server.json'); | ||
| const pluginJsonPath = path.join(__dirname, '..', '.claude-plugin', 'plugin.json'); | ||
|
|
||
| /** | ||
| * Reads and parses a JSON file, throwing a clear error if the file is missing or contains invalid JSON. | ||
| * @param {string} filePath | ||
| * @returns {object} | ||
| */ | ||
| function readJson(filePath) { | ||
| if (!fs.existsSync(filePath)) { | ||
| throw new Error(`File not found: ${filePath}`); | ||
| } | ||
| const content = fs.readFileSync(filePath, 'utf8'); | ||
| try { | ||
| return JSON.parse(content); | ||
| } catch (e) { | ||
| throw new Error(`Invalid JSON in ${filePath}: ${e.message}`); | ||
| } | ||
| } | ||
|
|
||
| try { | ||
| const pkg = readJson(pkgPath); | ||
| const serverJson = readJson(serverJsonPath); | ||
| const pluginJson = readJson(pluginJsonPath); | ||
|
|
||
| const { version } = pkg; | ||
|
|
||
| // Update top-level version | ||
| serverJson.version = version; | ||
|
|
||
| // Update version in all package entries | ||
| if (Array.isArray(serverJson.packages)) { | ||
| for (const pkg of serverJson.packages) { | ||
| pkg.version = version; | ||
| } | ||
| } | ||
|
|
||
| // Update version in Claude Code plugin manifest | ||
| pluginJson.version = version; | ||
|
|
||
| fs.writeFileSync(serverJsonPath, JSON.stringify(serverJson, null, 4) + '\n'); | ||
| console.log(`Updated server.json to version ${version}`); | ||
|
|
||
| fs.writeFileSync(pluginJsonPath, JSON.stringify(pluginJson, null, 4) + '\n'); | ||
| console.log(`Updated .claude-plugin/plugin.json to version ${version}`); | ||
| } catch (e) { | ||
| console.error(`Error: ${e.message}`); | ||
| process.exit(1); | ||
| } | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.