Before you start
- Codex CLI with remote MCP and pre-registered OAuth client support. Run the browser and CLI on the same machine.
- A Network Perspective account with access to the company you want to explore. Ask your Network Perspective administrator to enable AI assistant access if it is unavailable.
- Your organization’s approval to use this tool with your data and allow its connection to Network Perspective.
Contact Network Perspective before your first sign-in to confirm the deployed service supports Codex’s stable callback. Saving this configuration alone does not establish compatibility.
The connection reads the reports and metrics available to your account, including report-visible comments and quotations. It does not change reports or settings.
1. Add Network Perspective
Add the user configuration
Edit ~/.codex/config.toml. Add the following tables, or merge these values into an existing np server entry without duplicating table headers. Preserve your other settings. No client secret is needed.
[mcp_servers.np]
url = "https://app.networkperspective.io/mcp"
scopes = ["np.read", "offline_access"]
[mcp_servers.np.oauth]
client_id = "np-codex"
callback_url = "http://127.0.0.1/callback"Check the callback prerequisite
Before signing in, ask Network Perspective to confirm support for this stable callback. Keep the supplied callback unchanged; Codex chooses its local port.
2. Connect your own account
Run this command in your terminal, then complete the browser sign-in:
codex mcp login np --scopes np.read,offline_accessStart or restart Codex CLI after saving the configuration.
- Sign in with your own Network Perspective account in the browser.
- Choose the intended company or network when offered, review the requested access, and approve the connection.
- Return to your tool and check that Network Perspective is connected.
Each connection is authorized for one company. To work with another company, use a separate connection where your tool supports it.
3. Try the connection
Start a conversation in Codex CLI and ask:
Use Network Perspective to tell me which company I’m connected to and the current reporting month.Check the answer: the assistant should use Network Perspective’s get_company_info tool and return the company you intended to connect and its current reporting month. A server appearing in a list alone does not confirm it is working.
Then try: “What metrics are available?”
If something gets in the way
The callback gains an extra path
The stable callback requires issuer identification support. The authorization metadata must advertise authorization_response_iss_parameter_supported: true and an issuer, and authorization responses must return a matching iss. Without it, Codex may use a server-specific callback path that this registration does not cover. Contact Network Perspective; do not substitute that path yourself.
The server is missing or sign-in expires
Check the user configuration for duplicate np tables and restart Codex. Use the sign-in command again if authentication has expired.
Sign-in or company access fails
Check the exact client ID in this guide. If the client is rejected, contact Network Perspective. For a missing company or access denied, ask your Network Perspective administrator to check membership, AI assistant access, and report permissions.
The callback does not match
Contact support with the client version and callback value only. Do not send a full authorization URL, sign-in code, token, or secret. Do not change callback hosts or paths to work around an error.
Disconnect whenever you need to
In Network Perspective, open Me → Connected agents, find the connection, and disconnect it. This revokes that connection’s access.
Removing it from your AI tool or clearing local files alone does not revoke access in Network Perspective. Disconnecting cannot remove information already shared with the AI provider.
Open Connected agents →Need a hand? Contact Network Perspective →
Codex setup: Official MCP configuration guide.