{
  "markdown": "# Frappe/ERPNext MCP Server\n\nA Model Context Protocol (MCP) server that provides AI assistance for Frappe/ERPNext development. This server offers tools to help with creating DocTypes, running bench commands, managing apps, and other Frappe development tasks.\n\n## Features\n\n- **DocType Creation**: Automatically generate DocType JSON definitions and Python controllers\n- **Bench Commands**: Execute bench commands for development workflows\n- **App Management**: Create, install, and manage Frappe apps\n- **API Endpoints**: Generate custom API endpoints\n- **Database Operations**: Run migrations and database management\n- **App Structure Analysis**: Get detailed app directory structures\n\n## Installation\n\n1. Clone or download this repository\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n3. Build the server:\n   ```bash\n   npm run build\n   ```\n\n## Configuration\n\nSet the `FRAPPE_PATH` environment variable to point to your Frappe bench directory:\n\n```bash\nexport FRAPPE_PATH=\"/path/to/your/frappe/bench\"\n```\n\nIf not set, it defaults to `/Users/mac/ERPNext/mkahawa`.\n\n## Usage\n\n### With GitHub Copilot Chat (SSE Transport)\n\nThe server now supports SSE transport for use with GitHub Copilot Chat:\n\n1. Build and run the SSE server:\n   ```bash\n   npm run build\n   npm run sse\n   ```\n\n2. The server will be automatically discovered by GitHub Copilot Chat at `http://localhost:3000/sse`\n\n### With Claude Desktop (Stdio Transport)\n\nAdd the following configuration to your Claude Desktop config file (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"frappe-dev\": {\n      \"command\": \"node\",\n      \"args\": [\"/Users/mac/ERPNext/mkahawa/frappe-mcp-server/dist/index.js\"],\n      \"env\": {\n        \"FRAPPE_PATH\": \"/Users/mac/ERPNext/mkahawa\"\n      }\n    }\n  }\n}\n```\n\n### With other MCP clients\n\nRun the server directly:\n\n```bash\nnode dist/index.js\n```\n\n## Available Tools\n\n### frappe_create_doctype\nCreates a new Frappe DocType with JSON definition and Python controller.\n\n**Parameters:**\n- `app_name`: Name of the Frappe app\n- `doctype_name`: Name of the DocType\n- `module`: Module where DocType belongs\n- `fields`: Array of field definitions\n- `is_submittable`: Whether the DocType is submittable (default: false)\n- `is_child`: Whether this is a child DocType (default: false)\n\n### frappe_run_bench_command\nExecutes bench commands for Frappe development.\n\n**Parameters:**\n- `command`: Bench command to execute\n- `site`: Site name (optional)\n- `cwd`: Working directory (optional)\n\n### frappe_get_app_structure\nGets the directory structure of a Frappe app.\n\n**Parameters:**\n- `app_name`: Name of the Frappe app\n\n### frappe_create_api_endpoint\nCreates a custom API endpoint for a Frappe app.\n\n**Parameters:**\n- `app_name`: Name of the Frappe app\n- `endpoint_name`: Name of the API endpoint\n- `method`: HTTP method (get, post, put, delete) (default: get)\n- `code`: Python code for the API endpoint\n\n### frappe_migrate_database\nRuns database migration for a Frappe site.\n\n**Parameters:**\n- `site`: Site name to migrate\n\n### frappe_install_app\nInstalls a Frappe app on a site.\n\n**Parameters:**\n- `app_name`: Name of the app to install\n- `site`: Site name\n\n### frappe_create_app\nCreates a new Frappe app.\n\n**Parameters:**\n- `app_name`: Name of the new app\n- `title`: Title of the app\n- `publisher`: Publisher name\n- `description`: App description (optional)\n\n## Example Usage\n\n### Creating a DocType\n\n```javascript\n{\n  \"app_name\": \"my_app\",\n  \"doctype_name\": \"Customer Order\",\n  \"module\": \"Orders\",\n  \"fields\": [\n    {\n      \"fieldname\": \"customer\",\n      \"label\": \"Customer\",\n      \"fieldtype\": \"Link\",\n      \"options\": \"Customer\",\n      \"reqd\": true\n    },\n    {\n      \"fieldname\": \"order_date\",\n      \"label\": \"Order Date\",\n      \"fieldtype\": \"Date\",\n      \"reqd\": true\n    },\n    {\n      \"fieldname\": \"total_amount\",\n      \"label\": \"Total Amount\",\n      \"fieldtype\": \"Currency\",\n      \"reqd\": true\n    }\n  ]\n}\n```\n\n### Running Bench Commands\n\n```javascript\n{\n  \"command\": \"migrate\",\n  \"site\": \"my_site.local\"\n}\n```\n\n## Development\n\nTo modify the server:\n\n1. Edit files in the `src/` directory\n2. Run `npm run build` to compile TypeScript\n3. Test with `npm run dev` for development mode\n\n## Requirements\n\n- Node.js 18+\n- Frappe/ERPNext bench environment\n- Access to Frappe bench commands\n\n## License\n\nMIT License - see LICENSE file for details\n",
  "bytes": 4401,
  "sha": "be7529157fe209e3153fff81cc7f68102ca545bd8c1faf7f16e8f8449c3bb767",
  "repo_slug": "sajmustafake/frappe-dev-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_sajmustafake_frappe_dev_mcp_se_f581439d/readme"
}