https://github.com/spragginsdesigns/perplexity-mcp-server
https://github.com/spragginsdesigns/perplexity-mcp-server
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/spragginsdesigns/perplexity-mcp-server
- Owner: spragginsdesigns
- Created: 2025-01-31T21:24:09.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-03-04T19:25:50.000Z (10 months ago)
- Last Synced: 2025-03-29T10:46:41.399Z (9 months ago)
- Language: TypeScript
- Size: 16.6 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- metorial-index - Perplexity MCP Server - Enables web searching capabilities by utilizing the Perplexity AI API to fetch and present web search results. It serves as an interface for retrieving information from the internet based on user queries. (APIs and HTTP Requests)
README
# Perplexity MCP Server
This is a simple MCP server that allows you to search the web using Perplexity AI.
## Installation
### Prerequisites
- Node.js 18+ (Download from [nodejs.org](https://nodejs.org/))
- Git (Download from [git-scm.com](https://git-scm.com/download/win))
- A Perplexity AI API key
### Steps for Windows
1. Clone the repository:
```bash
git clone [repository-url]
cd perplexity-mcp-server
```
2. Install dependencies:
```bash
npm install
```
3. Create environment file:
- Create a new file named `.env` in the root directory
- Add your Perplexity AI API key:
```env
PERPLEXITY_API_KEY=your_api_key_here
```
## Usage on Windows
### Development Mode
```bash
npm run dev
```
### Production Mode
1. Build the project:
```bash
npm run build
```
2. Start the server:
```bash
npm start
```
### Using the Windows Batch File (Recommended)
To avoid environment variable issues on Windows, use the included batch file:
1. Build the project first:
```bash
npm run build
```
2. Run the batch file:
```bash
.\run-perplexity-server.bat
```
Alternatively, double-click the `run-perplexity-server.bat` file in Windows Explorer.
For detailed instructions, see the [Windows Setup Guide](./docs/windows-setup.md).
## Troubleshooting Windows Issues
### Common Issues
1. **Permission Errors**
- Run Command Prompt or PowerShell as Administrator
- Check file permissions in the project directory
2. **Environment Variables**
- Ensure `.env` file is in the root directory
- No spaces around the `=` sign in `.env` file
- Restart terminal after making changes to environment variables
- Use the provided batch file to avoid environment variable issues
3. **Node.js Issues**
- Verify Node.js installation: `node --version`
- Ensure npm is installed: `npm --version`
### Error Messages
If you see `Error: ENOENT: no such file or directory`, ensure:
- All paths use correct Windows-style separators
- You're in the correct directory
- Required files exist
## Project Structure
```
perplexity-mcp-server/
├── src/
│ └── index.ts # Main server implementation
├── dist/ # Compiled output
├── .env # Environment variables
├── package.json # Project configuration
├── run-perplexity-server.bat # Windows batch file
└── tsconfig.json # TypeScript configuration
```
## API Usage
The server provides a single tool `perplexity_search` for web searches:
```json
{
"name": "perplexity_search",
"arguments": {
"query": "your search query here"
}
}
```
## License
MIT