Skip to content

Latest commit

 

History

History

README.md

OCI MCP Server Generator

This directory contains a Cookiecutter template for generating OCI MCP servers.

Prerequisites

  • Python 3.9 or higher
  • UV (brew install uv)
  • Cookiecutter (pip install cookiecutter)

Usage

  1. If you want to use the existing cookiecutter template in another project like the Oracle MCP, run the below command. You may need to change the output-dir

    uvx cookiecutter https://github.com/oracle-samples/mcp-examples.git --directory generator --output-dir ./src 
    
  2. Follow the prompts to enter the required information

  3. Cookiecutter will generate a new directory with your MCP server project.

Testing

  1. If you want to test the project template, run the below command
    uvx cookiecutter generator
    
  2. Following the prompts and it will generator a directory with your MCP servers.
  3. Adjust the files within the generator folder to modify the output
  4. For dynamic variables or advanced usage, see the official readme
  5. Do not commit generated code to this repository

Generated Project Structure

Here's an example of the directory structure generated by this template when using "test" as the project_domain:

oci-test-mcp-server/
├── .gitignore
├── .python-version
├── CHANGELOG.md
├── LICENSE.txt
├── pyproject.toml
├── README.md
├── uv-requirements.txt
└── oracle/
    ├── __init__.py
    └── oci_test_mcp_server/
        ├── __init__.py
        ├── server.py
        └── tests/

Template Variables

  • project_domain: Used to generate the project directory name and other identifiers.
  • description: Used to generate a description of the project.
  • instructions: "Instructions for using this MCP server.

Notes

  • The generated MCP server project includes basic configuration and structure. You will need to modify and extend it according to your specific requirements.
  • Refer to the Cookiecutter documentation for more advanced usage and customization options.