PHPackages                             ashwinmram/mcp-pusher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ashwinmram/mcp-pusher

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ashwinmram/mcp-pusher
=====================

Laravel package to push lessons learned to MCP server

v2.0.1(2mo ago)097↓75%MITPHPPHP ^8.2

Since Jan 11Pushed 2mo agoCompare

[ Source](https://github.com/ashwinmram/mcp-pusher)[ Packagist](https://packagist.org/packages/ashwinmram/mcp-pusher)[ RSS](/packages/ashwinmram-mcp-pusher/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (6)Versions (8)Used By (0)

Laravel MCP Pusher
==================

[](#laravel-mcp-pusher)

Laravel package to push lessons learned and project implementation details from your projects to a central MCP server via HTTP API. Works with the [Lessons Learned MCP Server](https://github.com/ashwinmram/mcp-server) so AI agents (e.g. Cursor) can query your knowledge base.

- [GitHub](https://github.com/ashwinmram/mcp-pusher)
- [Packagist](https://packagist.org/packages/ashwinmram/mcp-pusher)

**Important**: This package pushes to a **remote MCP server** via HTTP API. It does **not** interact with your local database or include Lesson model classes.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 12.x or 13.x
- An MCP server that accepts pushes (e.g. [Lessons Learned MCP Server](https://github.com/ashwinmram/mcp-server))

Installation
------------

[](#installation)

```
composer require ashwinmram/mcp-pusher
```

Configuration
-------------

[](#configuration)

Add MCP configuration to your project's `config/services.php`:

```
'mcp' => [
    'server_url' => env('MCP_SERVER_URL'),
    'api_token' => env('MCP_API_TOKEN'),
],
```

Add environment variables to your `.env`:

```
MCP_SERVER_URL=https://your-mcp-server.com
MCP_API_TOKEN=your-api-token-here

```

Usage
-----

[](#usage)

**Workflow:** At the end of each coding session, populate the lessons learned and project details files (`docs/lessons-learned.md`, `docs/lessons_learned.json`, `docs/project-details.md`, `docs/project_details.json`) as required. You need content in at least one source file per command before you can push. **Source files are truncated (emptied) after each successful push** — this prevents duplicate pushes. Regenerate the files at the end of the next session and push again.

### Recommended AI prompts

[](#recommended-ai-prompts)

#### Generic lessons

[](#generic-lessons)

Use this prompt to generate session-agnostic lessons:

```
Let's update lessons-learned.md and lessons_learned.json files and with any lessons learned during this session and save it to the docs folder.    Please ensure the json title and summary are AI friendly so that an AI Agent will easily be able to discern whether or not to use the skill.

```

#### Project-specific lessons

[](#project-specific-lessons)

Use this prompt to capture repository/project implementation details:

```
Let's update two files in the docs folder: project-details.md and project_details.json with any project specific lessons learned during this session.  Please ensure the json title and summary are AI friendly so that an AI Agent will easily be able to discern whether or not to use the skill.

```

### Push lessons

[](#push-lessons)

```
php artisan mcp:push-lessons --source=your-project
```

OptionDescription`--source=`Source project name (default: directory name). Must match the `project` query param when connecting to Project Details MCP.`--lessons-learned=`Path to `lessons-learned.md` (default: `docs/lessons-learned.md`)`--lessons-json=`Path to `lessons_learned.json` (default: `docs/lessons_learned.json`)### Push project details

[](#push-project-details)

```
php artisan mcp:push-project-details --source=your-project
```

OptionDescription`--source=`Source project name (must match `?project=` in Project Details MCP URL)`--project-details-file=`Path to markdown file (default: `docs/project-details.md`)`--project-details-json-dir=`Directory for `project_details.json` or `project_details_*.json` (default: `docs`)`--no-truncate`Do not empty source files after a successful pushFile Layout
-----------

[](#file-layout)

By default, the package reads from these locations:

```
your-project/
└── docs/
    ├── lessons-learned.md      ← Markdown lessons (optional)
    ├── lessons_learned.json    ← JSON array of lessons (optional)
    ├── project-details.md      ← Markdown project details (optional)
    └── project_details.json    ← JSON array of project details (optional)

```

**Lessons** are pushed to `/api/lessons`; **project details** to `/api/project-details`. You need at least one source file with content for each command.

How It Works
------------

[](#how-it-works)

### Lessons

[](#lessons)

- **`lessons-learned.md`**: Categorized as `guidelines` with tags: `laravel`, `lessons-learned`, `guidelines`, `best-practices`, `markdown`
- **`lessons_learned.json`**: JSON array; each object can have `title`, `summary`, `category`, `subcategory`, `type`, `tags`, `content`, `metadata`. Category and tags from the object are used; content keywords add more tags (e.g. "Pest" → `pest`).

### Project details

[](#project-details)

- **`project-details.md`**: Same H2/H3/H4 structure as lessons-learned.md
- **`project_details.json`** or **`project_details_*.json`**: JSON array with same field order as lessons (`title`, `summary`, `category`, `subcategory`, `type`, `tags`, `content`, `metadata`). Use `type` `"project_detail"` or `"ai_output"`.

### API

[](#api)

Normalized data is POSTed to the remote MCP server. The server handles storage, deduplication (by content hash), and validation.

MCP Server
----------

[](#mcp-server)

This package pushes to an MCP server that exposes `/api/lessons` and `/api/project-details`. For a ready-made server, see the [Lessons Learned MCP Server](https://github.com/ashwinmram/mcp-server).

License
-------

[](#license)

MIT

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance88

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~18 days

Recently: every ~26 days

Total

7

Last Release

61d ago

Major Versions

v1.1.0 → v2.0.02026-02-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/82e0a336442acfe6109202ef4a3992c163d3ba07097a9fb68f6d24d3d586f1f1?d=identicon)[ashwinmram](/maintainers/ashwinmram)

---

Top Contributors

[![ashwinmram](https://avatars.githubusercontent.com/u/13768053?v=4)](https://github.com/ashwinmram "ashwinmram (8 commits)")

---

Tags

laravelpackagemcplessons-learned

### Embed Badge

![Health badge](/badges/ashwinmram-mcp-pusher/health.svg)

```
[![Health](https://phpackages.com/badges/ashwinmram-mcp-pusher/health.svg)](https://phpackages.com/packages/ashwinmram-mcp-pusher)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.6k](/packages/larastan-larastan)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76518.2M120](/packages/laravel-mcp)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)[zidbih/laravel-deadlock

Make temporary Laravel workarounds expire and fail CI when ignored.

984.0k](/packages/zidbih-laravel-deadlock)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
