Skip to content

Commit 8f71ec3

Browse files
committed
feat: add Microsoft Learn Docs Search MCP server to marketplace
- Add marketplace item definition for Microsoft Learn Docs Search MCP server - Include comprehensive documentation for adding MCP servers to marketplace - Add test case to validate the MCP server format - Provide example YAML configuration for the server Resolves #6354
1 parent b117c0f commit 8f71ec3

File tree

3 files changed

+199
-0
lines changed

3 files changed

+199
-0
lines changed

docs/MARKETPLACE_MCP_SERVERS.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Adding MCP Servers to the Roo Code Marketplace
2+
3+
This document explains how to add new MCP (Model Context Protocol) servers to the Roo Code marketplace.
4+
5+
## Overview
6+
7+
The Roo Code marketplace allows users to discover and install MCP servers that extend the capabilities of the AI assistant. MCP servers provide additional tools and resources that can be used during conversations.
8+
9+
## MCP Server Marketplace Item Format
10+
11+
MCP servers in the marketplace follow a specific schema defined in `packages/types/src/marketplace.ts`. Here's the structure:
12+
13+
### Required Fields
14+
15+
- `id`: Unique identifier for the MCP server (kebab-case)
16+
- `name`: Human-readable name
17+
- `description`: Detailed description of what the server does
18+
- `type`: Must be `"mcp"`
19+
- `url`: GitHub repository URL or official documentation URL
20+
- `content`: JSON string containing the MCP server configuration
21+
22+
### Optional Fields
23+
24+
- `author`: Author name
25+
- `authorUrl`: Author's website or GitHub profile
26+
- `tags`: Array of relevant tags for discovery
27+
- `prerequisites`: Array of requirements (e.g., API keys, software)
28+
29+
## Example: Microsoft Learn Docs Search MCP Server
30+
31+
Here's a complete example of how to define the Microsoft Learn Docs Search MCP server:
32+
33+
```yaml
34+
items:
35+
- id: "microsoft-learn-docs-search"
36+
name: "Microsoft Learn Docs Search"
37+
description: "Official Microsoft documentation search and retrieval server. Access trusted, up-to-date information from Microsoft Learn, Azure docs, Microsoft 365 docs, and other official Microsoft sources using semantic search."
38+
author: "Microsoft"
39+
authorUrl: "https://github.com/MicrosoftDocs"
40+
url: "https://github.com/MicrosoftDocs/mcp"
41+
tags: ["microsoft", "documentation", "search", "azure", "dotnet", "official"]
42+
prerequisites: []
43+
content: |
44+
{
45+
"microsoft-learn-docs": {
46+
"type": "streamable-http",
47+
"url": "https://learn.microsoft.com/api/mcp"
48+
}
49+
}
50+
```
51+
52+
## MCP Server Configuration Types
53+
54+
The `content` field contains the actual MCP server configuration that will be added to the user's `.roo/mcp.json` file. Different types of MCP servers use different configuration formats:
55+
56+
### Remote HTTP MCP Servers
57+
58+
For cloud-hosted MCP servers that use HTTP:
59+
60+
```json
61+
{
62+
"server-name": {
63+
"type": "streamable-http",
64+
"url": "https://example.com/api/mcp"
65+
}
66+
}
67+
```
68+
69+
### Local MCP Servers
70+
71+
For locally installed MCP servers:
72+
73+
```json
74+
{
75+
"server-name": {
76+
"command": "node",
77+
"args": ["path/to/server.js"]
78+
}
79+
}
80+
```
81+
82+
### NPM Package MCP Servers
83+
84+
For MCP servers distributed as npm packages:
85+
86+
```json
87+
{
88+
"server-name": {
89+
"command": "npx",
90+
"args": ["-y", "package-name"]
91+
}
92+
}
93+
```
94+
95+
## Key Features of the Microsoft Learn Docs MCP Server
96+
97+
The Microsoft Learn Docs Search MCP server provides:
98+
99+
- **Semantic Search**: Advanced vector search through Microsoft's official documentation
100+
- **Comprehensive Coverage**: Access to Microsoft Learn, Azure docs, Microsoft 365 docs, and more
101+
- **Real-time Updates**: Always up-to-date with the latest Microsoft documentation
102+
- **High-Quality Results**: Returns up to 10 relevant content chunks with article titles and URLs
103+
- **Official Source**: Maintained by Microsoft for accuracy and reliability
104+
105+
### Available Tools
106+
107+
- `microsoft_docs_search`: Performs semantic search against Microsoft official technical documentation
108+
109+
### Example Usage
110+
111+
Once installed, users can ask questions like:
112+
113+
- "Give me the Azure CLI commands to create an Azure Container App with a managed identity. Search Microsoft docs"
114+
- "Are you sure this is the right way to implement IHttpClientFactory in a .NET 8 minimal API? Search Microsoft docs"
115+
- "Is gpt-4.1-mini available in EU regions? Search Microsoft docs"
116+
117+
## Testing Your MCP Server Definition
118+
119+
Before submitting a marketplace item, ensure it follows the correct format by:
120+
121+
1. Validating against the TypeScript schema in `packages/types/src/marketplace.ts`
122+
2. Adding a test case in `src/services/marketplace/__tests__/MarketplaceManager.spec.ts`
123+
3. Running the marketplace tests: `cd src && npx vitest run services/marketplace/__tests__/MarketplaceManager.spec.ts`
124+
125+
## Submission Process
126+
127+
Since the marketplace data is served from an external API, new MCP servers need to be added through the appropriate channels:
128+
129+
1. Create a properly formatted marketplace item definition
130+
2. Test the format using the existing test infrastructure
131+
3. Submit through the official Roo Code contribution process
132+
4. The marketplace team will review and add approved servers to the external API
133+
134+
## Best Practices
135+
136+
1. **Clear Descriptions**: Provide detailed descriptions of what the MCP server does
137+
2. **Relevant Tags**: Use appropriate tags for discoverability
138+
3. **Prerequisites**: List any requirements (API keys, software dependencies)
139+
4. **Official Sources**: Prefer official or well-maintained MCP servers
140+
5. **Testing**: Thoroughly test the MCP server configuration before submission
141+
6. **Documentation**: Include links to official documentation or setup guides
142+
143+
## Related Files
144+
145+
- `packages/types/src/marketplace.ts` - TypeScript schema definitions
146+
- `src/services/marketplace/` - Marketplace service implementation
147+
- `webview-ui/src/components/marketplace/` - UI components for marketplace
148+
- `src/services/marketplace/__tests__/` - Test files for validation
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Microsoft Learn Docs Search MCP Server
2+
# Example marketplace item definition for the Microsoft Learn Docs Search MCP Server
3+
# This demonstrates the proper format for adding MCP servers to the Roo Code marketplace
4+
5+
items:
6+
- id: "microsoft-learn-docs-search"
7+
name: "Microsoft Learn Docs Search"
8+
description: "Official Microsoft documentation search and retrieval server. Access trusted, up-to-date information from Microsoft Learn, Azure docs, Microsoft 365 docs, and other official Microsoft sources using semantic search."
9+
author: "Microsoft"
10+
authorUrl: "https://github.com/MicrosoftDocs"
11+
url: "https://github.com/MicrosoftDocs/mcp"
12+
tags: ["microsoft", "documentation", "search", "azure", "dotnet", "official"]
13+
prerequisites: []
14+
content: |
15+
{
16+
"microsoft-learn-docs": {
17+
"type": "streamable-http",
18+
"url": "https://learn.microsoft.com/api/mcp"
19+
}
20+
}

