> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stockshift.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Connect an AI assistant to StockShift so it can look things up and do work for a member.

StockShift is an MCP server, so an AI assistant such as Claude or ChatGPT can look things up and do work in StockShift. The assistant works as the member who connected it: it can do only what they can do, and only what they let it. Every change it makes is in the audit history under the member's name and the app's name.

The server is at `https://app.stockshift.io/mcp` and speaks Streamable HTTP. It needs the Starter plan or higher.

## Connect an assistant

1. In your assistant, add a custom connector or MCP server with the address above.
2. The assistant opens StockShift in your browser and asks you to sign in.
3. The **Connect** page shows the app's name and where you will be sent back. Anyone can register an app, so continue only if you started the connection and trust the app.
4. Pick the organization the app should work in.
5. Choose what it can do, module by module.
6. Press **Allow access**.

Sign in uses the same OAuth flow as any [OAuth app](https://docs.stockshift.io/guides/oauth-apps.md). An MCP client finds it from the `WWW-Authenticate` header of its first, unauthenticated call, which points at `/.well-known/oauth-protected-resource`.

## Tools

The assistant gets one tool for each action StockShift has made available to automations, such as looking up an item, creating a purchase order or confirming a sales order. A tool appears only if the member's permissions, the plan and the scopes they allowed let them use it. Call `tools/list` to see them. [Call the MCP server](https://docs.stockshift.io/api-reference/mcp-server/call-the-mcp-server.md) in the API reference lists every tool the server has.

Tools that only look are marked read only, and tools that change something are marked as changing. Each tool takes the same fields as the matching REST endpoint.

* A call that is not valid, or that the member may not make, comes back as a tool error with the same problem details the REST API sends.
* Sending the same call twice changes things once. A call can name its own key in `_meta.idempotencyKey`. Without one, the request's own id is the key.
* An answer is cut at 100 KB with a note to use the REST endpoint for more.
* Each app is limited to 30 tool calls a minute, on top of the [rate limits](https://docs.stockshift.io/guides/rate-limits.md).


## Related topics

- [Call the MCP server](https://docs.stockshift.io/api-reference/mcp-server/call-the-mcp-server.md)
- [StockShift for developers](https://docs.stockshift.io/index.md)
- [Rate limits](https://docs.stockshift.io/guides/rate-limits.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.