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

# MCP Server

> Connect your AI assistant to Sentrion to search jobs, discover filters, and check credits

The Sentrion Model Context Protocol (MCP) server lets AI assistants search current
and historical job postings using your Sentrion account. It exposes eight tools
backed by the Sentrion API.

## Connect to Sentrion

The server URL is `https://mcp.sentrion.ai/mcp` (Streamable HTTP). Connect by
signing in with your Sentrion account, or with an API key if your client
doesn't support OAuth.

### Sign in with your Sentrion account

Use this for clients with a **Connect** or **Sign in** button for remote MCP
servers, such as Claude and ChatGPT.

**1. Add the MCP server**

Add a remote server (sometimes called a custom connector) named `Sentrion`
with the URL `https://mcp.sentrion.ai/mcp`. Leave authentication settings
empty.

**2. Sign in**

Your client opens a browser window. Sign in with the account you use for the
[Sentrion dashboard](https://app.sentrion.ai) and approve access.

**3. Verify the connection**

Ask your assistant: **"Check my Sentrion credit balance."** It should call
`get_credit_balance`, which consumes no credits.

Tool calls use your account's API key, so credits and billing work exactly as
they do with API-key access. If you've never signed in to the dashboard, do that
once first: your API key is created on your first dashboard sign-in.

### Use an API key

Use this for clients that support a bearer token or custom `Authorization`
header but not OAuth, and for scripts.

**1. Get your API key**

In the [Sentrion dashboard](https://app.sentrion.ai), open **Settings > API Keys**
and create a key.

**2. Add the MCP server**

Add a remote server in your client's MCP settings using these values:

| Setting | Value |
| - | - |
| Server name | `Sentrion` |
| Server URL | `https://mcp.sentrion.ai/mcp` |
| Transport | Streamable HTTP |
| Header name | `Authorization` |
| Header value | `Bearer YOUR_API_KEY` |

Replace `YOUR_API_KEY` with your key. If your client has a dedicated bearer-token
field, enter the key alone; the client adds the `Bearer` prefix.

**3. Verify the connection**

Ask your assistant: **"Check my Sentrion credit balance."** It should call
`get_credit_balance`, which consumes no credits.

> [!NOTE]
>
> Keep your API key private. Configure it in your client's authentication settings
> rather than including it in prompts or committing it to version control.

## Try a search

For example, ask your assistant:

> Find 10 current engineering jobs in Amsterdam. Look up the department and
> location filter values first, then show the job titles, companies, and links.

Or, for a specific company:

> Find 10 current jobs at Google using the company LinkedIn URL
> [https://www.linkedin.com/company/google/](https://www.linkedin.com/company/google/).

When building searches:

* **Company identity:** Both company-search tools require `company_linkedin_url`.
* **Filters:** Use department and job board values exactly as returned by the
  lookup tools. For locations, pass the returned `value` objects in
  `jobs_locations` or `exclude_jobs_locations`, rather than display labels.
* **Page size:** Request 10–100 jobs per page to keep results manageable.
* **Pagination:** Pass the response's `search_after` cursor unchanged into the
  next call, keeping the same filters. Stop when no next cursor is returned.
* **History:** Every plan includes historical searches covering postings back to
  2020\. Specify the date range you want your assistant to search.

## Credits and authentication

Searches consume your account's API credits. Department, job board, location,
and credit-balance lookups consume no credits and work with zero or negative
balances.

Each HTTP request is authenticated. With OAuth, the server checks your sign-in
with Sentrion's identity provider and looks up your account's API key. With an
API key, it validates the key through the credit-balance endpoint. Either way,
tool calls use your account's key for that request, so results and billing
belong to your account. Revoked or inactive keys cannot connect, and
authentication fails if a validation service is unavailable.

## Python example

With the `fastmcp` package installed, set `SENTRION_API_KEY` in your environment
and run this example to list the tools and check your balance:

```python theme={null}
import asyncio
import os

from fastmcp import Client


async def main():
    async with Client(
        "https://mcp.sentrion.ai/mcp",
        auth=os.environ["SENTRION_API_KEY"],
    ) as client:
        print(await client.list_tools())
        print(await client.call_tool("get_credit_balance"))


asyncio.run(main())
```

## Troubleshooting

| Problem | What to check |
| - | - |
| Cannot authenticate | Use an active Sentrion API key and send `Authorization: Bearer YOUR_API_KEY`. Check for whitespace or a duplicated `Bearer` prefix. |
| Sign-in succeeds but every tool call fails | Sign in to the [Sentrion dashboard](https://app.sentrion.ai) once so your API key is created, then retry. |
| Client keeps asking you to sign in again | Remove the server from your client and add it again, then sign in. |
| Balance works but searches fail | Check your remaining credits: new standard jobs cost one credit each and new historical jobs cost two. Historical access is included on every plan. |
| Company search fails validation | Include `company_linkedin_url`; a company name alone is insufficient. |
| Location lookup fails validation | Provide `q` with at least three non-whitespace characters. |
| Search takes too long | The adapter allows up to 180 seconds for API requests. Check your client's timeout and narrow the search filters. Requests are not retried automatically. |

API HTTP errors surface as MCP tool errors. Also inspect the search response's
`success` and `error` fields: the API can return a search failure in an HTTP 200
response. See [response formats and errors](https://docs.sentrion.ai/api-reference/introduction.md#response-format).


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