Skip to content

Demo - MCP application

Yokai's showroom provides an MCP server demo application.

Overview

This MCP server demo application is a simple MCP server to manage gophers.

It provides:

  • a Yokai application container, with the MCP server and SQL modules to offer the gophers MCP server
  • a MySQL container to store the gophers
  • a MCP Inspector container to interact with the MCP server
  • a Jaeger container to collect the application traces

Layout

This demo application is following the recommended project layout:

  • cmd/: entry points
  • configs/: configuration files
  • db/:
    • migrations/: database migrations
    • seeds/: database seeds
  • internal/:
    • domain/: domain
      • model.go: gophers model
      • repository.go: gophers repository
      • service.go: gophers service
    • mcp/: MCP registrations
      • prompt/: MCP prompts
      • resource/: MCP resources
      • tool/: MCP tools
    • bootstrap.go: bootstrap
    • register.go: dependencies registration

Makefile

This demo application provides a Makefile:

make up      # start the docker compose stack
make down    # stop the docker compose stack
make logs    # stream the docker compose stack logs
make fresh   # refresh the docker compose stack
make migrate # run database migrations
make test    # run tests
make lint    # run linter

Usage

Start the application

To start the application, simply run:

make fresh

After a short moment, the application will offer:

Interact with the application

MCP inspector

You can use the provided MCP Inspector, available on http://localhost:6274.

To connect to the MCP server, use:

  • SSE as transport type
  • http://mcp-demo-app:8080/sse as URL

Then simply click Connect: from there, you will be able to interact with the resources, prompts and tools of the application.

MCP hosts

If you use MCP compatible applications like Cursor, or Claude desktop, you can register this application as MCP server:

{
  "mcpServers": {
    "mcp-demo-app": {
      "url": "http://localhost:8080/sse"
    }
  }
}

Note, if you client does not support remote MCP servers, you can use a local proxy:

{
  "mcpServers": {
    "mcp-demo-app": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:8080/sse"]
    }
  }
}