PHPackages                             hideyukimori/nene-mcp - 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. [API Development](/categories/api)
4. /
5. hideyukimori/nene-mcp

ActiveLibrary[API Development](/categories/api)

hideyukimori/nene-mcp
=====================

Standalone PHP stdio MCP server for NeNe / NENE2-style OpenAPI tool catalogs

v0.1.8(2w ago)036↓100%[2 PRs](https://github.com/hideyukiMORI/nene-mcp/pulls)MITShellPHP ^8.2CI passing

Since May 22Pushed 2w agoCompare

[ Source](https://github.com/hideyukiMORI/nene-mcp)[ Packagist](https://packagist.org/packages/hideyukimori/nene-mcp)[ Docs](https://github.com/hideyukiMORI/nene-mcp)[ RSS](/packages/hideyukimori-nene-mcp/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (8)Dependencies (2)Versions (60)Used By (0)

[![CI](https://github.com/hideyukiMORI/nene-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/hideyukiMORI/nene-mcp/actions/workflows/ci.yml)[![Docs](https://github.com/hideyukiMORI/nene-mcp/actions/workflows/docs.yml/badge.svg)](https://hideyukimori.github.io/nene-mcp/)

nene-mcp
========

[](#nene-mcp)

A small PHP library that adds **stdio MCP (Model Context Protocol)** to [NeNe](https://github.com/hideyukiMORI/NeNe) apps with a single **`composer require`**—no NeNe fork, no MCP code in framework core.

Developers familiar with legacy PHP can run it with **Composer and environment variables only**. It works **standalone** without importing NeNe or NENE2 source. Any HTTP API—Laravel, vanilla PHP, Node, etc.—can use the same bridge when you provide a NENE2-compatible `docs/mcp/tools.json`.

**Learn more:** [Documentation site](https://hideyukimori.github.io/nene-mcp/) · [docs/project.md](docs/project.md) · [NeNe integration](docs/integration/nene.md)

Features
--------

[](#features)

- **Standalone**: built-in read-only tool `nene_mcp_about` out of the box.
- **NENE2-compatible wire**: newline-delimited JSON-RPC with `initialize` / `tools/list` / `tools/call`.
- **Committed catalog JSON** (optional) adds OpenAPI-aligned tool entries.
- **Security defaults**: write fail-closed, no redirect following, catalog validation (`safety: read|write`).
- **SMB / staging operators** (v0.1.8+): configurable HTTP timeout, optional TLS CA bundle, opt-in stderr HTTP log — see [SMB adoption checklist](https://hideyukimori.github.io/nene-mcp/explanation/smb-adoption-checklist).
- Shared **[Issue-driven workflow + Conventional Commits](docs/development/commit-conventions.md)** with NeNe and NENE2.

**Scope:** MCP sidecar for developers and small teams (Cursor, Claude Desktop, internal staging)—not a customer-facing API gateway. See [Commercial use &amp; scope](https://hideyukimori.github.io/nene-mcp/explanation/commercial-use-and-scope).

Install
-------

[](#install)

```
composer require hideyukimori/nene-mcp
```

Published on [Packagist](https://packagist.org/packages/hideyukimori/nene-mcp). Pin for reproducible deploys:

```
composer require hideyukimori/nene-mcp:0.1.8
```

Or clone for development:

```
git clone git@github.com:hideyukiMORI/nene-mcp.git
cd nene-mcp
composer install
composer test
```

Cursor / MCP client example (local NeNe app)
--------------------------------------------

[](#cursor--mcp-client-example-local-nene-app)

Set the **absolute path** to `vendor/bin/nene-mcp` and env vars for your environment.

### With tool catalog (typical)

[](#with-tool-catalog-typical)

```
{
  "mcpServers": {
    "nene-mcp": {
      "command": "php",
      "args": ["/ABS/PATH/vendor/bin/nene-mcp"],
      "env": {
        "NENE_MCP_API_BASE_URL": "http://localhost:8080",
        "NENE_MCP_TOOLS_JSON": "/ABS/PATH/ne-app/docs/mcp/tools.json"
      }
    }
  }
}
```

### Catalog-free (smoke test / Day 0)

[](#catalog-free-smoke-test--day-0)

Omit `NENE_MCP_TOOLS_JSON` until `tools.json` exists. MCP starts with only `nene_mcp_about`:

```
{
  "mcpServers": {
    "nene-mcp": {
      "command": "php",
      "args": ["/ABS/PATH/vendor/bin/nene-mcp"],
      "env": {
        "NENE_MCP_API_BASE_URL": "http://localhost:8080"
      }
    }
  }
}
```

Do **not** set `NENE_MCP_TOOLS_JSON` to a placeholder path—a missing file fails `tools/list` entirely.

Without a catalog, MCP still starts and `tools/list` exposes only `nene_mcp_about`. See **[docs/example-ne-health-catalog.md](docs/example-ne-health-catalog.md)** for a minimal NeNe sample when you add HTTP tools.

Environment variables
---------------------

[](#environment-variables)

VariableMeaning`NENE_MCP_API_BASE_URL`REST base URL (no trailing slash). Default `http://localhost:8080`. Overridable via `NENE2_LOCAL_API_BASE_URL`.`NENE_MCP_TOOLS_JSON`Path to NENE2-compatible tool catalog JSON. When omitted, no OpenAPI HTTP tools—only `nene_mcp_about`. Also accepts `NENE2_LOCAL_TOOLS_JSON`.`NENE_MCP_BEARER_TOKEN`For endpoints that require Bearer (e.g. `safety: write`). **Keep secrets in env only.**Optional (SMB / staging — v0.1.8+):

VariableMeaning`NENE_MCP_HTTP_TIMEOUT_SEC`HTTP timeout seconds (`1`–`120`, default `10`)`NENE_MCP_TLS_CA_FILE`PEM CA bundle path for `https://` base URLs`NENE_MCP_LOG`Set to `stderr` for safe per-request HTTP lines (never stdout)Full reference: [Environment variables](https://hideyukimori.github.io/nene-mcp/reference/environment-variables).

Composer scripts
----------------

[](#composer-scripts)

```
composer test          # PHPUnit
composer check         # PHPUnit + PHPStan level 8
```

Documentation
-------------

[](#documentation)

DocumentContents[docs/project.md](docs/project.md)Purpose, NeNe relationship, architecture[docs/integration/nene.md](docs/integration/nene.md)Composer integration for NeNe[docs/integration/other-platforms.md](docs/integration/other-platforms.md)Other frameworks, vanilla PHP, other languages[docs/README.md](docs/README.md)Documentation index[AGENTS.md](AGENTS.md)Guide for AI agentsContributing
------------

[](#contributing)

Governance follows NENE2-style strict policy—read before opening a PR:

- `docs/workflow.md` — Issue and branch policy
- `docs/development/coding-standards.md` — PHP / MCP rules
- `docs/development/security-policy.md` — security requirements
- `docs/review/mcp-server.md` — pre-PR checklist for code changes
- `docs/field-trials/README.md` — field trial methodology
- `docs/development/release-policy.md` — versioning and Packagist timing
- `docs/CONTRIBUTING.md` — full contribution guide

License
-------

[](#license)

MIT — see `LICENSE`.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance96

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Total

8

Last Release

18d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/84d17cf671a64dbdd392634b860c52a07afa415ee38b9c3bf63e6e0e23d0abd0?d=identicon)[hideyukiMORI](/maintainers/hideyukiMORI)

---

Top Contributors

[![hideyukiMORI](https://avatars.githubusercontent.com/u/14159242?v=4)](https://github.com/hideyukiMORI "hideyukiMORI (110 commits)")

---

Tags

phpmcpopenapijson-rpcstdioModel Context Protocolnenenene2

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/hideyukimori-nene-mcp/health.svg)

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

###  Alternatives

[harmbandstra/swagger-ui-bundle

Exposes swagger UI inside your Symfony project through a route (eg. /docs)

40881.6k](/packages/harmbandstra-swagger-ui-bundle)[alle-ai/anthropic-api-php

The go-to PHP library for the Anthropic API — Messages, streaming, tool use, vision, prompt caching, extended thinking, MCP, Files, Batches. Maintained by Alle-AI.

2625.3k](/packages/alle-ai-anthropic-api-php)

PHPackages © 2026

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