AI-powered skill for generating single-file, production-ready MCP servers.
Build complete MCP servers in seconds—one file, zero boilerplate, pure business logic.
Generate production-quality .photon.ts files from simple requests:
- ✅ One file = Complete MCP - Single TypeScript file becomes full MCP server
- ✅ AI-friendly code - Clear, readable structure optimized for AI understanding and modification
- ✅ Auto-dependencies - Dependencies auto-install via
@dependenciestags (likenpxoruv) - ✅ Fork-first design - Easy to customize, copy, and modify
- ✅ MCP-client agnostic - Works with Claude Desktop, Cursor, Zed, Continue, Cline, and any MCP client
- ✅ Security built-in - Input validation, path traversal prevention, command injection protection
From idea to working MCP server in under 60 seconds.
# Add the marketplace
/plugin marketplace add portel-dev/photon-skill
# Install the skill
/plugin install generating-photon-mcps@photon-skills- Download
generating-photon-mcps.zipfrom GitHub Releases - In your MCP client, upload the skill (consult client documentation for installation steps)
# Clone the repository
git clone https://github.com/portel-dev/photon-skill.git
cd photon-skill
# Package the skill (requires skill-creator tools)
python /path/to/skill-creator/scripts/package_skill.py ./generating-photon-mcps .
# Install the generated ZIP file in your MCP clientSimply ask your AI assistant to create an MCP:
Examples:
- "Create a GitHub Issues MCP"
- "Build an MCP for file operations"
- "Make an MCP that interacts with PostgreSQL"
- "Generate an MCP for time and date utilities"
The skill will:
- Ask clarifying questions if needed
- Generate a complete
.photon.tsfile with proper structure - Include security helpers and error handling
- Provide auto-installing dependencies
- Give usage instructions for any MCP client
AI agents can understand your entire MCP in one context:
"Read my github.photon.ts and explain how it works"
"Review this photon for security issues"
"Add error handling to this tool method"
Traditional MCPs scatter logic across files—Photons give complete context.
- Understand: Read one file, understand the whole system
- Review: Code reviews are one file, complete story
- Debug: All logic in one place
- Share: One file to copy, fork, or send
Every generated photon is designed to be customized:
# Generate base photon
"Create a Jira MCP"
# Save it
# Copy and customize
cp ~/.photon/jira.photon.ts ~/.photon/my-jira.photon.ts
# Edit my-jira.photon.ts to add company auth, custom fields, etc.
# Run your custom version
photon mcp my-jiraNo build configs. No package.json. Just code.
Each .photon.ts file includes:
/**
* GitHub Issues - Issue tracking operations
*
* Common use cases:
* - Create issues: "Create a bug report"
* - List issues: "Show open issues"
* - Update issues: "Close issue #42"
*
* Configuration:
* - token: GitHub personal access token (required)
* - owner: Repository owner (required)
* - repo: Repository name (required)
*
* Dependencies are auto-installed on first run (like npx or uv).
*
* @dependencies @octokit/rest@^19.0.0
* @version 1.0.0
* @author Your Name
* @license MIT
*/export default class GitHubIssues {
constructor(
private token: string,
private owner: string,
private repo: string
) {}
// Maps to: GITHUB_ISSUES_TOKEN, GITHUB_ISSUES_OWNER, GITHUB_ISSUES_REPO
}- ✅ Input validation
- ✅ Directory traversal prevention
- ✅ Command injection protection
- ✅ File size limits
- ✅ Parameterized queries
async createIssue(params: { title: string; body: string }) {
try {
const result = await this.octokit.issues.create({ ... });
return { success: true, issue: result.data };
} catch (error) {
console.error('Failed to create issue:', error);
return { success: false, error: error.message };
}
}async onInitialize() {
// Called when photon loads
this.octokit = new Octokit({ auth: this.token });
console.error('GitHub Issues photon initialized');
}
async onShutdown() {
// Called on shutdown
console.error('GitHub Issues photon shutting down');
}/**
* Create a new issue
* @param title Issue title
* @param body Issue description
* @param labels Optional labels
*/
async createIssue(params: {
title: string;
body: string;
labels?: string[];
}) {
// Implementation...
}The skill includes reference patterns for:
| Pattern | Use Cases |
|---|---|
| Filesystem | Read, write, list, search, delete files |
| HTTP/API | GET, POST, download, timeout handling |
| Database | SQLite, PostgreSQL, MongoDB with transactions |
| Shell/Git | Command execution with security |
| Security | Input validation, injection prevention |
| Error Handling | Consistent error responses |
| Configuration | Smart defaults, environment variables |
Generated .photon.ts files work with any MCP client:
- Claude Desktop (Anthropic)
- Cursor (IDE)
- Zed (IDE)
- Continue (VS Code extension)
- Cline (VS Code extension)
- Any MCP-compatible client
# Development mode (hot reload)
photon mcp github-issues --dev
# Production mode
photon mcp github-issues
# Get config for your MCP client
photon get github-issues --mcpAdd the configuration output to your MCP client's config file. Consult your client's documentation for specific setup instructions.
Request: "Create an MCP for time operations"
Result: Complete time.photon.ts with:
- Timezone conversion
- Date formatting
- Relative time calculations
- Smart defaults (system timezone)
- Full documentation
Request: "Build a PostgreSQL MCP"
Result: Complete postgres.photon.ts with:
- Query execution
- Parameterized queries
- Transaction support
- Schema introspection
- Connection pooling
- Auto-dependency:
@dependencies pg@^8.11.0
Request: "Make an MCP for our company CRM API"
Result: Complete crm.photon.ts with:
- API authentication
- CRUD operations
- Error handling
- Rate limiting
- Custom business logic
You: "Create a Jira MCP"
AI: [Generates jira.photon.ts]
photon mcp jira --dev
# Test with your MCP clientcp ~/.photon/jira.photon.ts ~/.photon/company-jira.photon.tsEdit company-jira.photon.ts to add:
- Company-specific authentication
- Custom field mappings
- Internal workflow logic
- Additional tools
photon mcp company-jiraNo build config changes needed. No package.json to update. Just code.
Once you've generated several photons, you can publish them as a marketplace:
# Organize your photons
mkdir my-photons && cd my-photons
cp ~/.photon/*.photon.ts .
# Generate marketplace
photon sync marketplace --name "My Photons" --owner "Your Name"
# Push to GitHub
git init && git add . && git commit -m "Initial marketplace"
git push origin mainAdd --claude-code flag to also generate a Claude Code plugin:
# Generate marketplace + Claude Code plugin
photon sync marketplace --claude-code
# Users can install via CLI or Claude Code
# CLI: photon marketplace add your-org/your-photons
# Claude Code: /plugin marketplace add your-org/your-photonsResult: Your generated photons are now distributable via both Photon CLI and Claude Code plugin manager.
Documentation: See photon-mcp repository for detailed marketplace creation guide.
To modify this skill:
- Edit instructions:
generating-photon-mcps/SKILL.md - Update patterns:
generating-photon-mcps/references/patterns.md - Test changes locally
- Package for release:
python /path/to/skill-creator/scripts/package_skill.py ./generating-photon-mcps . # Create GitHub release and attach generating-photon-mcps.zip
Note: ZIP files are not committed to the repository (see .gitignore). They are distributed via GitHub Releases.
Contributions welcome! Submit issues and PRs at github.com/portel-dev/photon-skill.
- photon-mcp - Photon runtime for MCP servers
- photons - Official marketplace with 17 production-ready photons
MIT
Build focused MCPs. One file at a time.
Made with ⚛️ by Portel