
nia-connectors
io.github.nia-teams/nia-connectors
Connect AI clients to services via a local MCP gateway with encrypted credentials.
Documentation
Nia Connectors
简体中文 · Connector Registry · Glama
Give Claude Code, Codex, Cursor, Antigravity, and other global AI tools access to hundreds of services (primarily Chinese services).
- Open the local page, find the services you use, and sign in with one click (or enter a key once).
- Click 接入 Agent (Connect Agent) and paste the config into your AI client.
- Your AI can then call the services you connected, with credentials kept encrypted on your own machine.

Note: The web dashboard UI is currently in Chinese (English labels for key buttons are noted below). Using an AI coding assistant to set this up? Load
skills/nia-connectors/SKILL.md.
Quick start
With Node.js 20.19 or later, start from any directory:
npx -y @nia-teams/connectors
To build from source, clone the repository and run from its root:
npm ci
npm run build
npm start
Open http://127.0.0.1:3840 in your browser.
1. Connect your services
Search for any service and follow its setup prompt:
- Browser sign-in (OAuth): Click 前往授权连接 (Authorize) and approve access with the provider—no need to register your own OAuth app. Test the connection and choose which tools to expose.
- API key: Enter your key once; it is encrypted and stored locally.
- CLI tools: The dashboard checks whether the vendor CLI is installed locally and shows its install and sign-in commands (run in your local shell rather than through
/mcp).

2. Connect your AI
Click 接入 Agent (Connect Agent) and copy the URL (http://127.0.0.1:3840/mcp by default) or the JSON snippet into Claude Code, Codex, Cursor, Antigravity, or any client that supports MCP.

Every enabled service is exposed behind that single address over Streamable HTTP MCP under <connectorId>__<toolName> (tools only; prompts and resources are not aggregated). Refresh the tool list in your AI client after adding services or changing tool filters.
Auth and data boundary
- Your credentials stay on your machine: Tokens and API keys are encrypted locally with AES-256-GCM and are never stored in a cloud database.
- Most services sign in directly from your machine: Your computer talks straight to the provider to authorize, exchange, and refresh tokens (standard MCP OAuth 2.1 with dynamic registration and PKCE S256).
- Some services relay sign-in through a stateless broker: For providers that require a pre-registered app, the sign-in callback, token exchange, and refresh pass through
nia-teams.combecause the app'sclient_secretcannot live in the client. The broker does not store your tokens, and once signed in, all tool calls go directly from your machine to the provider. - Disconnecting: Clicking Disconnect clears the local sign-in credentials. To revoke the grant itself, remove access in the provider's account settings.
Configuration
| Variable | Purpose |
|---|---|
REGISTRY_URL | HTTP(S) URL, absolute path, or file:// URL of catalog.json. Defaults to the public connector catalog (https://nia-teams.github.io/nia-connector-registry/catalog.json). |
HOST | Listen address. Defaults to 127.0.0.1. |
PORT | Listen port. Defaults to 3840. |
PUBLIC_BASE_URL | HTTP(S) origin used for generated MCP URLs, OAuth callbacks, and Host/Origin checks. Defaults to loopback; preserve this Host at any reverse proxy. |
NIA_CONNECTORS_HOME | State directory. Defaults to ~/.nia-connectors; use an absolute path for a custom directory and a separate directory per instance. |
NIA_OAUTH_BROKER_URL | Trusted OAuth broker base URL. Defaults to https://nia-teams.com/api/connectors/oauth. |
ALLOW_STDIO | Set to 1 to allow running local stdio MCP subprocesses defined by the registry. Disabled by default. |
Self-hosting
To run the Docker image locally, build it from the checkout and publish the port only on loopback:
docker build -t nia-connectors .
docker run --rm -p 127.0.0.1:3840:3840 -v nia-connectors-data:/home/node/.nia-connectors nia-connectors
- The hub is single-user and does not authenticate API or
/mcprequests. Keep it on loopback, a private network, or behind an authenticated TLS proxy. - For remote OAuth, set
PUBLIC_BASE_URLto a browser-reachable HTTPS origin, allow top-level GET requests to/api/oauth/callback, and avoid logging query strings at the reverse proxy. - Use a trusted registry and least-privilege credentials. With
ALLOW_STDIO=1, registry-defined local MCP programs run as the server's OS user. - Protect the encrypted state file and
.master.keytogether. Disabling an API-key connector keeps the local key; revoke the key with the provider to remove access.
Development
npm run dev
npm run build
npm test
Vite serves the dashboard on 127.0.0.1:5173 and proxies API/MCP requests to the Node server. Production serves the dashboard, /api, and /mcp on one port.
The offline demo is available from a source checkout only; the npm package and Docker image do not include examples/. After building from source, run this command from the checkout root, then enable 本地演示工具 (Local Demo Tools) in the dashboard to try the echo tool:
REGISTRY_URL="$PWD/examples/catalog.json" ALLOW_STDIO=1 npm start
Glama MCP Server
Browse the listing, inspect scores, or test with MCP Inspector on Glama:
@nia-teams/connectorsnpm install @nia-teams/connectors