PHPackages                             jelte-ten-holt/in-other-agents - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. jelte-ten-holt/in-other-agents

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

jelte-ten-holt/in-other-agents
==============================

MCP (Streamable HTTP) scaffolding for Laravel apps — AgentTool base class, bearer + OAuth 2.1 (Passport) auth with RFC 7591 Dynamic Client Registration, tool registry, audit log subscriber.

v0.2.0(2w ago)08MITPHPPHP ^8.3

Since May 20Pushed 2w agoCompare

[ Source](https://github.com/Jelte-ten-Holt/in-other-agents)[ Packagist](https://packagist.org/packages/jelte-ten-holt/in-other-agents)[ RSS](/packages/jelte-ten-holt-in-other-agents/feed)WikiDiscussions main Synced 1w ago

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

in-other-agents
===============

[](#in-other-agents)

MCP (Streamable HTTP) scaffolding for Laravel apps. Provides:

- `AgentTool` abstract base — the single point of coupling to `opgginc/laravel-mcp-server`
- `AuthenticateAgent` middleware — bearer **and** OAuth 2.1 (Passport) token check, request stamping for log correlation
- OAuth discovery + RFC 7591 Dynamic Client Registration so Co-work / web MCP clients can self-onboard
- `ToolRegistry` — resolves the consumer's `config('agents.tools')` list
- `AgentLogSubscriber` — audit logging of tool invocations and DCR registrations to a Monolog channel
- Service provider wiring the `/mcp` route, OAuth routes, middleware, and log subscriber

This package ships zero tools of its own. Consumers register everything via `config/agents.php`.

Install
-------

[](#install)

```
composer require jelte-ten-holt/in-other-agents
```

Laravel package discovery picks up the service provider automatically.

Publish the config (optional — defaults work out of the box):

```
php artisan vendor:publish --tag=agents-config
```

Set the bearer token in `.env`:

```
AGENT_BEARER_TOKEN=some-long-random-string

```

An empty token fails closed — the `/mcp` endpoint rejects everything until a token is set.

Defining a tool
---------------

[](#defining-a-tool)

Create a class that extends `InOtherAgents\AgentTool`:

```
namespace App\Mcp\Tools;

use InOtherAgents\AgentTool;

final class Ping extends AgentTool
{
    public static function identifier(): string
    {
        return 'ping';
    }

    public static function displayName(): string
    {
        return 'Ping';
    }

    public function description(): string
    {
        return 'Health check — returns pong.';
    }

    public function inputSchema(): array
    {
        return [
            'type' => 'object',
            'properties' => new \stdClass(),
        ];
    }

    public function __invoke(array $arguments): array
    {
        return ['result' => 'pong'];
    }
}
```

Register it in `config/agents.php`:

```
'tools' => [
    App\Mcp\Tools\Ping::class,
],
```

Then POST to `/mcp` with `Authorization: Bearer ` and a standard MCP JSON-RPC envelope.

Audit log
---------

[](#audit-log)

Every tool invocation dispatches `InOtherAgents\Events\ToolInvoked` (success) or `ToolInvocationFailed` (throw). The bundled `AgentLogSubscriber` writes them to the configured Monolog channel (`AGENT_LOG_CHANNEL`, defaults to `stack`). Bearer tokens are hashed before logging — never the raw value.

Errors thrown as `InvalidArgumentException` are translated to JSON-RPC `INVALID_PARAMS` so the calling agent sees the actual message. Other throwables propagate as the framework's `INTERNAL_ERROR`.

OAuth (since 0.2.0)
-------------------

[](#oauth-since-020)

Bearer remains the default. To unlock OAuth for Co-work / web MCP clients:

1. `composer require laravel/passport`
2. `php artisan passport:install` (generates encryption keys + initial clients)
3. Configure the `api` guard in `config/auth.php`: ```
    'guards' => [
        'api' => ['driver' => 'passport', 'provider' => 'users'],
    ],
    ```
4. In `.env`: ```
    AGENT_OAUTH_ENABLED=true
    AGENT_CANONICAL_URL=https://your-app.example.com/mcp

    ```

What you get:

- `POST /oauth/register` — RFC 7591 Dynamic Client Registration. Co-work posts here on first connect when the connector form is left with blank OAuth fields. Open by default; set `AGENT_DCR_INITIAL_ACCESS_TOKEN` to gate it.
- `GET /.well-known/oauth-authorization-server` — RFC 8414 discovery doc.
- `GET /.well-known/oauth-protected-resource` — RFC 9728 doc. Advertised in `WWW-Authenticate` on every 401 from `/mcp`.
- RFC 8707 `resource` parameter enforcement on every Passport route (off by default — flip `AGENT_OAUTH_REQUIRE_RESOURCE=true` once every known client sends it).
- Scope-gated access (`agent` base, `agent.admin` elevated). Static bearer holders are admin by construction; that path is untouched.

End-to-end OAuth flow is verified via the consumer app's Passport setup; the package's test suite covers the metadata endpoints, resource enforcement, and the bearer path.

Versioning
----------

[](#versioning)

[Semantic Versioning](https://semver.org/). Pre-1.0, the surface may shift between minor versions while consumers iterate.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance96

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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 ~0 days

Total

2

Last Release

20d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dca6b41455a8766d107925ca88501a1623133b9fb9a0f460ad4c3aafa2697da0?d=identicon)[Jelte-ten-Holt](/maintainers/Jelte-ten-Holt)

---

Top Contributors

[![Jelte-ten-Holt](https://avatars.githubusercontent.com/u/61015702?v=4)](https://github.com/Jelte-ten-Holt "Jelte-ten-Holt (3 commits)")

---

Tags

laravelmcpaiAgentclaudemcp-serverstreamable-http

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jelte-ten-holt-in-other-agents/health.svg)

```
[![Health](https://phpackages.com/badges/jelte-ten-holt-in-other-agents/health.svg)](https://phpackages.com/packages/jelte-ten-holt-in-other-agents)
```

###  Alternatives

[vizra/vizra-adk

Vizra Agent Development Kit - A comprehensive Laravel package for building intelligent AI agents.

29431.7k](/packages/vizra-vizra-adk)[joshcirre/instruckt-laravel

Visual feedback for AI coding agents — Laravel MCP package

17218.6k2](/packages/joshcirre-instruckt-laravel)[php-mcp/laravel

Laravel SDK for building Model Context Protocol (MCP) servers - Seamlessly integrate MCP tools, resources, and prompts into Laravel applications

472122.4k2](/packages/php-mcp-laravel)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

74287.1k1](/packages/mozex-anthropic-laravel)[vectorifyai/vectorify-laravel

Vectorify package for Laravel. The fastest way to ask AI about your data.

196.1k](/packages/vectorifyai-vectorify-laravel)[mohamed-ashraf-elsaed/claude-agent-sdk-laravel

Anthropic Claude Agent SDK for PHP &amp; Laravel — build AI agents with tool use, sandboxing, MCP servers, subagents, hooks, and structured output via the Claude Code CLI

151.1k](/packages/mohamed-ashraf-elsaed-claude-agent-sdk-laravel)

PHPackages © 2026

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