Backstage MCP server

Enables AI systems to interact with Backstage developer portal for listing templates and instantiating new projects through Quarkus-based API communication.
Back to servers
Provider
Ioannis Canellos
Release date
Mar 23, 2025
Language
Java
Stats
7 stars

This server implements the Model Context Protocol (MCP) for Backstage, allowing you to interact with Backstage templates directly from the command line or through AI agents like Goose. The integration uses Quarkus Backstage to provide a streamlined interface for template management.

Installation Requirements

Before installing, ensure you have:

  • A working Backstage installation with Service-to-Service authentication enabled
  • Access to the authentication token for Backstage
  • JBang installed on your system for running the Java application

Configuring Backstage

Your Backstage installation must have Service-to-Service authentication enabled. Add the following to your Backstage configuration:

app:
# ...
backend:
  # ... 
  auth:
    # ...
    externalAccess:
      - type: static
        options:
          token: <put your token here>
          subject: curl-requests

Building the MCP Server

  1. Clone the repository:

    git clone https://github.com/your-repo/backstage-mcp.git
    cd backstage-mcp
    
  2. Build the application:

    ./mvnw package
    
  3. The server will be built as a runnable JAR file at target/quarkus-app/quarkus-run.jar

Using with Goose

The MCP server works well with Goose, an AI agent that runs as an interactive shell.

Configuring Goose

Add the following extension to your Goose config.yaml file:

quarkus-backstage-mcp:
  args:
  - --quiet
  - /path/to/backstage-mcp/target/quarkus-app/quarkus-run.jar
  cmd: jbang
  enabled: true
  envs: {}
  name: quarkus-backstage-mcp
  type: stdio

Make sure to replace /path/to/backstage-mcp with the actual path to your installation.

Usage Examples

Listing Available Templates

To view all templates available in your Backstage instance, use the following prompt in Goose:

list all the available backstage templates

Creating Projects from Templates

Creating a new project involves two steps:

  1. First, extract the default values for a template:

    quarkus backstage template info --show-default-values <template name>
    
  2. Save the output to a values.yaml file and modify as needed

  3. Then, use Goose to instantiate the template:

    create a new project from template <template name> using values from values.yaml
    

The MCP server will communicate with Backstage to create your project based on the template and parameter values you provided.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later