Agent8 MCP Server
Provides tools for searching Agent8 game development code examples and system prompts to assist in Agent8 SDK development.
README
MCP Server for Agent8
A server implementing the Model Context Protocol (MCP) to support Agent8 SDK development. Developed with TypeScript and pnpm, supporting stdio and SSE transports.
Features
This Agent8 MCP Server implements the following MCP specification capabilities:
Prompts
- System Prompt for Agent8 SDK: Provides optimized guidelines for Agent8 SDK development through the
system-prompt-for-agent8-sdkprompt template.
Tools
- Code Examples Search: Retrieves relevant Agent8 game development code examples from a vector database using the
search_code_examplestool.
Installation
# Install dependencies
pnpm install
# Build
pnpm build
Using Docker
You can run this application using Docker in several ways:
Option 1: Pull from GitHub Container Registry (Recommended)
# Pull the latest image
docker pull ghcr.io/planetarium/mcp-agent8:latest
# Run the container
docker run -p 3333:3333 --env-file .env ghcr.io/planetarium/mcp-agent8:latest
Option 2: Build Locally
# Build the Docker image
docker build -t agent8-mcp-server .
# Run the container with environment variables
docker run -p 3333:3333 --env-file .env agent8-mcp-server
Docker Environment Configuration
There are three ways to configure environment variables when running with Docker:
-
Using
--env-file(Recommended):# Create and configure your .env file first cp .env.example .env nano .env # Run with .env file docker run -p 3000:3000 --env-file .env agent8-mcp-server -
Using individual
-eflags:docker run -p 3000:3000 \ -e SUPABASE_URL=your_supabase_url \ -e SUPABASE_SERVICE_ROLE_KEY=your_service_role_key \ -e OPENAI_API_KEY=your_openai_api_key \ -e MCP_TRANSPORT=sse \ -e PORT=3000 \ -e LOG_LEVEL=info \ agent8-mcp-server -
Using Docker Compose (for development/production setup):
The project includes a pre-configured
docker-compose.ymlfile with:- Automatic port mapping from .env configuration
- Environment variables loading
- Volume mounting for data persistence
- Container auto-restart policy
- Health check configuration
To run the server:
docker compose upTo run in detached mode:
docker compose up -d
Required Environment Variables:
SUPABASE_URL: Supabase URL for database connectionSUPABASE_SERVICE_ROLE_KEY: Supabase service role key for authenticationOPENAI_API_KEY: OpenAI API key for AI functionality
The Dockerfile uses a multi-stage build process to create a minimal production image:
- Uses Node.js 20 Alpine as the base image for smaller size
- Separates build and runtime dependencies
- Only includes necessary files in the final image
- Exposes port 3000 by default
Usage
Command Line Options
# View help
pnpm start --help
# View version information
pnpm start --version
Supported options:
--debug: Enable debug mode--transport <type>: Transport type (stdio or sse), default: stdio--port <number>: Port to use for SSE transport, default: 3000--log-destination <dest>: Log destination (stdout, stderr, file, none)--log-file <path>: Path to log file (when log-destination is file)--log-level <level>: Log level (debug, info, warn, error), default: info--env-file <path>: Path to .env file
Using Environment Variables
The server supports configuration via environment variables, which can be set directly or via a .env file.
- Create a
.envfile in the project root (see.env.examplefor reference):
# Copy the example file
cp .env.example .env
# Edit the .env file with your settings
nano .env
- Run the server (it will automatically load the
.envfile):
pnpm start
- Or specify a custom path to the
.envfile:
pnpm start --env-file=/path/to/custom/.env
Configuration Priority
The server uses the following priority order when determining configuration values:
- Command line arguments (highest priority)
- Environment variables (from
.envfile or system environment) - Default values (lowest priority)
This allows you to set baseline configuration in your .env file while overriding specific settings via command line arguments when needed.
Supported Environment Variables
| Variable | Description | Default |
|---|---|---|
| MCP_TRANSPORT | Transport type (stdio or sse) | stdio |
| PORT | Port to use for SSE transport | 3000 |
| LOG_LEVEL | Log level (debug, info, warn, error) | info |
| LOG_DESTINATION | Log destination (stdout, stderr, file, none) | stderr (for stdio transport), stdout (for sse transport) |
| LOG_FILE | Path to log file (when LOG_DESTINATION is file) | (none) |
| DEBUG | Enable debug mode (true/false) | false |
| SUPABASE_URL | Supabase URL for database connection | (required) |
| SUPABASE_SERVICE_ROLE_KEY | Supabase service role key for authentication | (required) |
| OPENAI_API_KEY | OpenAI API key for AI functionality | (required) |
Using Stdio Transport
# Build and run
pnpm build
pnpm start --transport=stdio
Using SSE Transport
# Build and run (default port: 3000)
pnpm build
pnpm start --transport=sse --port=3000
Debug Mode
# Run in debug mode
pnpm start --debug
Available Prompts
systemprompt-agent8-sdk
Client Integration
Using with Claude Desktop
- Add the following to Claude Desktop configuration file (
claude_desktop_config.json):
{
"mcpServers": {
"Agent8": {
"command": "npx",
"args": ["--yes", "agent8-mcp-server"]
}
}
}
- Restart Claude Desktop
Adding New Prompts
Add new prompts to the registerSamplePrompts method in the src/prompts/provider.ts file.
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 模型以安全和受控的方式获取实时的网络信息。