The official command-line tool to bootstrap a new, production-ready Motoko MCP server for the Prometheus Protocol.
This tool generates a complete, batteries-included project so you can skip the boilerplate and focus on building your application's core logic.
The generated project includes:
- Complete Project Structure: A ready-to-use Motoko project with
dfx.json
andmops.json
pre-configured. - Prometheus SDKs: All necessary ICRC standards (
ICRC-126
,ICRC-127
, etc.) are included as dependencies. - Built-in NPM Scripts: Common tasks like deploying, testing, and starting a local replica are available out-of-the-box.
- App Store Integration: Comes with
@prometheus-protocol/app-store-cli
as a dev dependency and pre-configured scripts for easy publishing. - Optional Auth: A commented-out code block to easily enable API keys and/or Prometheus OAuth for monetization.
- Sample Tool: A simple "echo" tool to demonstrate the basic structure of an MCP server.
- Self-Documenting: Generates a detailed
README.md
within your new project to guide you further.
Before you begin, make sure you have the following tools installed:
- Node.js: Version 18.0 or higher. Download.
- DFX: The DFINITY Canister SDK. Installation Guide.
- MOPS: The Motoko Package Manager. Installation Guide.
- Git: The version control system. Download.
To create a new project, run the following command in your terminal:
npx create-motoko-mcp-server my-awesome-app
This will create a new directory called my-awesome-app
with the complete project structure.
Then, navigate into your new project and install the dependencies:
cd my-awesome-app
npm install
npm run mops:install
Your new server is now ready to be deployed!
Your new project directory will have the following structure:
my-awesome-app/
├── src/
│ └── main.mo <-- Your server's main logic lives here!
├── dfx.json <-- DFINITY Canister SDK configuration
├── mops.json <-- Motoko package manager configuration
├── package.json <-- npm scripts and dependencies
└── README.md <-- A detailed guide for your new project
Once your project is created, the generated README.md
inside my-awesome-app/
will guide you through the following steps:
-
Deploy Locally:
npm run start
(Starts the local replica)npm run deploy
(Deploys your canister)
-
Test with the Inspector:
npm run inspector
(Launches the MCP Inspector tool to test your server's functionality)
-
Enable Monetization (Optional):
- Uncomment the auth code in
src/main.mo
and redeploy. - Create an API key using
dfx canister call <your_canister_name> create_my_api_key '("My Key", ["read", "write"])'
. - (Optional) Register your server with the auth service using
npm run auth register
.
- Uncomment the auth code in
-
Publish to the App Store:
npm run app-store init
(Creates yourprometheus.yml
manifest)npm run app-store -- publish --app-version "0.1.0"
(Publishes your server for verification)
Contributions to create-motoko-mcp-server
are welcome! Please open an issue or submit a pull request on our GitHub repository.
This project is licensed under the MIT License.