Connect Anysite MCP Server to Cursor IDE using JSON configuration
The Anysite MCP Tool for Cursor provides seamless integration between Cursor IDE and the Anysite API through the Model Context Protocol (MCP). This allows you to access LinkedIn, Instagram, Reddit, and other social media data extraction tools directly within your Cursor AI coding sessions.
Access data extraction tools while coding with Cursor's AI assistant
Configure MCP per-project or globally for all your workspaces
Extract social media data directly in your development workflow
JSON-based configuration that's easy to version control and share
First, obtain your API key from the Anysite dashboard:
Keep your API key secure - never share it publicly or commit it to version control.
There are two ways to configure MCP in Cursor:
Create a `.cursor/mcp.json` file in your project root:
```json
{
"mcpServers": {
"anysite": {
"command": "npx",
"args": ["-y", "@anysiteio/mcp"],
"env": {
"ANYSITE_API_KEY": "YOUR_API_KEY",
"ANYSITE_ACCOUNT_ID": ""
}
}
}
}
```
**Steps:**
1. Open your project in Cursor
2. Create `.cursor` directory in project root (if it doesn't exist)
3. Create `mcp.json` file inside `.cursor` directory
4. Paste the configuration above
5. Replace `YOUR_API_KEY` with your actual API key
6. Restart Cursor or reload the window
Project-specific configuration is ideal for team collaboration. Add `.cursor/mcp.json` to `.gitignore` if your API key is included directly.
Configure MCP globally for all Cursor projects:
**For macOS:**
Edit `~/.cursor/mcp.json`:
**For Windows:**
Edit `%USERPROFILE%\.cursor\mcp.json`:
**For Linux:**
Edit `~/.cursor/mcp.json`:
```json
{
"mcpServers": {
"anysite": {
"command": "npx",
"args": ["-y", "@anysiteio/mcp"],
"env": {
"ANYSITE_API_KEY": "YOUR_API_KEY",
"ANYSITE_ACCOUNT_ID": ""
}
}
}
}
```
Global configuration makes Anysite tools available in all your Cursor projects without per-project setup.
Configuration breakdown:
command: "npx" - Uses npx to run the MCP packageargs: ["-y", "@anysiteio/mcp"] - Auto-confirms and runs the Anysite MCP packageANYSITE_API_KEY - Your API key from the Anysite dashboardANYSITE_ACCOUNT_ID - Optional account ID (leave empty if not needed)For better security, use environment variables instead of hardcoding the API key:
Option 1: Shell Environment
Add to your shell profile (~/.zshrc, ~/.bashrc):
export ANYSITE_API_KEY="your_api_key_here"
Then update your mcp.json:
{
"mcpServers": {
"anysite": {
"command": "npx",
"args": ["-y", "@anysiteio/mcp"],
"env": {
"ANYSITE_API_KEY": "${ANYSITE_API_KEY}",
"ANYSITE_ACCOUNT_ID": ""
}
}
}
}
Option 2: .env File
Create a .env file in your project root:
ANYSITE_API_KEY=your_api_key_here
Always add .env to your .gitignore to prevent accidental commits of sensitive data.
After configuration, verify the MCP server is working:
Restart Cursor or reload the window (Cmd/Ctrl + Shift + P → "Reload Window")
Open Cursor AI Chat and ask:
What MCP tools do you have access to?
Test with a simple request:
Get information about this LinkedIn profile: linkedin.com/in/username
If everything is working correctly, Cursor AI will list the available Anysite tools and be able to execute data extraction requests.
To update your API key or other settings:
mcp.json fileTo remove the Anysite MCP integration:
anysite entry from your mcp.json filemcp.json file if not using other MCP serversYou can configure multiple MCP servers in the same file:
{
"mcpServers": {
"anysite": {
"command": "npx",
"args": ["-y", "@anysiteio/mcp"],
"env": {
"ANYSITE_API_KEY": "YOUR_API_KEY",
"ANYSITE_ACCOUNT_ID": ""
}
},
"other-server": {
"command": "npx",
"args": ["-y", "other-mcp-package"],
"env": {}
}
}
}
**Solutions:**
- Ensure Node.js and npm are installed and in your PATH
- Verify the API key is valid and active
- Check internet connectivity
- Restart Cursor completely
- Check the Cursor logs for error messages
**Solutions:**
- Reload the Cursor window (Cmd/Ctrl + Shift + P → "Reload Window")
- Verify the `mcp.json` file syntax is correct (valid JSON)
- Check that the file is in the correct location
- Ensure your Anysite subscription is active
**Solutions:**
- Install Node.js from [nodejs.org](https://nodejs.org)
- Ensure npm is in your system PATH
- Try running `npx --version` in terminal to verify
- On Windows, you may need to restart after Node.js installation
**Solutions:**
- Validate your JSON at [jsonlint.com](https://jsonlint.com)
- Check for missing commas, brackets, or quotes
- Ensure no trailing commas after the last item in objects/arrays
- Use a JSON formatter extension in your editor
**Solutions:**
- Verify the API key is correct (no extra spaces)
- Check if your Anysite subscription is active
- Try generating a new API key from the dashboard
- Ensure the key has the necessary permissions
**Solutions:**
- Restart your terminal/shell after adding env vars
- Start Cursor from the terminal: `cursor .`
- On macOS, GUI apps may not inherit shell env vars
- Try using the direct API key method to test
Store API keys in environment variables, never hardcode in configuration files
Always add `.cursor/mcp.json` and `.env` to `.gitignore`
Regularly regenerate API keys from Anysite dashboard
Review API usage periodically in your Anysite dashboard
.gitignore example:
# MCP configuration with API keys
.cursor/mcp.json
# Environment files
.env
.env.local
.env.*.local
| Feature | Cursor | Claude Code (CLI) | Claude Desktop |
|---|---|---|---|
| Interface | IDE integrated | Command line | Desktop app |
| Setup | JSON config | Terminal command | OAuth GUI |
| Best For | AI-assisted coding | Developers, automation | General users |
| Project Scope | Per-project config | Multiple scopes | Global only |
| Version Control | .cursor/mcp.json |
.mcp.json |
Not applicable |
Contact our support team for assistance with Cursor MCP integration