View on GitHub

/prompt

An MCP server to help you share prompts and resources

/prompt

A Model Context Protocol (MCP) server that allows people to share prompts and resources.

Features

Quick Start

  1. Create a git repository with prompts and resources.
  2. Create a configuration file.
  3. Install the MCP server.
  4. Start using /prompt with your AI assistant.

Prompts

Prompts are Markdown files with YAML frontmatter. Example:

---
name: load-documentation
description: Use hyaline to load relevant documentation into context
arguments:
  - name: task
    description: A description of the task being performed
    required: true
resources:
  - path: ../resources/documentation-summary.template.md
    name: documentation-summary-template
---

Based on the following task, use the hyaline MCP server to get relevant documentation.

Task: ${task}

Use the provided documentation-summary-template to summarize the documentation that was retrieved.

Frontmatter Fields

The YAML frontmatter supports the following fields:

Configuration

/prompt is configured by a YAML file. Example:

repos:
  - repo: https://github.com/appgardenstudios/hyaline.git
    id: hyaline
    ref: main
    prompts:
      include:
        - "contributing/prompts/**/*.md"
      exclude:
        - "contributing/prompts/resources/**/*"
    resources:
      include:
        - "contributing/prompts/resources/**/*.template.md"

Configuration Options

Notes:

Environment Variable Substitution

Configuration files support environment variable substitution using ${VARIABLE_NAME} syntax. This allows you to keep sensitive information like credentials out of your configuration files.

Example:

repos:
  - repo: https://github.com/appgardenstudios/hyaline.git
    id: hyaline
    ref: main
      username: ${SLASH_PROMPT_USERNAME}
      password: ${SLASH_PROMPT_PASSWORD}
    prompts:
      path: contributing/prompts
      include:
        - "**/*.md"
      exclude:
        - "resources/**/*"

Installation

Docker

The MCP server is run as a docker container over STDIO, and so Docker is a prerequisite. When running the docker container, the configuration file must be mounted.

Example:

$ docker run -i --rm -v ./prompt.yml:/home/appuser/.prompt.yml:ro ghcr.io/appgardenstudios/slash-prompt:latest

The default location for the mounted configuration file is /home/appuser/.prompt.yml; however, this can be overridden by providing a SLASH_PROMPT_CONFIG_PATH environment variable.

See https://github.com/appgardenstudios/slash-prompt/pkgs/container/slash-prompt for the list of available images.

Host Applications

Installation varies depending on the host application. Refer to the current documentation for your specific host application.

Claude Code

Install the MCP server using the Claude Code CLI:

claude mcp add prompt -- docker run -i --rm -v ./prompt.yml:/home/appuser/.prompt.yml:ro ghcr.io/appgardenstudios/slash-prompt:latest

Claude Desktop

Add the following configuration to your claude_desktop_config.json:

{
  "mcpServers": {
    "prompt": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v", "./prompt.yml:/home/appuser/.prompt.yml:ro",
        "ghcr.io/appgardenstudios/slash-prompt:latest"
      ]
    }
  }
}

Usage

MCP Tools

The following MCP tools are available:

MCP Prompts

Host applications expose prompts in different ways. Refer to the current documentation for your specific host application.

Prompts can be accessed by name (when they are unique) or with a repository ID prefix:

In Claude Code:

/prompt:load-documentation

MCP Resources

Resources are available through the MCP resource system. Resource URIs follow the schema file://<repo-id>/<path-to-resource>. Example: file://hyaline/contributing/resources/documentation-summary.template.md

Resources that are referenced by prompt files are automatically embedded in the prompt. They can also be retrieved using the provided resource tools.

Host applications expose prompts in different ways. Refer to the current documentation for your specific host application.

In Claude Code:

@prompt:file://hyaline/contributing/prompts/resources/spec.template.md

Development

Prerequisites

Building

Build the Docker image:

$ make build-docker

Testing

Unit Tests

Run unit tests:

$ make test

E2E Tests

Run end-to-end tests:

$ make e2e

Update E2E golden files:

$ make e2e-update

Manual Testing with Claude Code

For local development and testing:

  1. Build a local Docker image:
    $ make build-docker
    
  2. Set the SLASH_PROMPT_IMAGE environment variable to use your local image:
    $ export SLASH_PROMPT_IMAGE=slash-prompt:development
    
  3. The .mcp.json file is configured to use this environment variable, allowing you to test with your local build using Claude Code.
    • Note: Due to a current bug with Claude Code, you must inline the environment variable:
      $ SLASH_PROMPT_IMAGE=slash-prompt:development claude
      

Documentation

This project uses Hyaline to help keep documentation updated.

Releasing

The release process is automated with the release script. It must be run from the main branch:

$ ./scripts/release.sh

License

This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.

Support