MCP Server
NearSync runs a hosted Model Context Protocol (MCP) server so an AI agent — Claude, ChatGPT, an MCP-capable IDE — can read your data in natural language ("how's my pipeline?", "what does my day look like?", "do I have the call with Acme today?").
It is read-only, org-isolated, and permission-aware: an agent only ever sees data the connecting user is allowed to see. There are two surfaces:
- Org analytics — pipeline, revenue, MRR, etc. — gated by your role (a sales rep can't read finance metrics).
- Personal — your tasks and schedule — scoped to you.
Endpoint
https://api.nearsync.tech/mcp
Streamable HTTP (JSON-RPC 2.0). Two ways to authenticate:
Option A — Connect with OAuth (recommended)
One click, no keys to copy. Most MCP clients let you add a remote server by URL and run the OAuth flow themselves (Dynamic Client Registration + PKCE — nothing to pre-register):
- In your client, add a custom/remote MCP connector with the URL
https://api.nearsync.tech/mcp. - The client opens a NearSync consent screen — sign in (or you're already signed in), confirm which account + org, and click Allow.
- Done. The agent now has the tools, scoped to your permissions.
The agent only sees:
- the analytics your role permits (e.g. finance metrics only if you have Finance access), and
- your own tasks and schedule.
Tokens are short-lived and refresh automatically; revoke a connection any time from your client.
Option B — Connect with an API key (developer / automation)
For scripts, automation, or clients without OAuth. Mint a key in System → API Keys (needs the analytics:read scope, and tasks:read/schedule:read for personal tools), then pass it as a bearer token. For clients that bridge stdio to a remote server (e.g. Claude Desktop):
{
"mcpServers": {
"nearsync": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.nearsync.tech/mcp",
"--header", "Authorization: Bearer ns_live_..."]
}
}
}
A key is a machine credential — it carries whatever scopes the admin granted and is not narrowed per-user (use it for automation an admin owns). OAuth is per-user and RBAC-narrowed — the agent sees only what that person is cleared for. Personal tools (my_tasks, etc.) require OAuth (a key has no user).
Tools
| Tool | Args | Returns | Scope |
|---|---|---|---|
list_metrics | category? | The metrics/reports you can read (filtered to your permissions). Start here. | analytics:read |
run_metric | metric (name or id), period?, filters? | One metric's result (number / series / table / computed). Denied if your role can't see its category. | analytics:read |
dashboard_insights | — | "What changed" — metrics with material movement (stale-data drops flagged, not counted as declines). | analytics:read |
org_mrr | — | Monthly recurring revenue (finance-gated). | analytics:read |
org_health | — | Organization health score. | analytics:read |
my_tasks | filter? (open/overdue/today/upcoming/all) | Your tasks. | tasks:read |
my_schedule | date? / range? | Your meetings/calls. | schedule:read |
my_day | date? | Your tasks + meetings for a day. | tasks:read |
Tools appear in tools/list only when your connection carries the scope. run_metric accepts a metric name (from list_metrics) or its UUID — the server resolves names. Money is in your organization's base currency.
Example
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": { "name": "my_day", "arguments": { "date": "2026-06-03" } } }
Limits & errors
401 — missing/invalid/expired credential (re-auth). 403 / tool isError — your role lacks the metric's category, or the tool needs a connected user (personal tools over a key). API keys count against a per-minute rate limit + monthly quota (see Rate Limits & Quota); quota is charged only on a call that reaches data.