EM

evanshortiss/mcp-backstage-example

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

7 stars 6 forks 质量 30 趋势 15

A sample MCP Server and Agent that uses it to pull data from a Backstage instanace

概览

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. Install dependencies and prepare environment variables: Edit the .env file to with valid values, then start the server: The MCP server will start listening on http://localhost:8080 In another terminal, install dependencies and set environment variables:

README

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
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →