Skip to main content
Glama
Sheshiyer

Framer Plugin MCP Server

by Sheshiyer

build_plugin

Compile a Framer plugin project from a specified directory to enable web3 features such as wallet connections, contract interactions, and NFT displays.

Instructions

Build a Framer plugin project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pluginPathYesPath to plugin directory

Implementation Reference

  • The handler function that implements the build_plugin tool. It resolves the plugin directory, verifies it exists, executes 'npm run build' in that directory, and returns a success message.
    private async handleBuildPlugin(args: BuildPluginArgs) {
      try {
        const pluginDir = path.resolve(args.pluginPath);
        
        // Verify plugin directory exists
        if (!await fs.pathExists(pluginDir)) {
          throw new Error(`Plugin directory not found: ${pluginDir}`);
        }
    
        // Run build command
        const { execSync } = require('child_process');
        execSync('npm run build', { cwd: pluginDir, stdio: 'inherit' });
    
        return {
          content: [
            {
              type: 'text',
              text: `Successfully built plugin at ${pluginDir}`
            }
          ]
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to build plugin: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • TypeScript interface defining the input parameters for the build_plugin tool: pluginPath (string).
    interface BuildPluginArgs {
      pluginPath: string;
    }
  • src/index.ts:93-106 (registration)
    Tool registration in the ListTools response, including name, description, and JSON input schema.
    {
      name: 'build_plugin',
      description: 'Build a Framer plugin project',
      inputSchema: {
        type: 'object',
        properties: {
          pluginPath: {
            type: 'string',
            description: 'Path to plugin directory'
          }
        },
        required: ['pluginPath']
      }
    }
  • src/index.ts:114-115 (registration)
    Dispatch case in the CallToolRequest handler that routes to the build_plugin handler function.
    case 'build_plugin':
      return this.handleBuildPlugin(request.params.arguments as unknown as BuildPluginArgs);
Install Server

Other Tools

Related Tools

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/Sheshiyer/framer-plugin-mcp'

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