Get up and running with Nexr in 5 minutes!
cd /path/to/your/bench
bench get-app https://github.com/av-dev2/nexr
bench --site your-site.local install-app nexrThat's it! The frappe-mcp dependency is automatically installed with the app.
bench --site your-site.local consoleIn the Python console:
user = frappe.get_doc("User", "your-email@example.com")
user.generate_keys()
frappe.db.commit()
# Display your credentials
api_key = user.api_key
api_secret = frappe.utils.password.get_decrypted_password("User", user.name, "api_secret")
print(f"\nAPI Key: {api_key}")
print(f"API Secret: {api_secret}")Save these credentials! You'll need them in the next step.
- Login to your Frappe site
- Click your profile (top right)
- Select "API Access"
- Click "Generate Keys"
- Copy the API Key and API Secret
-
Open VS Code settings:
- Linux:
~/.config/Code/User/settings.json - macOS:
~/Library/Application Support/Code/User/settings.json - Windows:
%APPDATA%\Code\User\settings.json
- Linux:
-
Add this configuration:
{
"github.copilot.chat.mcpServers": {
"nexr-dev": {
"type": "http",
"url": "http://localhost:8000/api/method/nexr.mcp.handle_mcp",
"headers": {
"Authorization": "token YOUR_API_KEY:YOUR_API_SECRET"
}
}
}
}-
Replace:
localhost:8000→ Your site URL/portYOUR_API_KEY→ Your actual API keyYOUR_API_SECRET→ Your actual API secret
-
Restart VS Code
-
Open config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Add configuration:
{
"mcpServers": {
"nexr": {
"type": "http",
"url": "http://localhost:8000/api/method/nexr.mcp.handle_mcp",
"headers": {
"Authorization": "token YOUR_API_KEY:YOUR_API_SECRET"
}
}
}
}- Restart Claude Desktop
Open GitHub Copilot Chat or Claude and try:
@copilot Using nexr-dev, run a health check
Expected response:
✓ Server is healthy
✓ Site: your-site.local
✓ Frappe version: vX.X.X
Try these commands to explore Nexr:
@copilot Using nexr-dev, list all installed apps
@copilot Using nexr-dev, show me all DocTypes in the erpnext app
@copilot Using nexr-dev, create a "Meeting Notes" DocType in frappe,
with fields: title (Data), date (Date), attendees (Small Text), notes (Text Editor)
@copilot Using nexr-dev, get the last 5 ToDo items
- Read the Full Documentation
- Explore Usage Examples
- Check the Changelog
Solution:
# Make sure bench is running
bench start
# Check if your site is accessible
curl http://localhost:8000Solution:
- Double-check your API key and secret
- Make sure there are no extra spaces in the config
- Regenerate credentials if needed
Solution:
# Verify nexr is installed
bench --site your-site.local list-apps
# If not installed:
bench --site your-site.local install-app nexr
bench restart- Multiple Benches: Give each configuration a unique name (
nexr-prod,nexr-dev, etc.) - Security: Use different API keys for different environments
- Performance: Keep your bench updated for best results
- Documentation: Use natural language - Nexr understands context!
Need help? Open an issue on GitHub!