Skip to content

Commit 1164313

Browse files
feat: Add npm package for MCP server and improve deprecated UI
- Create @drupaltools/mcp npm package for easy installation - Self-contained package with 186 Drupal tools data - Support for npx installation: npx @drupaltools/mcp@latest - GitHub Actions workflow for automated npm publishing - Interactive publish script for manual releases - Remove obsolete REST API implementation - Deleted /api/ folder and all related files - Removed build-api.yml workflow and API generator plugin - Cleaned up _scripts/ folder and automation scripts - Improve UI for deprecated tools - Add light red background (#ffebee) for deprecated tags - JavaScript to automatically wrap deprecated text - CSS styling with pill appearance - Update documentation - Simplified MCP server README (removed API references) - Updated npm package documentation with clear installation instructions - Removed redundant local install section 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 03dbbff commit 1164313

File tree

213 files changed

+6472
-16978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+6472
-16978
lines changed

.github/workflows/build-api.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/publish-npm.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version to publish (e.g., 1.0.0)'
11+
required: true
12+
default: '1.0.0'
13+
14+
jobs:
15+
publish:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
id-token: write
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '18'
29+
registry-url: 'https://registry.npmjs.org'
30+
scope: '@drupaltools'
31+
32+
- name: Install dependencies
33+
run: |
34+
cd mcp-package
35+
npm install
36+
37+
- name: Build the package
38+
run: |
39+
cd mcp-package
40+
npm run build
41+
42+
- name: Run tests
43+
run: |
44+
cd mcp-package
45+
npm test
46+
47+
- name: Determine version
48+
id: version
49+
run: |
50+
if [[ "${{ github.ref_type }}" == "tag" ]]; then
51+
VERSION=${{ github.ref_name }}
52+
VERSION=${VERSION#v} # Remove 'v' prefix if present
53+
else
54+
VERSION=${{ github.event.inputs.version }}
55+
fi
56+
echo "version=$VERSION" >> $GITHUB_OUTPUT
57+
echo "Publishing version: $VERSION"
58+
59+
- name: Update package version
60+
run: |
61+
cd mcp-package
62+
npm version ${{ steps.version.outputs.version }} --no-git-tag-version
63+
cd dist
64+
npm version ${{ steps.version.outputs.version }} --no-git-tag-version
65+
66+
- name: Publish to npm
67+
run: |
68+
cd mcp-package/dist
69+
npm publish
70+
env:
71+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
72+
73+
- name: Create GitHub Release
74+
if: github.ref_type == 'tag'
75+
uses: actions/create-release@v1
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
with:
79+
tag_name: ${{ github.ref_name }}
80+
release_name: Release ${{ github.ref_name }}
81+
draft: false
82+
prerelease: false
83+
body: |
84+
## Changes in ${{ github.ref_name }}
85+
86+
This release updates the @drupaltools/mcp npm package with the latest Drupal tools data.
87+
88+
### Installation
89+
```bash
90+
npx @drupaltools/mcp@${{ steps.version.outputs.version }}
91+
```
92+
93+
### Claude Desktop Configuration
94+
```json
95+
{
96+
"mcpServers": {
97+
"drupaltools": {
98+
"type": "stdio",
99+
"command": "npx",
100+
"args": ["@drupaltools/mcp@${{ steps.version.outputs.version }}"]
101+
}
102+
}
103+
}
104+
```

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ node_modules/
88
package-lock.json
99

1010
# Generated files (these are built, not edited)
11-
# Note: api/data/ is committed as it's needed for GitHub Pages
1211
drupaltools.log
1312
*.log
1413
.DS_Store

AUTOMATION.md

Lines changed: 0 additions & 107 deletions
This file was deleted.

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2017 TheodorosPloumis
1+
Copyright 2017 - 2025 TheodorosPloumis
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

_plugins/api_generator.rb

Lines changed: 0 additions & 57 deletions
This file was deleted.

_sass/_layout.scss

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,36 @@ th {
499499
display: none;
500500
}
501501

502+
// Style for deprecated items
503+
.deprecated {
504+
background-color: #ffebee !important;
505+
color: #c62828 !important;
506+
padding: 2px 6px;
507+
border-radius: 12px;
508+
font-size: 11px;
509+
font-weight: 500;
510+
display: inline-block;
511+
margin-right: 4px;
512+
}
513+
514+
.deprecated-link {
515+
background-color: #ffebee;
516+
color: #c62828;
517+
padding: 2px 6px;
518+
border-radius: 12px;
519+
font-size: 11px;
520+
font-weight: 500;
521+
display: inline-block;
522+
text-decoration: none;
523+
524+
&:hover,
525+
&:focus {
526+
background-color: #ffcdd2 !important;
527+
color: #b71c1c !important;
528+
text-decoration: none;
529+
}
530+
}
531+
502532
.js-more {
503533
display: block;
504534
background-color: #ddd;

0 commit comments

Comments
 (0)