Prem MCP Server is a Model Context Protocol implementation for Prem AI that enables seamless integration with Claude and other MCP-compatible clients. It provides features like chat completions, RAG support, document management, templates, and streaming responses through a standard interface.
For automatic installation with Claude Desktop:
npx -y @smithery/cli install @ucalyptus/prem-mcp-server --client claude
# Using npm
npm install prem-mcp-server
# Using yarn
yarn add prem-mcp-server
# Using pnpm
pnpm add prem-mcp-server
Create a .env
file in your project root:
PREM_API_KEY=your_api_key_here
PREM_PROJECT_ID=your_project_id_here
Add the following to your ~/.cursor/mcp.json
:
{
"mcpServers": {
"PremAI": {
"command": "node",
"args": ["/path/to/your/prem-mcp/build/index.js", "--stdio"],
"env": {
"PREM_API_KEY": "your_api_key_here",
"PREM_PROJECT_ID": "your_project_id_here"
}
}
}
}
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"PremAI": {
"command": "npx",
"args": ["prem-mcp-server", "--stdio"],
"env": {
"PREM_API_KEY": "your_api_key_here",
"PREM_PROJECT_ID": "your_project_id_here"
}
}
}
}
npx prem-mcp-server
Basic Chat
Let's have a conversation about artificial intelligence.
RAG with Documents
Based on the documents in repository XYZ, what are the key points about [topic]?
Using Templates
Use template ABC to generate [specific type of content].
The server supports uploading documents to Prem AI repositories for RAG operations. Supported formats:
.txt
.pdf
.docx
query
: The input textsystem_prompt
: Custom system promptmodel
: Model identifiertemperature
: Response randomness (0-1)max_tokens
: Maximum response lengthrepository_ids
: Array of repository IDs for RAGsimilarity_threshold
: Threshold for document similaritylimit
: Maximum number of document chunkstemplate_id
: ID of the prompt templateparams
: Template-specific parameterstemperature
: Response randomness (0-1)max_tokens
: Maximum response lengthServer Not Found
claude_desktop_config.json
API Key Invalid
Document Upload Failed
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.