BootstrapBlazor.Copilot.MCPServer is a Model Context Protocol (MCP) server designed to give AI assistants access to BootstrapBlazor component documentation and source code. It helps AI tools provide more accurate guidance when working with BootstrapBlazor components by offering documentation, source code, and usage examples.
Before installing the MCP server, ensure you have:
git clone https://github.com/your-repo/BootstrapBlazor.Copilot.MCPServer.git
cd BootstrapBlazor.Copilot.MCPServer
dotnet restore
You can run the service using either .NET Aspire (recommended) or directly:
# Using Aspire (recommended)
dotnet run --project BootstrapBlazor.Copilot.MCPServer.AppHost
# Or run the main project directly
dotnet run --project BootstrapBlazor.Copilot.MCPServer
The service runs on http://localhost:3001 by default and provides the following endpoints:
/health
- Health check/alive
- Liveness checkConfigure the server by modifying the appsettings.json
file:
{
"McpToolConfig": {
"ServerUrl": "http://localhost:3001"
},
"GitRepository": {
"LocalPath": "C:\\temp\\BootstrapBlazorRepo" // Optional: custom local repository path
}
}
This tool returns names and descriptions of all BootstrapBlazor components:
ListComponents()
Retrieve a list of source code files and example files for a specific component:
GetComponentFiles("Button")
Fetch the content of a specific file:
GetFileContent({
"ComponentName": "Button",
"FileName": "Button.razor.cs",
"Category": "Source" // Source or Example
})
To integrate with GitHub Copilot:
Add to Claude Desktop configuration file:
{
"mcpServers": {
"bootstrapblazor": {
"command": "dotnet",
"args": ["run", "--project", "path/to/BootstrapBlazor.Copilot.MCPServer"],
"env": {
"ASPNETCORE_ENVIRONMENT": "Production"
}
}
}
}
Git repository clone failure
MCP connection failure
Component files not found
Enable detailed logging in development environment by updating your configuration:
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"BootstrapBlazor.Copilot.MCPServer": "Trace"
}
}
}
The server provides health check endpoints:
/health
- Complete health check/alive
- Basic liveness checkTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "bootstrapblazor" '{"command":"dotnet","args":["run","--project","BootstrapBlazor.Copilot.MCPServer"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"bootstrapblazor": {
"command": "dotnet",
"args": [
"run",
"--project",
"BootstrapBlazor.Copilot.MCPServer"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"bootstrapblazor": {
"command": "dotnet",
"args": [
"run",
"--project",
"BootstrapBlazor.Copilot.MCPServer"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect