You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mcp-server/README.md
+69-10Lines changed: 69 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,66 @@ This is an auth-less Model Context Protocol (MCP) server designed to run on Clou
6
6
7
7
This server acts as a backend component, enabling integrations that require dynamic access to specific coding guidelines or standards.
8
8
9
-
## 2. Project Scope & Functionality
9
+
## 2. Available MCP Tools
10
+
11
+
This server exposes the following tools according to the Model Context Protocol (MCP). These tools allow AI assistants or clients to discover and retrieve AI coding rules.
12
+
13
+
### 2.1 `listAvailableRules`
14
+
15
+
***Description**: Lists all available rule sets (libraries) that can be fetched. It returns the unique `identifier` for each rule set, its `name`, and its categorical `stack`.
16
+
***Input**: None.
17
+
***Output Schema**: The tool returns a JSON object structured like this:
18
+
```json
19
+
{
20
+
"availableLibraries": [
21
+
{
22
+
"identifier": "string", // e.g., "ASP_NET"
23
+
"name": "string", // e.g., "ASP.NET"
24
+
"stack": ["string"] // e.g., ["Backend", ".NET"]
25
+
},
26
+
{
27
+
"identifier": "SPRING_BOOT",
28
+
"name": "Spring Boot",
29
+
"stack": ["Backend", "Java"]
30
+
}
31
+
// ... other libraries
32
+
],
33
+
"reminder": "string"// e.g., "Use the 'getRuleContent' tool..."
34
+
}
35
+
```
36
+
* **Example Interaction**: An AI assistant calls this tool. The response provides the structured list. The assistant might then present this list to the user, potentially using the `stack` for grouping (e.g., showing Backend > .NET > ASP_NET).
37
+
38
+
### 2.2 `getRuleContent`
39
+
40
+
* **Description**: Retrieves the specific set of AI coding rules for a given library identifier.
3. Assistant presents the rules from the `rules` array to the user, potentially formatting them as requested (e.g., as a Markdown list).
67
+
68
+
## 3. Project Scope & Functionality
10
69
11
70
- **MCP Implementation**: Adheres to the Model Context Protocol standard.
12
71
- **Cloudflare Worker**: Designed to be deployed and run efficiently on the Cloudflare edge network.
@@ -17,7 +76,7 @@ This server acts as a backend component, enabling integrations that require dyna
17
76
- `getRuleContent`: Takes a library identifier and returns the specific set of rules associated with it. Reads data from `preparedRules.json` via `src/data/rulesProvider.ts`.
18
77
- **(Potential) Tool Customization**: The original template README mentioned customizing tools in `src/index.ts`. Refer to that file for details on adding or modifying tools.
19
78
20
-
## 3. Using the MCP Server
79
+
## 4. Using the MCP Server
21
80
22
81
### Production Usage (Recommended)
23
82
@@ -65,7 +124,7 @@ After configuring, restart your editor. The `listAvailableRules` and `getRuleCon
65
124
66
125
This setup is useful for developing or modifying the MCP server itself.
67
126
68
-
**Endpoint:** `http://localhost:8787/sse` (available after running `npm run dev` in the `mcp-server` directory, see Section 5).
127
+
**Endpoint:** `http://localhost:8787/sse` (available after running `npm run dev` in the `mcp-server` directory, see Section 7).
69
128
70
129
**Connecting Clients:**
71
130
@@ -75,7 +134,7 @@ This setup is useful for developing or modifying the MCP server itself.
75
134
76
135
Use the **MCP Inspector** pointed at the local URL (`http://localhost:8787/sse`) to debug tool calls during development.
77
136
78
-
## 4. Tech Stack
137
+
## 5. Tech Stack
79
138
80
139
- **Runtime**: Cloudflare Workers
81
140
- **Language**: TypeScript
@@ -88,7 +147,7 @@ Use the **MCP Inspector** pointed at the local URL (`http://localhost:8787/sse`)
88
147
- **Linting & Formatting**:
89
148
- `biome`: Used for code formatting and linting.
90
149
91
-
## 5. Getting Started Locally
150
+
## 6. Getting Started Locally
92
151
93
152
### Prerequisites
94
153
@@ -121,7 +180,7 @@ Use the **MCP Inspector** pointed at the local URL (`http://localhost:8787/sse`)
121
180
```
122
181
The server will typically be available at `http://localhost:8787`. The MCP endpoint is usually `/sse` (e.g., `http://localhost:8787/sse`).
123
182
124
-
## 6. Available Scripts
183
+
## 7. Available Scripts
125
184
126
185
The following scripts are available via `npm run <script_name>`:
127
186
@@ -132,7 +191,7 @@ The following scripts are available via `npm run <script_name>`:
132
191
- `lint:fix`: Lints the code using Biome and attempts to automatically fix issues.
133
192
- `cf-typegen`: Generates TypeScript types for Cloudflare environment bindings (like KV namespaces, Durable Objects, etc., if configured).
134
193
135
-
## 7. Deployment
194
+
## 8. Deployment
136
195
137
196
This project uses GitHub Actions for Continuous Integration and Continuous Deployment (CI/CD).
138
197
@@ -151,18 +210,18 @@ For the deployment to succeed, the following secrets must be configured in the G
151
210
- `CLOUDFLARE_WORKER_TOKEN`: An API token with permissions to deploy Cloudflare Workers.
152
211
- `CLOUDFLARE_ACCOUNT_ID`: Your Cloudflare account ID.
153
212
154
-
## 8. Planned Features
213
+
## 9. Planned Features
155
214
156
215
The following features are planned for future development:
157
216
158
217
- **Create Cursor Rule Tool:** An MCP tool that allows creating or modifying a Cursor AI rule file directly within the user's host workspace.
159
218
- **Propose Rule via PR Tool:** An MCP tool enabling users to select a rule or modification from their host environment and automatically create a Pull Request in the main repository to propose adding/updating it.
0 commit comments