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.
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: mcpInstall dependencies and prepare environment variables:
cd server
npm i
cp .env.template .envEdit 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
In another terminal, install dependencies and set environment variables:
cd agent
cp .env.template .env
npm iRun the agent:
npm run build && npm start