How to Configure the MCP Server
This guide will walk you through installing and configuring the Skfoldr MCP server in Cursor. The MCP server allows you to access your code library directly from your IDE, making it easy to search, retrieve, and create code snippets.
Quick Start Video
Watch this video tutorial to see the complete setup process in action, from creating an account to using snippets in your IDE.
Prerequisites
- Cursor IDE installed on your system
- Node.js and npm installed (for installing the MCP server package)
- A Skfoldr account with an API key
Step 1: Install @skfoldr/mcp Globally
First, install the Skfoldr MCP server package globally using npm:
npm install -g @skfoldr/mcpThis installs the MCP server package globally, making it available system-wide. The installation may take a few moments depending on your internet connection.
Step 2: Generate Your API Key
To use the MCP server, you need an API key from your Skfoldr account:
- Log in to your Skfoldr account at skfoldr.com
- Navigate to your account settings or API keys section
- Generate a new API key (it will look like:
ck_xxxxxxxxxxxxxxxxxxxx) - Copy the API key and keep it secure—you'll need it for the next step
Note: Keep your API key secure and never share it publicly. If your key is compromised, regenerate it immediately from your account settings.
Step 3: Configure the MCP Server in Cursor
Now you need to configure Cursor to use the MCP server. The configuration is done through an mcp.json file:
3.1 Locate or Create mcp.json
The MCP configuration file is typically located at:
~/.cursor/mcp.jsonIf this file doesn't exist, create it. If it already exists, you'll add the Skfoldr MCP server configuration to it.
3.2 Add the Skfoldr MCP Server Configuration
Add the following configuration to your mcp.json file. Replace YOUR_API_KEY with the API key you generated in Step 2:
{
"mcpServers": {
"skfoldr-mcp": {
"command": "npx",
"args": ["skfoldr-mcp"],
"env": {
"SKFOLDR_API_KEY": "YOUR_API_KEY"
}
}
}
}3.3 Complete Configuration Example
If you have multiple MCP servers configured, your mcp.json might look like this:
{
"mcpServers": {
"skfoldr-mcp": {
"command": "npx",
"args": ["skfoldr-mcp"],
"env": {
"SKFOLDR_API_KEY": "ck_your_actual_api_key_here"
}
},
"other-mcp-server": {
"command": "node",
"args": ["/path/to/other/server.js"]
}
}
}Step 4: Restart Cursor
After saving the mcp.json file, restart Cursor completely. This ensures that Cursor loads the new MCP server configuration. Once Cursor restarts, the Skfoldr MCP server should be available.
Step 5: Verify the Configuration
To verify that the MCP server is working correctly:
- Open Cursor and check the MCP server status (usually visible in the status bar or settings)
- Try using an AI assistant command that requires the MCP server, such as searching for snippets
- If you encounter errors, check that your API key is correct and that the package is installed globally
Troubleshooting
MCP Server Not Found
If Cursor can't find the MCP server:
- Verify that
@skfoldr/mcpis installed globally:npm list -g @skfoldr/mcp - Ensure your
mcp.jsonfile is in the correct location and has valid JSON syntax - Try using the full path to npx:
/usr/local/bin/npx(adjust for your system)
Authentication Errors
If you're getting authentication errors:
- Double-check that your API key is correct and hasn't expired
- Ensure there are no extra spaces or quotes around the API key in your
mcp.json - Verify that your API key has the necessary permissions in your Skfoldr account
Next Steps
Once your MCP server is configured, you can:
- Read about MCP Server Capabilities to learn what you can do
- Start using AI assistants in Cursor to search and retrieve code from your library
- Create and manage code snippets directly from your IDE
Need more help? Contact support at skfoldr@ljappsolutions.com
Skfoldr
Built by LJ Solutions Services LLC.