home / mcp / agent mcp server

Agent MCP Server

Provides local and remote MCP tooling, enabling an inspector and cloud tools access for calculators and string utilities.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "brentlaster-agent-mcp-ollama": {
      "url": "https://mcp.github.dev/sse",
      "headers": {
        "GITHUB_TOKEN": "YOUR_TOKEN"
      }
    }
  }
}

You can extend your workflow with MCP by running local or remote MCP servers that expose tools you define as Python functions. This guide walks you through practical steps to install the MCP client, register tools for remote usage, and run multi-tool scenarios that let your agent call the right tool automatically.

How to use

Connect to an MCP server and use your registered tools from your agent workflow. Start by installing the MCP client, then register your tools for remote access on GitHub’s cloud MCP platform. Run your agent locally to test invoking tools like a calculator or a string reverser, and, when ready, point your client at the remote MCP server to enable cloud-based tool execution.

Typical usage patterns include registering tools for remote access, launching an agent that consumes those tools via an MCP client, and then issuing prompts that let the agent automatically select the appropriate tool to handle a request. You can test local execution first and then switch to the remote server endpoint to take advantage of cloud-hosted capabilities.

How to install

Prerequisites: ensure you have Python and pip installed on your system.

Install the MCP CLI client.

pip install mcp

Optionally upgrade to the latest MCP CLI.

pip install --upgrade mcp

Register your local tool for remote usage on the cloud MCP server.

mcp register --tool calculator.py --remote

Start using the remote MCP server by creating an MCP client configured to connect to the cloud endpoint.

MCPClient({
  "url": "https://mcp.github.dev/sse",
  "token": "<your GitHub token>"
})

Additional sections

The setup shows how you can compose multiple tools into a cohesive MCP workflow. You can add a second tool, such as a string reverser, and have your agent decide which tool to call based on the prompt. This enables flexible, schema-driven tool usage without manual tool selection.

To integrate multiple tools in a single server, you can run a multi-tool MCP server and expose both endpoints through one URL. This lets your agent access all configured tools from a single MCP channel.

Lab examples and tool definitions

Calculator tool is registered as calculator.py and can be invoked via the MCP workflow. You can test it locally with a simple calculator script and then connect the remote server to use the same tool in the cloud.

Second tool example is a string reverser. You implement it as a small Python function decorated as a tool, then add it to the workflow so the agent can reverse strings on demand.

Code snippets below illustrate adding the reverse_string tool.

from mcp import tool

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

Multi-tool MCP server (optional)

If you want to host multiple tools from a single server, you can use a FastMCP-based setup. This approach exposes several tools under one endpoint and lets your agent call any of them as needed.

Example server declaration and usage are shown to help you run a single server that provides several tools.

Available tools

calculator

Evaluates mathematical expressions or calculator-style queries using the calculator.py tool defined in your MCP setup.

reverse_string

Reverses a given string. Demonstrates adding a second tool to an MCP workflow to show multi-tool coordination.