nice

nice

Provides a secure MCP gateway for AI agents to access APIs without exposing raw credentials, with scoped access, audit logging, and OAuth support.

Category
Visit Server

README

nice.

The access layer between your AI agents and everything they touch.

CI License: MIT Node >= 22 Dependencies: 0

Add an API key or connect an app once, in a web UI. Pair each machine once, with a single command. Every agent you run - Claude Code, custom scripts, any CLI - gets exactly the access you scope to it: injected as env vars, or proxied through the hub so the agent never holds a raw key at all. Every access is audited. Any device can be cut off in one click.

Your keys today: pasted into .env files and MCP configs across every laptop, unrotated, unauditable, unrevocable. This replaces that.

How it works

┌─────────────┐     pair once      ┌──────────────┐   scoped, audited   ┌──────────────┐
│  nice hub    │ ◄──────────────── │  your machine │ ◄────────────────  │  your agents  │
│  (self-host) │                    │  (nice CLI)   │    env or MCP      │  claude, ...  │
└─────────────┘                    └──────────────┘                    └──────────────┘
   encrypted vault, web UI,           device token,                       nice run -- claude
   OAuth refresh, audit log           ~/.nice/config                      nice mcp serve

Quickstart

Requires Node 22+. Zero dependencies - nothing to install.

git clone https://github.com/fainir/nice && cd nice
node server/server.js
# nice hub listening on http://localhost:8787
  1. Open http://localhost:8787, create your account, and add a connection (an API key, or OAuth once configured). Secrets are AES-256-GCM encrypted before touching disk; the UI only ever shows the last 4 characters again.
  2. Install the CLI and pair the machine your agents run on (Devices tab → "Pair a device"):
npm install -g .          # from the repo; gives you the `nice` command
nice pair <CODE> --server http://localhost:8787
  1. Give every agent access:
nice run -- claude                   # any command, all scoped keys injected as env vars
nice run --only GITHUB_TOKEN -- npx -y @modelcontextprotocol/server-github
eval "$(nice env)"                   # or load into the current shell
nice status                          # what this machine can reach
nice unpair                          # revoke this machine, server-side too

Gateway mode - agents never see your keys

nice mcp serve

runs an MCP server (stdio) exposing list_connections and http_request. When an agent calls http_request, the hub makes the API call and injects auth server-side - the credential never enters the agent's process. Requests are restricted to each provider's real API origin, client-supplied auth headers are stripped, and every call is audited.

Plug into Claude Code via .mcp.json:

{ "mcpServers": { "nice-hub": { "command": "nice", "args": ["mcp", "serve"] } } }

Scoping, audit, revocation

  • Scope per device: in the Devices tab, limit any paired machine to exactly the connections it should see - enforced for both env injection and the gateway.
  • Audit everything: every login, key save, pairing, secret read, and proxied call lands in a per-user audit log with the acting device.
  • Revoke instantly: delete a device in the UI (or nice unpair from the machine) and its access dies immediately.

Connect apps with sign-in (OAuth)

The full authorization-code flow (single-use state, encrypted token storage, automatic refresh) is built in for GitHub, Google, and Slack - and any custom OAuth provider. Register an OAuth app with the provider (callback: <your hub>/oauth/callback), then:

// data/oauth.json
{ "github": { "clientId": "...", "clientSecret": "..." } }

A "Connect with sign-in" button lights up on the Connections tab - no restart needed. Tokens refresh automatically whenever an agent uses them.

Deploy

docker build -t nice-hub .
docker run -d -p 8787:8787 -v nice-data:/data --name nice-hub nice-hub

The vault (store + master key) lives in the nice-data volume - back it up. Always put TLS in front (Caddy, nginx, or your platform) for any non-localhost deployment.

Env var Default Meaning
NICE_PORT 8787 server port
NICE_DATA ./data server data dir (store + master key + oauth.json)
NICE_HOME ~/.nice CLI config dir

Security model

Self-host trust model: your machine, your keys, your master key. Vault encrypted with AES-256-GCM; passwords scrypt-hashed; tokens stored only as SHA-256 hashes; single-use expiring pairing codes; rate-limited auth; origin-allowlisted proxy. Full details and reporting instructions in SECURITY.md.

FAQ

Why trust this with my keys? You don't have to trust anyone - it's self-hosted, zero-dependency, and small enough to read in an afternoon (~1500 lines). Your keys never leave your infrastructure.

How is this different from 1Password CLI or Doppler? Those inject secrets for humans and CI. Nice is agent-native: per-device pairing and scoping, an audit trail of what each agent read, one-click revocation, OAuth refresh handled for you, and an MCP gateway where agents call APIs without ever holding credentials.

What if the hub is down? nice run fails closed (no stale secrets on disk). Run the hub on the same machine or your LAN for zero-dependency startups.

Is there a hosted version? Not yet. The roadmap includes a zero-knowledge hosted mode - where the server cannot decrypt your vault - after an external audit.

Contributing

PRs welcome - see CONTRIBUTING.md. Security reports: SECURITY.md (please, not public issues).

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured