@deriv-com/fe-mcp-servers 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -0
- package/dist/shift-ai/README.md +186 -0
- package/dist/shift-ai/package-lock.json +1053 -0
- package/dist/shift-ai/package.json +19 -0
- package/dist/shift-ai/src/mcp-server.js +112 -0
- package/dist/shift-ai/src/mcp.js +96 -0
- package/dist/shift-ai/src/test-mcp.js +66 -0
- package/package.json +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Front-End MCP Servers Repository
|
|
2
|
+
|
|
3
|
+
A centralized repository for Front-End Model Context Protocol (MCP) servers, designed for reusability, standardization, and easy integration across projects.
|
|
4
|
+
|
|
5
|
+
## 📋 Overview
|
|
6
|
+
|
|
7
|
+
This repository serves as a collection of MCP servers specifically tailored for front-end development workflows. Each MCP server is organized in its own directory with comprehensive documentation and standardized structure to ensure consistency and ease of use.
|
|
8
|
+
|
|
9
|
+
## 🏗️ Repository Structure
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
fe-mcp-servers/
|
|
13
|
+
├── README.md # This file - main repository documentation
|
|
14
|
+
├── server-name-1/ # Individual MCP server directory
|
|
15
|
+
│ ├── README.md # Server-specific documentation
|
|
16
|
+
│ ├── src/ # Source code
|
|
17
|
+
│ ├── package.json # Dependencies and scripts
|
|
18
|
+
│ └── ... # Other server files
|
|
19
|
+
├── server-name-2/ # Another MCP server
|
|
20
|
+
│ ├── README.md
|
|
21
|
+
│ └── ...
|
|
22
|
+
└── docs/ # Additional documentation (optional)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 📚 MCP Server Standards
|
|
26
|
+
|
|
27
|
+
Each MCP server in this repository must follow these standards:
|
|
28
|
+
|
|
29
|
+
### Directory Structure
|
|
30
|
+
- **One directory per MCP server**
|
|
31
|
+
- **Descriptive, kebab-case naming** (e.g., `ui-component-generator`, `css-utility-server`)
|
|
32
|
+
- **Self-contained** - all dependencies and configuration within the directory
|
|
33
|
+
|
|
34
|
+
### Required Files
|
|
35
|
+
Each MCP server directory **must** include:
|
|
36
|
+
|
|
37
|
+
1. **README.md** - Comprehensive documentation (see template below)
|
|
38
|
+
2. **package.json** - Node.js dependencies and metadata
|
|
39
|
+
3. **src/** directory - Source code and implementation
|
|
40
|
+
4. **Configuration files** - Any necessary config files (tsconfig.json, etc.)
|
|
41
|
+
|
|
42
|
+
### README.md Template
|
|
43
|
+
|
|
44
|
+
Each server's README.md should include:
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
# [Server Name]
|
|
48
|
+
|
|
49
|
+
Brief description of what this MCP server does.
|
|
50
|
+
|
|
51
|
+
## Features
|
|
52
|
+
- Feature 1
|
|
53
|
+
- Feature 2
|
|
54
|
+
- Feature 3
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
Instructions for installing and setting up the server.
|
|
58
|
+
|
|
59
|
+
## Configuration
|
|
60
|
+
Configuration options and examples.
|
|
61
|
+
|
|
62
|
+
## Usage
|
|
63
|
+
How to use the server, including:
|
|
64
|
+
- Available tools/functions
|
|
65
|
+
- Example requests and responses
|
|
66
|
+
- Integration examples
|
|
67
|
+
|
|
68
|
+
## API Reference
|
|
69
|
+
Detailed documentation of available functions.
|
|
70
|
+
|
|
71
|
+
## Examples
|
|
72
|
+
Practical usage examples and code snippets.
|
|
73
|
+
|
|
74
|
+
## Contributing
|
|
75
|
+
Guidelines for contributing to this specific server.
|
|
76
|
+
|
|
77
|
+
## License
|
|
78
|
+
License information.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 🚀 Getting Started
|
|
82
|
+
|
|
83
|
+
### For Users
|
|
84
|
+
1. Browse the available MCP servers in this repository
|
|
85
|
+
2. Navigate to the server directory you're interested in
|
|
86
|
+
3. Follow the installation and usage instructions in that server's README.md
|
|
87
|
+
|
|
88
|
+
### For Contributors
|
|
89
|
+
1. Fork this repository
|
|
90
|
+
2. Create a new directory for your MCP server
|
|
91
|
+
3. Follow the standardization guidelines above
|
|
92
|
+
4. Ensure your server includes comprehensive documentation
|
|
93
|
+
5. Submit a pull request
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# ShiftAI MCP Server
|
|
2
|
+
|
|
3
|
+
An MCP (Model Context Protocol) server that provides AI code provenance tracking through simple comment markers. This tool helps maintain transparency and traceability of AI-generated code across different programming languages.
|
|
4
|
+
|
|
5
|
+
## 🎯 Features
|
|
6
|
+
|
|
7
|
+
- **Universal Code Wrapping**: Supports JavaScript, TypeScript, Python, CSS, HTML, and more
|
|
8
|
+
- **Simple Comment Markers**: Uses language-appropriate comment syntax for wrapping
|
|
9
|
+
- **AI Code Provenance**: Enables automated detection and tracking of AI-generated code
|
|
10
|
+
- **MCP Protocol**: Full compatibility with MCP-enabled AI tools and IDEs
|
|
11
|
+
- **Zero Configuration**: Works out of the box with sensible defaults
|
|
12
|
+
- **Language Detection**: Automatically applies correct comment syntax for each file type
|
|
13
|
+
|
|
14
|
+
## 🚀 Usage
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"mcpServers": {
|
|
19
|
+
"shiftai": {
|
|
20
|
+
"command": "node",
|
|
21
|
+
"args": ["https://cdn.jsdelivr.net/npm/@deriv-com/fe-mcp-servers@latest/dist/shift-ai/src/mcp-server.js"]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## ⚙️ Configuration Examples
|
|
28
|
+
|
|
29
|
+
### Cursor IDE
|
|
30
|
+
|
|
31
|
+
Add to your `cursor-settings.json`:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"mcpServers": {
|
|
36
|
+
"shiftai": {
|
|
37
|
+
"command": "node",
|
|
38
|
+
"args": ["https://cdn.jsdelivr.net/npm/@deriv-com/fe-mcp-servers@latest/dist/shift-ai/src/mcp-server.js"]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Claude Desktop
|
|
45
|
+
|
|
46
|
+
Add to your `claude_desktop_config.json`:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"shiftai": {
|
|
52
|
+
"command": "node",
|
|
53
|
+
"args": ["https://cdn.jsdelivr.net/npm/@deriv-com/fe-mcp-servers@latest/dist/shift-ai/src/mcp-server.js"]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 🚀 Usage
|
|
60
|
+
|
|
61
|
+
Once configured, you can use the `shai` tool in your AI conversations:
|
|
62
|
+
|
|
63
|
+
### Simple Usage
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
shai: refactor this button component
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
shai: create a login form with validation
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
shai: optimize this database query function
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### With Context
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
shai: add error handling to this API call function:
|
|
81
|
+
|
|
82
|
+
function fetchUserData(userId) {
|
|
83
|
+
return fetch(`/api/users/${userId}`).then(res => res.json());
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### For Code Reviews
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
shai: suggest improvements for this React component and wrap with proper markers
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## 🔧 API Reference
|
|
94
|
+
|
|
95
|
+
### `shai` Tool
|
|
96
|
+
|
|
97
|
+
Generates code wrapped according to AI code provenance rules.
|
|
98
|
+
|
|
99
|
+
**Parameters:**
|
|
100
|
+
|
|
101
|
+
- `prompt` (string, required): The instruction or prompt for code generation
|
|
102
|
+
- `code` (string, optional): Existing code to be wrapped with AI markers
|
|
103
|
+
|
|
104
|
+
**Returns:**
|
|
105
|
+
|
|
106
|
+
- Formatted instructions with examples for proper AI code wrapping
|
|
107
|
+
|
|
108
|
+
## 📋 Comment Formats by Language
|
|
109
|
+
|
|
110
|
+
| Language/File Type | Wrapper Format |
|
|
111
|
+
| --------------------- | -------------------------------------------------- |
|
|
112
|
+
| JavaScript/TypeScript | `// [AI]`<br/>code here<br/>`// [/AI]` |
|
|
113
|
+
| Python/Shell/Ruby | `# [AI]`<br/>code here<br/>`# [/AI]` |
|
|
114
|
+
| CSS/SCSS/Sass/Less | `/* [AI]`<br/>code here<br/>`[/AI] */` |
|
|
115
|
+
| HTML/XML/Markdown | `<!-- [AI] -->`<br/>code here<br/>`<!-- [/AI] -->` |
|
|
116
|
+
|
|
117
|
+
## 💡 Examples
|
|
118
|
+
|
|
119
|
+
### JavaScript Example
|
|
120
|
+
|
|
121
|
+
```javascript
|
|
122
|
+
// [AI]
|
|
123
|
+
function fibonacci(n) {
|
|
124
|
+
const sequence = [0, 1];
|
|
125
|
+
for (let i = 2; i < n; i++) {
|
|
126
|
+
sequence[i] = sequence[i - 1] + sequence[i - 2];
|
|
127
|
+
}
|
|
128
|
+
return sequence.slice(0, n);
|
|
129
|
+
}
|
|
130
|
+
// [/AI]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Python Example
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
# [AI]
|
|
137
|
+
def fibonacci(n):
|
|
138
|
+
sequence = [0, 1]
|
|
139
|
+
for i in range(2, n):
|
|
140
|
+
sequence.append(sequence[i-1] + sequence[i-2])
|
|
141
|
+
return sequence[:n]
|
|
142
|
+
# [/AI]
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### CSS Example
|
|
146
|
+
|
|
147
|
+
```css
|
|
148
|
+
/* [AI] */
|
|
149
|
+
.fibonacci-result {
|
|
150
|
+
padding: 20px;
|
|
151
|
+
background: #f5f5f5;
|
|
152
|
+
border-radius: 8px;
|
|
153
|
+
margin: 10px 0;
|
|
154
|
+
}
|
|
155
|
+
/* [/AI] */
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### HTML Example
|
|
159
|
+
|
|
160
|
+
```html
|
|
161
|
+
<!-- [AI] -->
|
|
162
|
+
<div class="fibonacci-result">
|
|
163
|
+
<h2>Fibonacci Sequence</h2>
|
|
164
|
+
<p>Result: [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]</p>
|
|
165
|
+
</div>
|
|
166
|
+
<!-- [/AI] -->
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## 🎯 Key Rules
|
|
170
|
+
|
|
171
|
+
1. **Always use the correct comment syntax** for the file type
|
|
172
|
+
2. **The code inside the wrapper must be actual code**, not commented out
|
|
173
|
+
3. **Use simple opening and closing markers** - no complex metadata required
|
|
174
|
+
4. **Consistent formatting** - opening marker on its own line, closing marker on its own line
|
|
175
|
+
|
|
176
|
+
### Project Structure
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
shift-ai/
|
|
180
|
+
├── src/
|
|
181
|
+
│ ├── mcp.js # Core shai function logic
|
|
182
|
+
│ ├── mcp-server.js # MCP server implementation
|
|
183
|
+
│ └── test-mcp.js # Test suite
|
|
184
|
+
├── package.json # Project configuration
|
|
185
|
+
└── README.md # This documentation
|
|
186
|
+
```
|