> AI agents: this is one page of nextanalytica's docs. The full index for agents: https://nextanalytica.app/llms.txt

# Remote vs local MCP servers

> A local MCP server runs on your computer; a remote one is a service your agent signs in to. Setup, security and team access compared, and how MCP OAuth works.

Updated: 2026-11-29

A **local** MCP server is a program your agent starts on your own computer and talks to through its standard input and output (the `stdio` transport). A **remote** MCP server is a service at an address, which your agent reaches over HTTP (the Streamable HTTP transport) and signs in to, usually with OAuth. Local servers suit tools that work on your own files; remote ones suit shared data a team reads, like analytics. nextanalytica is a remote server: one address, `https://mcp.nextanalytica.app/mcp`, and each person signs in as themselves.

Facts about the protocol come from the [MCP specification](https://modelcontextprotocol.io/specification/latest), revision 2026-07-28.

## What is a local MCP server?

Your agent launches it as a subprocess and exchanges messages with it over `stdio`. It runs with your user's rights on your computer.

- **Setup:** install a runtime (Node.js, Python), then add a command to your agent's configuration, such as `npx some-mcp-server` or `uvx some-mcp-server`.
- **Credentials:** the specification says a `stdio` server should take its credentials from the environment, so you put an API key or a credentials file path in environment variables.
- **Team:** every person repeats the setup and keeps their own credentials, and updates arrive when each person updates the package.
- **Good for:** your files, your git repository, a local database, tools that must not leave your computer.

## What is a remote MCP server?

It runs as a service, and your agent sends each message to one HTTP endpoint. Nothing is installed on your computer.

- **Setup:** add the address. In Claude Code: `claude mcp add --transport http nextanalytica https://mcp.nextanalytica.app/mcp`.
- **Credentials:** you sign in with OAuth in your browser, and the agent keeps the token. There's no secret to copy.
- **Team:** everyone uses the same address, signs in as themselves and gets the same version at once.
- **Good for:** shared data and services: analytics, issue trackers, CRMs, documentation.

## How does OAuth work for an MCP server?

Authorization in MCP is based on OAuth 2.1 and applies to HTTP servers. When you add a remote server and connect:

1. Your agent calls the server without a token, and the server answers that it needs one.
2. The agent reads the server's **Protected Resource Metadata** (RFC 9728), which names the authorization server to use.
3. The agent registers itself with that authorization server, usually with a **Client ID Metadata Document**: a URL that describes the client. Pre-registration and dynamic client registration also work; the specification keeps dynamic registration for older clients.
4. Your browser opens the sign-in page. You sign in and approve what the agent may do. The agent uses PKCE, so a stolen code alone is worthless.
5. The agent gets an access token issued for that server only: it names the server in a `resource` parameter (RFC 8707), and the server must check the token was issued for it.
6. Every request carries the token. The server never accepts tokens issued for anything else, and never passes your token on to other services.

When the token expires, the agent refreshes it, or asks you to sign in again.

## How do you control and revoke access?

With a remote server, access is managed in one place:

- **Revoke a person:** remove them from the team, and their agent loses access at once. In nextanalytica, that's **Access**. See [Team access](/docs/model-context-protocol/team-access).
- **Limit an agent:** sign-in can grant read only, or read and change. See [Agent keys and OAuth](/docs/model-context-protocol/agent-keys).
- **Watch what agents do:** a remote server can log and steer calls. See [Agent steering](/docs/model-context-protocol/steering).

With a local server, access lives in each person's credentials: you revoke the API key or service account, on every computer it was copied to.

## What about a server with no browser?

A remote server can also take a key in a header when no browser is at hand, such as Claude Code on a build server. nextanalytica's agent keys start with `na_key_`, last **90 days** and can be revoked at any time:

```text
Authorization: Bearer na_key_…
```

Where a browser is at hand, sign in instead: there's nothing to keep safe.

## Which should you choose?

| | Local | Remote |
| --- | --- | --- |
| Setup | A runtime and a command on each computer | One address |
| Credentials | API keys or files in environment variables | OAuth sign-in in your browser |
| Team | Each person sets it up and updates it | Everyone signs in to the same server |
| Revoking access | Rotate the key on every computer | Remove the person or revoke the sign-in, once |
| Works offline | Yes | No |
| Reaches your local files | Yes | No |

Choose local for tools that work on your machine. Choose remote for data your team shares, which is why nextanalytica is remote.

## Next steps

- [Connect your agent](/docs/model-context-protocol/agent-setup)
- [Agent keys and OAuth](/docs/model-context-protocol/agent-keys)
- [Best analytics MCP servers](/docs/compare/best-analytics-mcp-servers)
- [MCP servers for Claude](/docs/model-context-protocol/claude-mcp-servers)

Canonical address: https://nextanalytica.app/docs/model-context-protocol/remote-vs-local
