mcp-backstage-example

mcp-backstage-example

3.3

If you are the rightful owner of mcp-backstage-example and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This repository demonstrates how to create a Model Context Protocol (MCP) server that provides tools for LLMs to communicate with a Backstage instance.

Bee Agent & Model Context Protocol with Backstage

This repository demonstrates how to create a Model Context Protocol (MCP) server that provides tools that LLMs can use to communicate with a Backstage instance. A sample Agent, built using the Bee Agent Framework, is included to demonstrate how to interact with the MCP server.

Run the Demo

Configure Backstage

Enable static, token-based, access to Backstage. This allows a client to interact with the HTTP API using the token in an authorization header.

appConfig:
  backend:
    auth:
      externalAccess:
      - type: static
        options:
        token: 'notasecuretoken'
        subject: mcp

Run the MCP Server

Install dependencies and prepare environment variables:

cd server
npm i
cp .env.template .env

Edit the .env file to with valid values, then start the server:


# Load variables
source .env

# Build and run the server
npm run build && npm start 

The MCP server will start listening on http://localhost:8080

Run the Agent

In another terminal, install dependencies and set environment variables:

cd agent
cp .env.template .env
npm i

Run the agent:

npm run build && npm start