# mcp-access-inteligence-search

A Model Context Protocol (MCP) server for integrating with the Agents Backend API. This server provides access intelligence search capabilities using RAG (Retrieval-Augmented Generation).

## Features

- 🔍 Search for access intelligence using RAG (Retrieval-Augmented Generation)
- 🔒 JWT authentication for secure API access
- 📝 Returns access intelligence results as comma-separated text
- 🧠 Support for optional context to improve search relevance

## Configuration

This server requires configuration through your MCP client. Here are
examples for different environments:

### Cline Configuration

Add this to your Cline MCP settings:

```json
{
	"mcpServers": {
		"mcp-access-inteligence-search": {
			"command": "env",
			"args": [
				"JWT_TOKEN=your-jwt-token",
				"npx",
				"-y",
				"mcp-access-inteligence-search"
      ]
		}
	}
}
```
### Claude Desktop Mac OS Configuration

For Mac OS environments, add this to your Claude Desktop configuration:

Edit file `~/Library/Application\ Support/Claude/claude_desktop_config.json` and add the following:

```json
{
	"mcpServers": {
		"mcp-access-inteligence-search": {
			"command": "env",
			"args": [
				"JWT_TOKEN=your-jwt-token",
				"npx",
				"-y",
				"mcp-access-inteligence-search"
			]
		}
	}
}
```

### Claude Desktop with WSL Configuration

For WSL environments, add this to your Claude Desktop configuration:

```json
{
	"mcpServers": {
		"mcp-access-inteligence-search": {
			"command": "wsl.exe",
			"args": [
				"bash",
				"-c",
				"source ~/.nvm/nvm.sh && JWT_TOKEN=your-jwt-token /home/username/.nvm/versions/node/v20.12.1/bin/npx mcp-access-inteligence-search"
			]
		}
	}
}
```

### Environment Variables

The server requires the following environment variable:

- `JWT_TOKEN`: Your JWT token for the Agents Backend API (required)

## API

The server implements a single MCP tool with configurable parameters:

### rag_search

Search for templates using the RAG (Retrieval-Augmented Generation) API.

Parameters:

- `query` (string, required): The search query to find relevant templates
- `context` (array, optional): Optional context strings to help with the search

## Development

### Setup

1. Clone the repository
2. Install dependencies:

```bash
pnpm install
```

3. Build the project:

```bash
pnpm build
```

4. Run in development mode:

```bash
pnpm dev
```

### Publishing

The project uses changesets for version management. To publish:

1. Create a changeset:

```bash
pnpm changeset
```

2. Version the package:

```bash
pnpm changeset version
```

3. Publish to npm:

```bash
pnpm release
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- Built on the
  [Model Context Protocol](https://github.com/modelcontextprotocol)
- Powered by the Agents Intelligence API
