Skip to main content
Glama

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin

stellar-fungible

Generate fungible token contracts compatible with SEP-41, similar to ERC-20, using OpenZeppelin Contracts. Customize token properties like burnable, pausable, and upgradeable features. Returns Markdown-formatted source code without saving to disk.

Instructions

Make a fungible token per the Fungible Token Standard, compatible with SEP-41, similar to ERC-20.

Returns the source code of the generated contract, formatted in a Markdown code block. Does not write to disk.

Input Schema

NameRequiredDescriptionDefault
accessNoThe type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.
burnableNoWhether token holders will be able to destroy their tokens
infoNoMetadata about the contract and author
mintableNoWhether privileged accounts will be able to create more supply or emit more tokens
nameYesThe name of the contract
pausableNoWhether privileged accounts will be able to pause specifically marked functionality. Useful for emergency response.
premintNoThe number of tokens to premint for the deployer.
symbolYesThe short symbol for the token
upgradeableNoWhether the contract can be upgraded.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "access": { "description": "The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.", "enum": [ "ownable", "roles" ], "type": "string" }, "burnable": { "description": "Whether token holders will be able to destroy their tokens", "type": "boolean" }, "info": { "additionalProperties": false, "description": "Metadata about the contract and author", "properties": { "license": { "description": "The license used by the contract, default is \"MIT\"", "type": "string" }, "securityContact": { "description": "Email where people can contact you to report security issues. Will only be visible if contract source code is verified.", "type": "string" } }, "type": "object" }, "mintable": { "description": "Whether privileged accounts will be able to create more supply or emit more tokens", "type": "boolean" }, "name": { "description": "The name of the contract", "type": "string" }, "pausable": { "description": "Whether privileged accounts will be able to pause specifically marked functionality. Useful for emergency response.", "type": "boolean" }, "premint": { "description": "The number of tokens to premint for the deployer.", "type": "string" }, "symbol": { "description": "The short symbol for the token", "type": "string" }, "upgradeable": { "description": "Whether the contract can be upgraded.", "type": "boolean" } }, "required": [ "name", "symbol" ], "type": "object" }

Implementation Reference

  • The handler function for the 'stellar-fungible' tool. It takes input parameters, constructs FungibleOptions, and returns Rust code generated by fungible.print(opts) wrapped in a safePrintRustCodeBlock.
    async ({ name, symbol, burnable, pausable, premint, mintable, upgradeable, access, info }) => { const opts: FungibleOptions = { name, symbol, burnable, pausable, premint, mintable, upgradeable, access, info, }; return { content: [ { type: 'text', text: safePrintRustCodeBlock(() => fungible.print(opts)), }, ], }; },
  • Zod schema defining the input parameters for the 'stellar-fungible' tool, including name, symbol, and various optional features.
    export const fungibleSchema = { name: z.string().describe(commonDescriptions.name), symbol: z.string().describe(commonDescriptions.symbol), burnable: z.boolean().optional().describe(commonDescriptions.burnable), pausable: z.boolean().optional().describe(commonDescriptions.pausable), premint: z.string().optional().describe(stellarFungibleDescriptions.premint), mintable: z.boolean().optional().describe(commonDescriptions.mintable), ...commonSchema, } as const satisfies z.ZodRawShape;
  • The registration function for the 'stellar-fungible' tool, called with an MCP server to register the tool, its prompt, schema, and handler.
    export function registerStellarFungible(server: McpServer): RegisteredTool { return server.tool( 'stellar-fungible', makeDetailedPrompt(stellarPrompts.Fungible), fungibleSchema, async ({ name, symbol, burnable, pausable, premint, mintable, upgradeable, access, info }) => { const opts: FungibleOptions = { name, symbol, burnable, pausable, premint, mintable, upgradeable, access, info, }; return { content: [ { type: 'text', text: safePrintRustCodeBlock(() => fungible.print(opts)), }, ], }; }, ); }
  • Higher-level registration function that registers all Stellar tools, including 'stellar-fungible' via registerStellarFungible.
    export function registerStellarTools(server: McpServer) { Object.values(getRegisterFunctions(server)).forEach(registerTool => { registerTool(server); }); }
  • Maps 'Fungible' kind to the registerStellarFungible function call.
    Fungible: () => registerStellarFungible(server),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/OpenZeppelin/contracts-wizard'

If you have feedback or need assistance with the MCP directory API, please join our Discord server