MonoGame MCP Server
Provides AI-powered tools for MonoGame development, including API documentation lookup, project management, and code scaffolding. It enables users to create, build, and diagnose projects through integrated dotnet and content pipeline automation.
README
MonoGame MCP Server
A Model Context Protocol (MCP) server for the MonoGame framework. It provides AI-powered documentation lookup, project management, code scaffolding, and diagnostic tools for MonoGame development.
Quick Start
- Install prerequisites (.NET SDK 8.0 and MonoGame templates).
- Configure your MCP client (like Claude Desktop) to use
npx monogame-mcp. - Restart your client and start building MonoGame projects.
Prerequisites
- Node.js: version 18 or higher.
- .NET SDK 8.0: Required for building and running projects. Verify with
dotnet --version. - MonoGame Templates: Install with
dotnet new install MonoGame.Templates.CSharp. - MGCB Tool: Install for content builds with
dotnet tool install -g dotnet-mgcb.
Installation
Using npx (Recommended)
You can run the server directly without local installation:
npx monogame-mcp
Global Installation
npm install -g monogame-mcp
Docker
docker run -i monogame-mcp
Configuration
Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"monogame-mcp": {
"command": "npx",
"args": ["-y", "monogame-mcp"]
}
}
}
If using Docker:
{
"mcpServers": {
"monogame-mcp": {
"command": "docker",
"args": ["run", "-i", "monogame-mcp"]
}
}
}
Available Tools
| Tool Name | Description | Example Usage |
|---|---|---|
monogame_api_lookup |
Search MonoGame API documentation for classes, methods, and properties | { "query": "SpriteBatch" } |
monogame_create_project |
Create a new MonoGame project using dotnet templates | { "projectName": "MyGame", "template": "desktopgl" } |
monogame_manage_content |
Add, remove, or configure assets in a .mgcb content project | { "action": "add", "mgcbPath": "Content.mgcb", "assetPath": "player.png" } |
monogame_build_content |
Build MonoGame content using MGCB CLI | { "mgcbPath": "Content/Content.mgcb" } |
monogame_scaffold_code |
Generate MonoGame C# code from predefined templates | { "template": "game-class", "className": "MainGame" } |
monogame_diagnose_error |
Diagnose MonoGame error messages and suggest fixes | { "errorMessage": "Could not find ContentTypeReader" } |
monogame_build_run |
Build or run MonoGame projects using dotnet CLI | { "action": "run", "projectPath": "MyGame.csproj" } |
Available Resources
| URI Template | Description | Example URI |
|---|---|---|
monogame://api/{className} |
API reference documentation for MonoGame classes | monogame://api/Texture2D |
monogame://examples/{topic} |
Code examples and tutorials for development | monogame://examples/sprite-animation |
monogame://content-pipeline/{topic} |
Documentation for the Content Pipeline | monogame://content-pipeline/overview |
monogame://platforms/{platform} |
Platform-specific guides | monogame://platforms/android |
Available Prompts
| Prompt Name | Arguments | Description |
|---|---|---|
monogame_code_review |
code (required), focus |
Review C# code for MonoGame best practices |
monogame_troubleshoot |
error (required), code, platform |
Troubleshoot errors and exceptions |
monogame_architecture |
gameType (required), features, scale |
Plan game architecture and organization |
monogame_implement_feature |
feature (required), existingCode, platform |
Step-by-step feature implementation guidance |
Examples
1. Creating a New Project
Tell the AI: "Create a new MonoGame DesktopGL project named SpaceExplorer, add a background.png texture to content, and build it."
The AI will use monogame_create_project, then monogame_manage_content, and finally monogame_build_content.
2. Learning the API
Ask: "How do I use SpriteBatch to draw a scaled texture?"
The AI will use monogame_api_lookup or read monogame://api/SpriteBatch to provide exact parameters and code.
3. Fixing Errors
If you get an error: "ContentLoadException: The content file was not found."
Provide the error to the AI. It will use monogame_diagnose_error to identify that you likely missed adding the asset to your .mgcb file or have a path mismatch.
4. Scaffolding and Running
Ask: "Generate a scene manager class for my game and then try to run the project."
The AI will use monogame_scaffold_code with the scene-manager template, then monogame_build_run with the run action.
Development
- Clone the repository.
- Install dependencies:
npm install - Build the project:
npm run build - Run tests:
npm test - Link for local testing:
npm link
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。