Metadata-Version: 2.5
Name: eon-mcp-local
Version: 0.1.0
Summary: Local stdio MCP server for the Eon platform — OAuth client_credentials auth for CI, agents, and scripts
Project-URL: Homepage, https://eon.io
Project-URL: Documentation, https://docs.eon.io
Author-email: Eon <support@eon.io>
License: Apache-2.0
License-File: LICENSE
Keywords: claude-code,client-credentials,eon,mcp,model-context-protocol,oauth,stdio
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: click<9,>=8.1.0
Requires-Dist: fastmcp==3.2.4
Requires-Dist: httpx<=0.28.1,>=0.28.0
Requires-Dist: mcp==1.28.1
Requires-Dist: pydantic-settings<=2.14.2,>=2.7.0
Requires-Dist: pydantic<=2.12.5,>=2.10.3
Requires-Dist: python-json-logger==4.0.0
Requires-Dist: pyyaml<7,>=6.0
Description-Content-Type: text/markdown

# eon-mcp-local

Local stdio [MCP](https://modelcontextprotocol.io) server for the [Eon](https://eon.io) platform.

Lets MCP clients (Claude Code, Cursor, Codex, Devin, scripts in CI) call Eon REST APIs over a non-interactive `client_credentials` OAuth flow. Unlike the remote `https://mcp.eon.io` server (which uses an interactive browser-based OAuth flow), this CLI is suitable for machines and pipelines.

## Install

First install [`uv`](https://docs.astral.sh/uv/getting-started/installation/) via your preferred method — Homebrew, pipx, your OS package manager, or Astral's install script (see Astral's docs for checksum-verified options).

Then pick one:

```bash
# zero-install (uvx fetches on first run, caches for next time) — recommended
uvx eon-mcp-local serve

# persistent install
uv tool install eon-mcp-local

# or pipx if you prefer
pipx install eon-mcp-local
```

## Configure

Create API credentials in the Eon console (Settings → API Credentials), then set:



```bash
export EON_CLIENT_ID=...
export EON_CLIENT_SECRET=...
export EON_ACCOUNT_DOMAIN=acme        # the 'acme' in 'acme.console.eon.io'
```

## Wire into Claude Code

```bash
claude mcp add eon -- uvx eon-mcp-local serve
```

Equivalent for Cursor / Codex / Devin: add a stdio MCP server with command `uvx eon-mcp-local serve` and the env vars above.

## Using from an agent framework

See [`examples/adk_example.py`](examples/adk_example.py) for a runnable Google ADK agent that
spawns `eon-mcp-local` as a stdio subprocess and exposes its tools to Gemini. The same pattern
(spawn a subprocess, speak MCP over stdin/stdout) works with any MCP-aware framework.

## Environment variables

| Variable | Required | Description |
| --- | --- | --- |
| `EON_CLIENT_ID` | yes | OAuth client_id from `POST /api/customer/v1/api-credentials` |
| `EON_CLIENT_SECRET` | yes | OAuth client_secret from the same endpoint |
| `EON_ACCOUNT_DOMAIN` | yes | Your tenant subdomain (the `acme` in `acme.console.eon.io`) |
| `EON_LOG_LEVEL` | no | `DEBUG` / `INFO` / `WARNING` / `ERROR` (default `INFO`) |
| `EON_JSON_LOGGING` | no | `true` to emit JSON logs to stderr |

## Troubleshooting

- **`error: missing required environment variables`** — set the three required env vars before invoking `serve`.
- **HTTP 401 on every call** — verify the `client_id`/`client_secret` are active in the Eon console and were issued for the same tenant as `EON_ACCOUNT_DOMAIN`.
- **DNS error / connection refused** — `EON_ACCOUNT_DOMAIN` must be the bare subdomain, not a full URL.
- **Garbled output** — logs go to stderr by design; if you see them mixed with stdout, your MCP client is merging streams. Filter or capture stderr separately.

## Reporting security issues

Please report suspected security issues privately to <security@eon.io> rather than in a public channel.

## License

Apache License 2.0 — see [`LICENSE`](LICENSE).
