Run the MCP GitHub Chat Agent and Tool in a Test Room

Follow these steps to quickly deploy and interact with the MCP GitHub Chat tool in a Meshagent Room. When the room is closed, the tool and chatbot will also be automatically cleaned up.

Environment Variables

  • GITHUB_API_KEY: Required. Your GitHub API key.

Steps

  1. Install Meshagent CLI
    pip install "meshagent[all]"
    
  2. Sign Up and Authenticate
    Get started and authenticate with Meshagent CLI
  3. Deploy MCP Server as Room Agent
    meshagent service test --room=test --role=agent --image=meshagent/mcp-github-chat:latest --env MESHAGENT_PORT=8001 --env GITHUB_API_KEY=YOUR_GITHUB_API_KEY --port="num=8001 path=/webhook liveness=/ type=meshagent.callable" --name=mcp-github-chat-service-test
    
    • This command will start a test Meshagent Room with a running MCP GitHub Chat server. The server and room are ephemeral and shut down with inactivity.
  4. Start Chatbot with GitHub Chat Toolkit
    meshagent chatbot join --room=test --agent-name=mcp-github-chat --name=mcp-github-chat --toolkit=mcp-github-chat
    
    • This adds a chatbot to the same Meshagent Room, enabling natural language access to the GitHub-aware MCP tools.
    • A link to the room will be provided in the output.
  5. Interact in Browser
    • Visit the room link in your browser and send messages to the agent to interact with the MCP Server tools!

Project Level Deployment (Production)

To make the MCP server and chatbot available in all current and future project rooms, deploy them as persistent project-level services. This is ideal for production—no need to run the tools or bots locally, and they become available automatically whenever a new room is created.
  1. Create Persistent MCP GitHub Chat Service
    meshagent service create --role=agent --image=meshagent/mcp-github-chat:latest --env MESHAGENT_PORT=8001 --env GITHUB_API_KEY=YOUR_GITHUB_API_KEY --port="num=8001 path=/webhook liveness=/ type=meshagent.callable" --name=mcp-github-chat-service
    
  2. Create Persistent Chatbot Service
    meshagent service create --image="meshagent/cli:latest" --port="num=9001 path=/agent liveness=/ type=meshagent.callable participant_name=mcp-github-chat-chatbot" --env="MESHAGENT_PORT=9001" --name="mcp-github-chat-chatbot-service" --command="meshagent chatbot service --agent-name=mcp-github-chat-chatbot --toolkit=mcp-github-chat"
    
Now the MCP GitHub Chat and chatbot will be automatically present in every new Meshagent room in your project!

Tools Available

Tools Summary

Tool NameShort Description
index_repositoryIndex a GitHub repository to analyze its codebase.
query_repositoryAsk questions about a GitHub repository and receive detailed AI responses.

Tools Details

Tool: index_repository

Indexes a GitHub repository to analyze its codebase.
Must be used before asking questions about the repository.
ParameterTypeDescription
repo_urlstringThe GitHub repository URL to index (format: https://github.com/username/repo).

Tool: query_repository

Ask questions about a GitHub repository and get detailed AI-powered answers.
Note: The repository must be indexed first.
ParameterTypeDescription
questionstringThe question you want to ask about the repository.
repo_urlstringThe GitHub repository URL being queried (format: https://github.com/username/repo).
conversation_historystring (optional)Previous conversation history for multi-turn conversations.

Meshagent & Resources


Empower your Meshagent Rooms with GitHub repository intelligence, instantly and at scale!