Release 0.164.0: Enhanced AI Automation with Multi-Server MCP Integration

We’re excited to announce the release of Screeps GPT version 0.164.0, which introduces a powerful enhancement to our autonomous AI development infrastructure: comprehensive Model Context Protocol (MCP) server integration. This release significantly expands the capabilities of our GitHub Copilot agents, enabling them to access real-time game data, official documentation, community knowledge, and browser automation—all within a unified workflow execution environment.

Key Features

This release focuses on a single, high-impact enhancement:

  • Multi-Server MCP Configuration System: Added pre-configured MCP server definitions for Screeps API access, documentation, wiki knowledge, and browser automation
  • Flexible Workflow Integration: New additional-mcp-config parameter in copilot-exec action supports inline JSON, file references, and consolidated server configurations
  • Enhanced Strategic Planning: Updated strategic planner and daily Todo workflows to leverage all available MCP servers for comprehensive analysis

Technical Details

The Problem: Limited Context for AI Agents

Prior to this release, our GitHub Copilot agents operated with limited context during workflow execution. While they could analyze repository code and GitHub issues, they lacked direct access to:

  • Real-time Screeps game state (CPU usage, energy levels, room control levels)
  • Official Screeps API documentation for validation
  • Community wiki knowledge and best practices
  • Browser-based testing and verification capabilities

This limitation meant that strategic analysis, issue triage, and automated fixes often occurred without complete knowledge of the current game state or available resources, leading to less informed decisions.

The Solution: Model Context Protocol Integration

The Model Context Protocol (MCP) is an open standard that enables AI models to access external tools and data sources in a secure, standardized way. This release introduces five pre-configured MCP servers that extend our Copilot agents’ capabilities:

1. Screeps MCP Server (@ralphschuler/screeps-api-mcp)

Provides direct access to the Screeps game API, enabling agents to:

  • Execute console commands to query game state
  • Access Memory structures for historical data analysis
  • Retrieve performance metrics (CPU usage, bucket levels)
  • Query room and structure information

Implementation Location: .github/mcp/screeps-mcp.json (simplified) and .github/mcp/screeps-api.json (full configuration)

Why This Approach: We chose to create both simplified and full configurations to support different workflow needs. The simplified version (screeps-mcp.json) requires only essential environment variables (token and shard), making it easier to adopt in existing workflows. The full version provides additional configuration options for advanced use cases.

1
2
3
4
5
6
7
8
9
10
11
12
{
"mcpServers": {
"screeps-mcp": {
"command": "npx",
"args": ["-y", "@ralphschuler/screeps-api-mcp@latest"],
"env": {
"SCREEPS_TOKEN": "${SCREEPS_TOKEN}",
"SCREEPS_SHARD": "${SCREEPS_SHARD:-shard1}"
}
}
}
}

2. Screeps Documentation Server (@ralphschuler/screeps-docs-mcp)

Provides searchable access to official Screeps documentation, allowing agents to:

  • Search API reference documentation
  • Retrieve game mechanics specifications
  • Validate implementation patterns against official guidance

Implementation Location: .github/mcp/screeps-docs-mcp.json

Design Rationale: By embedding documentation access directly into workflows, agents can verify that code changes align with official API specifications without requiring manual lookup. This reduces the risk of implementing patterns that violate API contracts or rely on deprecated functionality.

3. Screeps Wiki Server (@ralphschuler/screeps-wiki-mcp)

Provides access to community knowledge from the Screeps wiki, enabling agents to:

  • Search strategic guides and best practices
  • Retrieve structured data from wiki tables
  • Access community-validated optimization patterns

Implementation Location: .github/mcp/screeps-wiki-mcp.json

Why Community Knowledge Matters: The Screeps wiki contains years of accumulated player knowledge, including CPU optimization techniques, creep body compositions, and strategic patterns. By giving agents access to this knowledge base, we enable them to make decisions informed by community best practices rather than reinventing solutions.

4. Playwright Server (@executeautomation/playwright-mcp-server)

Provides browser automation capabilities for:

  • Navigating web pages
  • Taking screenshots for verification
  • Executing browser-based testing

Implementation Location: .github/mcp/playwright.json

Use Case: This enables workflows to verify that documentation sites build correctly, test web-based interfaces, and capture visual evidence of functionality for issue tracking.

5. GitHub Server (Automatic)

The GitHub MCP server is automatically included by the copilot-exec action and provides:

  • Code search across repositories
  • Issue and pull request queries
  • Repository metadata access

Consolidated Configuration Architecture

Rather than requiring workflows to specify multiple individual MCP servers, we created a consolidated configuration file that includes all available servers:

Implementation Location: .github/mcp/all-servers.json

1
2
3
4
5
6
7
8
9
- name: Run Copilot with all MCP servers
uses: ./.github/actions/copilot-exec
env:
SCREEPS_TOKEN: ${{ secrets.SCREEPS_TOKEN }}
SCREEPS_SHARD: ${{ vars.SCREEPS_SHARD || 'shard1' }}
with:
copilot-token: ${{ secrets.COPILOT_TOKEN }}
prompt-path: .github/copilot/prompts/strategic-planner
additional-mcp-config: '@.github/mcp/all-servers.json'

