Connect an agent with MCP
Give your agent shared tasks and product context, with your own permissions and a record of its actions.
Endpoint: https://hub.n1.team/mcp · Streamable HTTP · stateless.
Connect with OAuth
- In Claude, ChatGPT or another remote MCP client with OAuth support, add a custom server with the endpoint above. Availability depends on your client and plan.
- Sign in to your existing Hub account, check the displayed workspace and approve access. Each person connects their own agent. You do not need to copy a key.
- Send the verification prompt below. A saved connection alone does not prove the agent has reached the Hub.
For client implementers: discovery uses the 401 WWW-Authenticate resource_metadata link, protected resource metadata and authorization-server metadata. Authorization Code + PKCE S256, public clients, dynamic client registration, scope hub. No refresh-token grant is advertised: reconnect when authorization expires.
Connect with a personal key
For CLI clients and scripts, create a personal key in Agents → My connections. Store it as N1_HUB_KEY in the environment used by your client. The key is shown once; never commit it or place it in a URL. Revoke it from your own connections if exposed. Each key belongs to one person and workspace.
Codex: add to your MCP configuration, then launch Codex with N1_HUB_KEY available.
[mcp_servers.n1-hub]
url = "https://hub.n1.team/mcp"
bearer_token_env_var = "N1_HUB_KEY"
Other clients: choose HTTP / Streamable HTTP and configure the authorization header. Replace the placeholder using your client’s secret storage; environment substitution syntax varies by client.
Authorization: Bearer <your-personal-key>
Verify the connection
Call get_status. Tell me which person and workspace you act for. Then list_products and get_product_context for my product. Do not change anything yet.
The reply must identify your actual person and workspace. Check the first successful call in Agents. Product visibility matches your account; owner-only operations remain restricted. Removing a person or revoking a key stops subsequent requests.
Implementing a client: first protocol request
Use an MCP SDK to negotiate a supported protocol version, initialize, send notifications/initialized, then tools/list and tools/call. This diagnostic curl only initializes; it does not run a tool. Keep the negotiated version in the MCP-Protocol-Version header on subsequent requests. Stateless transport does not issue an Mcp-Session-Id and does not provide a persistent GET event stream.
curl --fail-with-body 'https://hub.n1.team/mcp' \
-H "Authorization: Bearer $N1_HUB_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
--data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0.0"}}}'
Discover capabilities
The authenticated tools/list response is the complete live reference: names, descriptions, input JSON Schemas and annotations. Discover resources/list, resources/templates/list and prompts/list through the same client. Do not hardcode a tool count or assume every discovered action is allowed for your role.
| Workflow | Start with |
|---|---|
| Identity and context | get_status, list_products, get_product_context |
| Tasks and handoff | list_tasks, get_task, create_task, update_task, review_task |
| Agent work queue | next_task, get_agent_work |
| Product data | query_metric, get_overview, get_sources |
| Updates | get_digest, daily_digest (prompt) |
Product context is also available as n1://products/{slug}/context; plan_week is a planning prompt. Read the server instructions and agentPolicy before changing work. Closing a task requires stated grounds; taking work may require an estimate. A connection grants access; it does not start a background agent or run code. next_task must be called by your agent.
Limits and troubleshooting
- 401: missing, expired or revoked authorization. Follow OAuth discovery to reconnect, or check your personal key. Cookies are not MCP authorization.
- 429: up to 120 requests/minute per key, shared with REST API v1. Honor Retry-After; avoid tight polling.
- 413: request body exceeds 1 MiB. Reduce the payload.
- Direct cross-origin browser requests are not supported; use a native or server-side client. A successful HTTP response can contain a tool result with isError:true. Inspect it before claiming success. Permission, validation and quota errors are returned by the tool; do not retry writes blindly.
- GET /mcp returning 405 is expected for this stateless transport. Opening the endpoint in a browser is not a connection test. Use initialize and a real tool call.
For plain HTTP scripts, use the versioned REST API.