src/services/marketplace/__tests__/MarketplaceManager.spec.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,37 @@ describe("MarketplaceManager", () => {
223223
expect(manager["installer"].installItem).toHaveBeenCalledWith(item, { target: "project" })
224224
expect(result).toBe("/test/path/.roo/mcp.json")
225225
})
226+
227+
it("should install Microsoft Learn Docs MCP item", async () => {
228+
const item: MarketplaceItem = {
229+
id: "microsoft-learn-docs-search",
230+
name: "Microsoft Learn Docs Search",
231+
description:
232+
"Official Microsoft documentation search and retrieval server. Access trusted, up-to-date information from Microsoft Learn, Azure docs, Microsoft 365 docs, and other official Microsoft sources using semantic search.",
233+
type: "mcp",
234+
author: "Microsoft",
235+
authorUrl: "https://github.com/MicrosoftDocs",
236+
url: "https://github.com/MicrosoftDocs/mcp",
237+
tags: ["microsoft", "documentation", "search", "azure", "dotnet", "official"],
238+
content: JSON.stringify({
239+
"microsoft-learn-docs": {
240+
type: "streamable-http",
241+
url: "https://learn.microsoft.com/api/mcp",
242+
},
243+
}),
244+
}
245+
246+
// Mock the installer
247+
vi.spyOn(manager["installer"], "installItem").mockResolvedValue({
248+
filePath: "/test/path/.roo/mcp.json",
249+
line: 3,
250+
})
251+
252+
const result = await manager.installMarketplaceItem(item)
253+
254+
expect(manager["installer"].installItem).toHaveBeenCalledWith(item, { target: "project" })
255+
expect(result).toBe("/test/path/.roo/mcp.json")
256+
})
226257
})
227258

228259
describe("removeInstalledMarketplaceItem", () => {

0 commit comments

Comments
 (0)