Design Decision: This architectural choice balances flexibility with ease of use. Workflows that need maximum capability can reference all-servers.json, while specialized workflows can cherry-pick specific servers. The @ prefix syntax indicates a file path relative to the repository root.

Integration with Strategic Workflows

Two critical workflows now leverage the full MCP server suite:

1. Strategic Planner (copilot-strategic-planner.yml)

Updated to use all MCP servers for comprehensive strategic analysis. The planner can now:

  • Query current game state before creating optimization issues
  • Validate recommended patterns against official documentation
  • Cross-reference community best practices from the wiki
  • Make evidence-based decisions about infrastructure priorities

2. Daily Todo Workflow (copilot-todo-daily.yml)

Enhanced to access documentation and game state when prioritizing Todo issues. This enables:

  • Informed decision-making about which tasks to tackle first
  • Validation that proposed implementations align with current game state
  • Documentation-backed estimation of implementation complexity

Security and Safety Considerations

Isolation and Sandboxing: MCP servers run in isolated environments during workflow execution. Each server process is spawned independently with only the environment variables it requires, preventing cross-contamination of credentials.

Credential Management: The SCREEPS_TOKEN secret is required for Screeps API access but is never exposed in logs or configuration files. The token is passed via environment variables and is only accessible within the secure workflow execution context.

Package Integrity: MCP server packages are executed via npx -y, which verifies package signatures and ensures the latest stable versions are used. This prevents supply chain attacks while allowing packages to receive security updates automatically.

Read-Only by Default: All MCP servers operate in read-only mode for repository data. The Screeps MCP server can execute console commands, but these are limited to query operations defined in workflow prompts. No MCP server can modify repository code or settings.

Rate Limiting: Workflow schedules prevent excessive API calls. The strategic planner runs every 8 hours, while daily Todo processing runs once per day, ensuring we stay within Screeps API rate limits.

Impact on Development Workflow

Before This Release

When the strategic planner identified optimization opportunities, it relied on:

  • Static code analysis of repository files
  • GitHub issue history and pull request patterns
  • Documentation stored in markdown files
  • Changelog analysis for historical context

This meant the planner might recommend CPU optimizations when the bot was already under CPU limits, or suggest energy management improvements when energy levels were stable.

After This Release

The strategic planner now performs comprehensive analysis combining:

  • Real-time game metrics: Current CPU usage, bucket levels, energy capacity, room control levels
  • Code patterns: Repository structure, implementation history, regression test coverage
  • Documentation validation: Verification against official API specifications and community best practices
  • Historical trends: Memory structures, performance reports, profiler data

This results in context-aware recommendations that reflect both code quality and actual runtime performance. For example:

  • CPU optimization issues are only created when CPU usage exceeds sustainable thresholds
  • Energy management improvements are prioritized based on current energy capacity utilization
  • Infrastructure recommendations consider current room control levels and available structures

Measurable Benefits

Improved Issue Quality: Strategic analysis now references specific game metrics and documentation sources, making issues more actionable and easier to validate.

Reduced False Positives: By checking current game state before creating optimization issues, we avoid duplicate or unnecessary work on problems that have already been resolved.

Faster Implementation: Agents can validate their solutions against official documentation and community patterns without requiring human intervention for research and verification.

Better Decision-Making: Access to multiple knowledge sources enables agents to make informed trade-offs between implementation complexity and runtime benefit.

Breaking Changes

None. This release is fully backward compatible with existing workflows and configurations.

What’s Next

This MCP integration establishes the foundation for several upcoming enhancements:

Advanced Strategic Analysis: Future releases will leverage the combined power of game state, documentation, and wiki knowledge to identify optimization opportunities that might not be visible through code analysis alone.

Automated Performance Validation: We’re exploring integration with the Screeps profiler data to enable agents to validate that their optimizations achieve measurable CPU reductions.

Documentation-Driven Development: With direct access to API specifications, future automation workflows can automatically validate that implementations conform to Screeps API contracts.

Community Pattern Mining: The wiki MCP server enables systematic extraction of successful patterns from community knowledge, which can inform our bot’s strategic evolution.

Conclusion

Release 0.164.0 represents a significant step forward in autonomous AI-driven development. By giving our GitHub Copilot agents access to real-time game data, comprehensive documentation, and community knowledge, we’ve transformed them from code manipulators into informed strategic advisors. This infrastructure enables more intelligent decision-making, reduces false positives in issue creation, and accelerates the development cycle by eliminating manual research and validation steps.

The Model Context Protocol integration demonstrates the power of composable AI tooling—by combining multiple specialized knowledge sources into a unified execution environment, we enable emergent capabilities that exceed the sum of their parts. We’re excited to see how these enhanced agents evolve our Screeps bot in the months ahead.


Repository: ralphschuler/.screeps-gpt
Release Tag: v0.164.0
Related PR: #1395