|
| 1 | +## Exa MCP Server |
| 2 | + |
| 3 | +HTTP MCP proxy to Exa's hosted MCP server at https://mcp.exa.ai/mcp. This Actor exposes a streamable HTTP endpoint so MCP clients can connect using an Apify-hosted URL with Bearer auth. |
| 4 | + |
| 5 | +## How to use |
| 6 | + |
| 7 | +This server uses mcp-remote to connect to Exa and supports optional EXA_API_KEY (appended to the URL as exaApiKey). |
| 8 | + |
| 9 | +## Connection URL |
| 10 | + |
| 11 | +MCP clients can connect to this server at: |
| 12 | + |
| 13 | +https://mcp-servers--exa-mcp-server.apify.actor/mcp |
| 14 | + |
| 15 | +## Client Configuration |
| 16 | + |
| 17 | +Use this configuration in your MCP client (replace your-apify-token with your token from Apify Console): |
| 18 | + |
| 19 | +{ |
| 20 | + "mcpServers": { |
| 21 | + "exa": { |
| 22 | + "type": "http", |
| 23 | + "url": "https://mcp-servers--exa-mcp-server.apify.actor/mcp", |
| 24 | + "headers": { |
| 25 | + "Authorization": "Bearer YOUR_APIFY_TOKEN" |
| 26 | + } |
| 27 | + } |
| 28 | + } |
| 29 | +} |
| 30 | + |
| 31 | +Optionally set EXA_API_KEY as an Actor environment variable to use your Exa key. |
| 32 | + |
| 33 | +### Pay per event |
| 34 | + |
| 35 | +This Actor uses the [Pay Per Event (PPE)](https://docs.apify.com/platform/actors/publishing/monetize#pay-per-event-pricing-model) model. Exa tool calls map to events defined in [.actor/pay_per_event.json](.actor/pay_per_event.json) such as `exa-get-code-context`, `exa-web-search`, etc. Unknown tools fall back to `tool-request`. |
| 36 | + |
| 37 | +To charge users, define events in JSON format and save them on the Apify platform. Here is an example schema with the `tool-request` event: |
| 38 | + |
| 39 | +Event charging is performed in `src/billing.ts` based on the MCP method and tool name. |
| 40 | + |
| 41 | +To set up the PPE model: in Actor Monetization settings, choose Pay per event and paste the content of [.actor/pay_per_event.json](.actor/pay_per_event.json). |
| 42 | + |
| 43 | +## Credits and links |
| 44 | + |
| 45 | +- [What is Anthropic's Model Context Protocol?](https://blog.apify.com/what-is-model-context-protocol/) |
| 46 | +- [How to use MCP with Apify Actors](https://blog.apify.com/how-to-use-mcp/) |
| 47 | +- All credits to the original authors of https://github.com/exa-labs/exa-mcp-server (or hosted Exa at https://mcp.exa.ai/mcp) |
| 48 | +- Claim this MCP server – write to [email protected]. |
| 49 | +- [Apify MCP servers monorepo](https://github.com/apify/mcp-servers) |
| 50 | +- [Apify MCP server](https://mcp.apify.com) |
| 51 | +- [Apify MCP server documentation](https://docs.apify.com/platform/integrations/mcp) |
| 52 | +- [Apify MCP client](https://apify.com/jiri.spilka/tester-mcp-client) |
| 53 | +- [Model Context Protocol documentation](https://modelcontextprotocol.io) |
| 54 | +- [TypeScript tutorials in Academy](https://docs.apify.com/academy/node-js) |
| 55 | +- [Apify SDK documentation](https://docs.apify.com/sdk/js/) |
| 56 | + |
| 57 | + |
| 58 | +## Getting started |
| 59 | + |
| 60 | +For complete information [see this article](https://docs.apify.com/platform/actors/development#build-actor-locally). To run the Actor use the following command: |
| 61 | + |
| 62 | +```bash |
| 63 | +apify run |
| 64 | +``` |
| 65 | + |
| 66 | +## Deploy to Apify |
| 67 | + |
| 68 | +### Connect Git repository to Apify |
| 69 | + |
| 70 | +If you've created a Git repository for the project, you can easily connect to Apify: |
| 71 | + |
| 72 | +1. Go to [Actor creation page](https://console.apify.com/actors/new) |
| 73 | +2. Click on **Link Git Repository** button |
| 74 | + |
| 75 | +### Push project on your local machine to Apify |
| 76 | + |
| 77 | +You can also deploy the project on your local machine to Apify without the need for the Git repository. |
| 78 | + |
| 79 | +1. Log in to Apify. You will need to provide your [Apify API Token](https://console.apify.com/account/integrations) to complete this action. |
| 80 | + |
| 81 | + ```bash |
| 82 | + apify login |
| 83 | + ``` |
| 84 | + |
| 85 | +2. Deploy your Actor. This command will deploy and build the Actor on the Apify Platform. You can find your newly created Actor under [Actors -> My Actors](https://console.apify.com/actors?tab=my). |
| 86 | + |
| 87 | + ```bash |
| 88 | + apify push |
| 89 | + ``` |
| 90 | + |
| 91 | +## Documentation reference |
| 92 | + |
| 93 | +To learn more about Apify and Actors, take a look at the following resources: |
| 94 | + |
| 95 | +- [Apify SDK for JavaScript documentation](https://docs.apify.com/sdk/js) |
| 96 | +- [Apify SDK for Python documentation](https://docs.apify.com/sdk/python) |
| 97 | +- [Apify Platform documentation](https://docs.apify.com/platform) |
| 98 | +- [Join our developer community on Discord](https://discord.com/invite/jyEM2PRvMU) |
0 commit comments