Skip to main content
Glama

GitHub Remote MCP Server

by brentlaster

🧠 Agent with MCP Tools and Ollama (Codespaces Ready)

This project demonstrates how to use smolagents, mcp, and Ollama in GitHub Codespaces, and how to integrate with GitHub's remote MCP server (public preview).


Lab 1: Use Local MCP Inspector in Codespaces

✅ Setup

  1. Open this repo in GitHub Codespaces
  2. Ensure .devcontainer builds the container with Ollama and Python dependencies
  3. In terminal:
pip install mcp mcp dev calculator.py
  • MCP Inspector UI at: http://localhost:6274
  • SSE endpoint at: http://localhost:6277/sse

✅ Test Agent via CLI

python test_calculator_agent.py

✅ Or Use Chat UI

python chat_calculator_agent.py

Lab 2: Use GitHub’s New Remote MCP Server (Public Preview)

🆕 As of June 12, 2025, you can register and use remote tools on GitHub’s cloud MCP platform.

🛠 Steps

  1. Install latest mcp CLI:
pip install --upgrade mcp
  1. Register your tool with GitHub’s MCP cloud server:
mcp register --tool calculator.py --remote
  1. Start agent with remote tools:
mcp_client = MCPClient({ "url": "https://mcp.github.dev/sse", "token": "<your GitHub token>" })
  1. Run the CLI agent or Gradio app as usual

🔁 Lab 3: Add a Second Tool (Reverse String)

This lab shows how to add another tool to the MCP Inspector workflow.

✅ Setup

Create reverse_string.py:

from mcp import tool @tool def reverse_string(text: str) -> str: return text[::-1]

Then launch it:

mcp dev reverse_string.py

Update your test agent or Gradio interface to prompt:

"Reverse the string 'hello world'"

🧠 The LLM will choose the appropriate tool via schema-based reasoning.

🎁 Bonus: Multi-Tool MCP Server

Instead of running individual tools, you can host multiple tools in a single server using FastMCP.

✅ Setup

Create a file multi_tool_server.py:

from fastapi import FastAPI from fastmcp import FastMCP from mcp import tool @tool def calculator(expression: str) -> str: try: result = eval(expression, {"__builtins__": {}}) return str(result) except Exception as e: return f"Error: {str(e)}" @tool def reverse_string(text: str) -> str: return text[::-1] app = FastMCP().app

Run it with:

python multi_tool_server.py

Then connect your agent to:

MCPClient({"url": "http://127.0.0.1:7860/sse"})

Now you can access both tools from one endpoint!

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

A cloud platform for registering and using remote tools with GitHub's MCP service, enabling agents to access registered tools through SSE endpoints.

  1. Lab 1: Use Local MCP Inspector in Codespaces
    1. ✅ Setup
    2. ✅ Test Agent via CLI
    3. ✅ Or Use Chat UI
  2. Lab 2: Use GitHub’s New Remote MCP Server (Public Preview)
    1. 🛠 Steps
    2. 🔁 Lab 3: Add a Second Tool (Reverse String)
  3. 🎁 Bonus: Multi-Tool MCP Server
    1. ✅ Setup

Related MCP Servers

  • -
    security
    F
    license
    -
    quality
    An MCP server that enables Claude and other compatible LLMs to interact with the GitHub API, supporting features like creating issues, retrieving repository information, listing issues, and searching repositories.
    Last updated -
    TypeScript
  • -
    security
    -
    license
    -
    quality
    An MCP server that allows Claude and other MCP-compatible LLMs to interact with the GitHub API, supporting features like creating issues, getting repository information, listing issues, and searching repositories.
    Last updated -
    TypeScript
  • -
    security
    F
    license
    -
    quality
    Provides tools for interacting with GitHub's API through the MCP protocol, allowing users to create repositories, push content, and retrieve user information.
    Last updated -
    JavaScript
  • -
    security
    A
    license
    -
    quality
    A free, open-source service that transforms GitHub projects into MCP endpoints, enabling AI assistants to access and understand project documentation without any setup.
    Last updated -
    2,823
    TypeScript
    Apache 2.0
    • Apple
    • Linux

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/brentlaster/agent-mcp-ollama'

If you have feedback or need assistance with the MCP directory API, please join our Discord server