Provides tools and resources for building Filament admin panels, including component references, implementation plan generation, and documentation lookup for both v4 and v5 versions.
Assists with Laravel development within the Filament ecosystem by providing lookups for PHP namespaces, Eloquent relationship types, and Artisan command references.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Filament MCP ServerCreate an implementation plan for a Product resource in Filament 5.x"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Filament MCP Server
A Model Context Protocol (MCP) server that provides tools, prompts, and resources for working with Filament - the Laravel admin panel framework.
Overview
This MCP server enables AI assistants to help developers build Filament admin panels by providing:
Component Reference: Access to Filament form, table, and infolist component documentation
Code Generation: Generate implementation plans for Filament resources
Documentation Lookup: Fetch and search official Filament documentation
Namespace Lookup: Get correct PHP namespaces for Filament classes
Command Reference: List available Filament artisan commands
Relationship Helpers: Laravel Eloquent relationship type references
Supports both Filament v4.x and v5.x.
Requirements
Node.js: v20.10.0 or higher
npm: v9.0.0 or higher (or pnpm v8.0.0+)
Installation
Clone the repository:
cd filament-mcp-serverInstall dependencies:
npm installBuilding
Compile TypeScript to JavaScript:
npm run buildThis compiles the source from src/ to dist/. The main entry point is dist/index.js.
Running
Development Mode
Watch for changes and rebuild automatically:
npm run devProduction Mode
Run the compiled server:
npm startStdio Mode
The server uses stdio transport by default. This allows it to communicate with MCP clients over standard input/output streams. The server starts and waits for JSON-RPC messages from the client.
MCP Integration
To use this server with MCP-compatible AI assistants, you need to register it as an MCP server. Below are configuration examples for popular clients.
Claude Desktop
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"filament": {
"command": "node",
"args": ["/absolute/path/to/filament-mcp-server/dist/index.js"],
"env": {}
}
}
}or
(I prefer npx)
{
"mcpServers": {
"filament": {
"command": "npx",
"args": ["/absolute/path/to/filament-mcp-server"],
"env": {}
}
}
}
Replace `/absolute/path/to/filament-mcp-server` with the actual path to this project.
### Cursor
1. Open Cursor settings
2. Navigate to **Features** → **MCP**
3. Add a new MCP server with the following configuration:
```json
{
"mcpServers": {
"filament": {
"command": "node",
"args": ["/absolute/path/to/filament-mcp-server/dist/index.js"]
}
}
}Other MCP Clients
For other MCP-compatible assistants, configure them to spawn a child process using:
node /path/to/filament-mcp-server/dist/index.jsThe server communicates via stdio using JSON-RPC 2.0 protocol.
Available Tools
The server provides the following MCP tools:
Tool | Description |
Get detailed information about a specific Filament component (properties, methods, examples) | |
List all components in a category (forms, tables, infolists, actions, schemas, support) | |
Get the correct PHP namespace for a Filament class type | |
Generate a complete Filament implementation plan for a resource | |
Get a list of Filament artisan commands with descriptions | |
Get Laravel Eloquent relationship types with examples | |
Fetch documentation from filamentphp.com for a specific category/section | |
List all available documentation sections | |
Discover live documentation routes from the official website | |
Search Filament documentation and return matching sections |
Tool Parameters
version: All tools support aversionparameter ("4.x"or"5.x") to target specific Filament versions. Defaults to"5.x".component: Component name (e.g.,TextInput,Select,Table)category: Component category (forms,tables,infolists,actions,schemas,support)classType: Filament class type (model,resource,widget,relation_manager, etc.)description: What you want to build (used for plan generation)
Available Prompts
The server provides the following MCP prompts for common tasks:
Prompt | Description |
| Generate an implementation plan for a Filament resource |
| Help debug a Filament issue with error messages |
| Generate a Filament RelationManager for relationships |
| Generate a custom Filament action |
| Migrate Filament v4 code to v5 |
| Generate a form with validation rules |
| Generate a table with filters and actions |
Available Resources
The server provides the following MCP resources:
Resource URI | Description |
| Complete Filament v4 component reference |
| Complete Filament v5 component reference |
| Filament v4 artisan commands |
| Filament v5 artisan commands |
| Filament v4 documentation index |
| Filament v5 documentation index |
| Quick reference for common patterns |
Configuration
Version Targeting
Most tools accept an optional version parameter to target Filament v4 or v5:
// Example tool call with version
{
tool: "filament_get_component",
arguments: {
component: "TextInput",
version: "5.x" // or "4.x"
}
}Namespace Mapping
The server includes predefined namespace mappings for different Filament class types:
Class Type | v4.x Namespace | v5.x Namespace |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| (not available) |
|
|
|
|
|
|
|
Testing
Run tests with Vitest:
npm testRun tests in watch mode:
npm run test:watchProject Structure
filament-mcp-server/
├── src/
│ ├── index.ts # Main entry point
│ ├── data/
│ │ └── filament-reference.ts # Component reference data
│ ├── lib/
│ │ ├── doc-fetcher.ts # Documentation fetching utilities
│ │ └── plan-generator.ts # Implementation plan generator
│ ├── prompts/
│ │ └── index.ts # MCP prompts
│ ├── resources/
│ │ └── index.ts # MCP resources
│ └── tools/
│ └── index.ts # MCP tools
├── dist/ # Compiled JavaScript output
├── tests/
│ └── index.test.ts # Test suite
├── package.json
├── tsconfig.json
└── README.mdDependencies
@modelcontextprotocol/sdk: MCP protocol implementation
cheerio: HTML parsing for documentation fetching
zod: Schema validation for tool parameters
License
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.