Run an Agent and Tool in the Cloud

1. Set Environment Variables

  • GITHUB_API_KEY: Your GitHub API key.

2. Install Meshagent

pip install "meshagent[all]"

3. Set Up Meshagent Authentication

4. Start the MCP Agent Server in a Meshagent Room

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
  • This command will start a Meshagent room with the MCP server available in the room. Rooms will close if they go inactive.

5. Join with a Chat Agent and Activate the Toolkit

meshagent chatbot join \
  --room=test \
  --agent-name=sample \
  --name=sample \
  --toolkit=mcp-github-chat
  • Starts a chatbot in the Meshagent room that can use the github-chat toolkit.
  • Multiple toolkits can be used in the same room with the same agent.
  • A link to the room will be provided in the output of this command to interact with the agent and tools.

Tools Available

Tools provided by this ServerShort 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

Index a GitHub repository to analyze its codebase. This must be done before asking questions about the repository.

ParametersTypeDescription
repo_urlstringThe GitHub repository URL to index (format: https://github.com/username/repo).

Tool: query_repository

Ask questions about a GitHub repository and receive detailed AI responses. The repository must be indexed first.

ParametersTypeDescription
questionstringThe question to ask about the repository.
repo_urlstringThe GitHub repository URL to query (format: https://github.com/username/repo).
conversation_historystring (optional)Previous conversation history for multi-turn conversations.