laravel-mcp-server: Cursor rule for Windsurf

.windsurfrules

windsurfrules is a cursor rule for Windsurf from opgginc/laravel-mcp-server. It costs 1,204 tokens per session, scanned A, original, MIT.

A set of project rules for building Laravel packages that provide Model Context Protocol (MCP) servers. MCP is a way for software tools to expose functions that an AI assistant can call; these rules cover HTTP transport, testing, formatting, and static checks.

In plain words
What is it for?
Use it when adding MCP tools, configuring the Laravel server, running its tests, formatting code, or running static analysis.
Why use it?
It gives contributors consistent commands and constraints for developing and checking this PHP package.

Cursor rule for Windsurf

Written for Windsurf: a Windsurf rule.

This is opgginc/laravel-mcp-server's own configuration. It tells Windsurf how to work on laravel-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything laravel-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to opgginc/laravel-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/opgginc/laravel-mcp-server/main/.windsurfrules
Clone the repo
git clone --depth 1 https://github.com/opgginc/laravel-mcp-server

Made for: Windsurf.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for windsurfrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/opgginc/laravel-mcp-server/windsurfrules/github.svg)](https://agentmods.dev/rules/opgginc/laravel-mcp-server/windsurfrules)
Your own site
<a href="https://agentmods.dev/rules/opgginc/laravel-mcp-server/windsurfrules"><img src="https://agentmods.dev/badge/rules/opgginc/laravel-mcp-server/windsurfrules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for windsurfrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/opgginc/laravel-mcp-server/windsurfrules"><img src="https://agentmods.dev/badge/rules/opgginc/laravel-mcp-server/windsurfrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,204 This file is loaded in full into every session.
When invoked 1,204 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01204 $0.01204
Opus 5.5 $0.00482 $0.00482
Sonnet 5.5 $0.00241 $0.00241
Haiku 4.5 $0.00120 $0.00120

Measured 14d ago against content hash 3ae4a718a046, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

windsurfrules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.windsurfrules · 137 lines

How it starts

The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Laravel MCP Server Development Rules

Project Overview

This is a Laravel package for implementing Model Context Protocol (MCP) servers with Streamable HTTP transport and legacy SSE support. Focus on secure, enterprise-ready MCP implementations.

Technical Specification

  • Support Laravel 10, 11, 12
  • Support PHP 8.2+
  • Namespace: OPGG\LaravelMcpServer\

Common Commands

Testing and Quality

  • Run tests: vendor/bin/pest
  • Code formatting: vendor/bin/pint
  • Static analysis: vendor/bin/phpstan analyse

MCP Tool Development

  • Create tool: php artisan make:mcp-tool ToolName
  • Test tool: php artisan mcp:test-tool ToolName
  • List tools: php artisan mcp:test-tool --list
  • Test with JSON: php artisan mcp:test-tool ToolName --input='{"param":"value"}'

Configuration

  • Publish config: php artisan vendor:publish --provider="OPGG\LaravelMcpServer\LaravelMcpServerServiceProvider"

Development Server

CRITICAL: Never use php artisan serve with SSE provider - use Laravel Octane:

composer require laravel/octane
php artisan octane:install --server=frankenphp
php artisan octane:start

Laravel Package Development Guidelines

Code Style

  • Add use statements for all Facade classes to call them more concisely
  • Use Facade classes or original Laravel classes instead of helper functions
  • Create new class and refactor if file exceeds 300 lines
  • Use env() instead of Config facade in config files (/config/mcp-server.php)

Type Annotations

  • When specifying nullable types, use string|null instead of ?string
  • Always place null at the end of union types
  • Add type hints and return types to all methods for better IDE support

MCP Implementation Standards

  • All tools must implement ToolInterface
  • Register tools in config/mcp-server.php
  • Use JSON-RPC 2.0 message format strictly
  • Support both Streamable HTTP and SSE transports
  • Implement proper error handling with JsonRpcErrorException

Architecture Overview

Read the full file on GitHub · 137 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 14d ago First seen · 137 lines · 1,204 tokens per session scan A 3ae4a718a046

Subscribe to this mod's changes

windsurfrules is a cursor rule published in the GitHub repository opgginc/laravel-mcp-server (330 stars, last pushed 15d ago), licensed MIT. It adds 1,204 tokens to every session, about $0.0048 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-23.

Related

windsurfrules compared with cursor rules from other repositories

windsurfrules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
windsurfrulesopgginc/laravel-mcp-serverCursor rule33015d agoMITA1,204Windsurf
laravelpekral/cursor-rulesCursor rule111mo agoMITA4,121Cursor
laravel-boostkaruhun-developer/ecommerceCursor rule533d agononeA5,430Cursor
10-backendneoshopcn/neo-adminCursor rule134mo agoMITA844Cursor
laravelMacavity/mapeditorCursor rule206mo agoGPL-2.0A600Cursor
owl-adminslowlyo/owl-adminCursor rule6202d agoMITA258Cursor
laravel-php-83-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A404Cursor