Skip to content

feat: add GitHub MCP server to container agents#976

Closed
5queezer wants to merge 26 commits intoqwibitai:mainfrom
5queezer:feat/github-mcp-server
Closed

feat: add GitHub MCP server to container agents#976
5queezer wants to merge 26 commits intoqwibitai:mainfrom
5queezer:feat/github-mcp-server

Conversation

@5queezer
Copy link
Copy Markdown

Summary

  • Reads GITHUB_PERSONAL_ACCESS_TOKEN from .env and injects the official @modelcontextprotocol/server-github MCP server into each container's settings.json
  • Agents get structured GitHub tools (create_issue, create_pull_request, search_repositories, etc.) — no raw CLI or token exposure needed
  • Refactors settings.json to read-merge-write so existing group customizations are preserved and new config applies to all groups (not just newly created ones)

Test plan

  • Add GITHUB_PERSONAL_ACCESS_TOKEN=ghp_... to .env
  • Restart NanoClaw, trigger a container agent
  • Verify settings.json in the group's .claude/ dir contains mcpServers.github
  • Ask agent to list repos or create an issue — confirm GitHub MCP tools work
  • Remove token from .env, verify MCP server is not added

🤖 Generated with Claude Code

gavrielc and others added 26 commits March 8, 2026 22:43
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wrap outbound sendMessage calls with parse_mode: 'Markdown' so that
Claude's natural formatting (*bold*, _italic_, `code`, etc.) renders
correctly in Telegram instead of showing raw asterisks and underscores.

Falls back to plain text if Telegram rejects the Markdown formatting.
feat: add Markdown formatting for outbound messages
The sendTelegramMessage helper now passes { parse_mode: 'Markdown' }
to bot.api.sendMessage, but three tests still expected only two args.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pre-existing formatting issue that causes CI format check to fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…se-mode

fix: sendMessage test expectations for parse_mode
grammY creates its own https.Agent internally, bypassing any global
proxy. In Docker Sandbox, NanoClaw sets https.globalAgent to a proxy
agent at startup. This tells grammY to use it instead. On non-sandbox
setups it's a no-op.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: use https.globalAgent in grammY Bot for sandbox proxy
Reads GITHUB_PERSONAL_ACCESS_TOKEN from .env and configures the
official @modelcontextprotocol/server-github MCP server in each
container's settings.json. Agents get structured GitHub tools
(create_issue, create_pull_request, search_repositories, etc.)
without raw token exposure.

Also refactors settings.json to read-merge-write so existing
group customizations are preserved and new config (like MCP
servers) applies to all groups, not just newly created ones.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Andy-NanoClaw-AI Andy-NanoClaw-AI added PR: Feature New feature or enhancement Status: Needs Review Ready for maintainer review labels Mar 12, 2026
@5queezer
Copy link
Copy Markdown
Author

Closing — this PR mixes unrelated changes (Telegram, grammy, fork-sync workflow, version bumps) with the GitHub MCP feature. The feature itself should be contributed as a skill (/add-github-mcp), not a core change. Will resubmit cleanly if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Feature New feature or enhancement Status: Needs Review Ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants