RefBase MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@RefBase MCPsave this conversation about fixing the login bug"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
RefBase MCP
MCP (Model Context Protocol) server that enables AI assistants in IDEs to interact with RefBase webapp for saving conversations, searching bugs/features, and retrieving project context.
Features
Conversation Management: Save and search AI conversations
Bug Tracking: Log bugs and search existing issues
Feature Solutions: Store and retrieve working implementations
Project Context: Extract and provide project-specific insights
Secure Authentication: Permanent API key authentication (no more token expiration!)
IDE Integration: Works with Cursor, Claude Code, Kiro, and other MCP-compatible IDEs
⚠️ Current Status: RefBase server-side authentication is being fixed. The MCP server code is complete and production-ready. Integration tests are temporarily disabled until RefBase resolves their API key authentication bug.
Related MCP server: repo-memory-mcp
Quick Start
Installation
Currently, you need to clone and build the project locally:
git clone https://github.com/DasMonkey/refbase-mcp.git
cd refbase-mcp
npm install && npm run build
npm start💡 Global npm package coming soon! Once published to npm, you'll be able to use
npm install -g refbase-mcpfor simpler setup.
Authentication Setup
Step 1: Generate RefBase API Key
Visit RefBase webapp
Sign in or create an account
Go to Settings → API Keys
Click "Create API Key"
Give it a descriptive name (e.g., "Kiro IDE", "Cursor IDE", "Claude Code")
Copy the API key immediately - it's only shown once!
Format will be:
refb_a1b2c3d4e5f6789012345678901234ab
⚠️ Important: Save your API key securely - it never expires but can't be viewed again after creation.
Configuration
Copy the example environment file:
cp .env.example .envAdd your RefBase API key to the .env file:
# Open the .env file in your text editor and ADD this line:
REFBASE_API_KEY=refb_a1b2c3d4e5f6789012345678901234ab
# Replace with your actual API key from Step 1 aboveYour .env file should contain these key settings:
# Required - Your API key from RefBase
REFBASE_API_KEY=refb_your_actual_api_key_here
# Required - RefBase API endpoint
REFBASE_API_URL=https://refbase.dev/api
# Optional
MCP_SERVER_PORT=3000
LOG_LEVEL=info💡 Important: Never commit your
.envfile to version control - it contains your secret API key!
Step 2: IDE Integration
Choose your IDE and follow the specific setup instructions:
🎯 Kiro IDE
Step 1: Build the Project
cd refbase-mcp
npm install
npm run build
npm startStep 2: Configure Kiro IDE - JSON Config Use the JSON editor in Kiro and paste this exact config: in Workspace Config.
{
"mcpServers": {
"refbase": {
"name": "RefBase Knowledge Base",
"command": "node",
"args": ["/path/to/refbase-mcp/dist/cli.js"],
"environment": {
"REFBASE_API_URL": "https://refbase.dev/api",
"REFBASE_API_KEY": "refb_your_actual_api_key_here",
"LOG_LEVEL": "info"
},
"disabled": false,
"autoApprove": [
"mcp_refbase_get_project_context",
"mcp_refbase_search_conversations",
"mcp_refbase_save_conversation",
"mcp_refbase_search_bugs",
"mcp_refbase_save_bug",
"mcp_refbase_search_features",
"mcp_refbase_save_feature",
"mcp_refbase_setup_project"
]
}
}
}Important Notes:
Replace
/path/to/refbase-mcp/dist/cli.jswith your actual project pathWindows example:
"C:\\Users\\YourName\\refbase-mcp\\dist\\cli.js"(note double backslashes)"disabled": false: Required for Kiro IDE - explicitly enables the MCP server (other IDEs don't need this)
autoApprove: Pre-approves RefBase tools so AI can use them without permission popups (recommended for better UX)
Mac/Linux example:
"/Users/YourName/refbase-mcp/dist/cli.js"Use
dist/cli.jsnotdist/index.jsReplace
refb_your_actual_api_key_herewith your actual RefBase API key
Step 3: Save and Test
Click "Save" or "Apply"
Restart Kiro IDE completely
Start a new conversation - RefBase tools should appear!
🖱️ Cursor IDE
Step 1: Open Cursor Settings
Open Cursor IDE
Press
Cmd/Ctrl + ,(Settings shortcut)OR go to: Menu → File → Preferences → Settings
Step 2: Find MCP Settings
In the Settings search box, type: "MCP"
Look for "Extensions" → "MCP Servers"
OR navigate to: Extensions → MCP in the left sidebar
Step 3: Add RefBase Server
Click "Edit in settings.json" or "Add Server"
Copy and paste this exact configuration:
{
"mcp.servers": {
"refbase": {
"command": "node",
"args": ["/path/to/refbase-mcp/dist/cli.js"],
"env": {
"REFBASE_API_URL": "https://refbase.dev/api",
"REFBASE_API_KEY": "refb_your_actual_api_key_here"
},
"autoApprove": [
"save_conversation",
"save_feature",
"save_bug",
"search_conversations",
"search_features",
"search_bugs",
"setup_project",
"get_project_context"
]
}
}
}Important: Replace /path/to/refbase-mcp/dist/cli.js with your actual path to the project folder.
💡 autoApprove: Pre-approves RefBase tools so AI can use them without permission popups. Makes conversations flow much smoother!
Path Examples:
Windows:
"C:\\Users\\YourName\\refbase-mcp\\dist\\cli.js"Mac/Linux:
"/Users/YourName/refbase-mcp/dist/cli.js"
Step 4: Alternative - Project-Level Config
In your project folder, create a new file:
.cursorrulesPaste this exact content:
{
"mcp": {
"servers": {
"refbase": {
"command": "node",
"args": ["/path/to/refbase-mcp/dist/cli.js"],
"env": {
"REFBASE_API_URL": "https://refbase.dev/api",
"REFBASE_API_KEY": "refb_your_actual_api_key_here"
},
"autoApprove": [
"save_conversation",
"save_feature",
"save_bug",
"search_conversations",
"search_features",
"search_bugs",
"setup_project",
"get_project_context"
]
}
}
}
}Important: Replace /path/to/refbase-mcp/dist/cli.js with your actual path to the project folder.
💡 autoApprove: Pre-approves RefBase tools for seamless AI interactions without permission popups!
Step 5: Save and Restart
Save the file (
Ctrl+S)Restart Cursor completely
Open a new chat and look for RefBase tools
🔧 Claude Code
Step 1: Create MCP Configuration File
Open any IDE of your choice
In your project root, create a new file named
.mcp.jsonThis file will configure MCP servers for this specific project
Step 2: Add RefBase Server Configuration
Copy and paste this exact configuration into
.mcp.json:
{
"mcpServers": {
"refbase": {
"command": "node",
"args": ["/path/to/refbase-mcp/dist/cli.js"],
"env": {
"REFBASE_API_URL": "https://refbase.dev/api",
"REFBASE_API_KEY": "refb_your_actual_api_key_here"
},
"autoApprove": [
"save_conversation",
"save_feature",
"save_bug",
"search_conversations",
"search_features",
"search_bugs",
"setup_project",
"get_project_context"
]
}
}
}Important: Replace /path/to/refbase-mcp/dist/cli.js with your actual path to the project folder.
💡 autoApprove: Pre-approves RefBase tools so Claude can use them without showing permission popups each time. This makes conversations flow much smoother!
Path Examples:
Windows:
"C:\\Users\\YourName\\refbase-mcp\\dist\\cli.js"Mac/Linux:
"/Users/YourName/refbase-mcp/dist/cli.js"
Step 3: Save and Restart
Click "Save" or Ctrl+S
Restart Claude Code completely (close and reopen)
Wait 10-15 seconds for MCP server to connect
Step 4: Test It Works
Start a new conversation in Claude Code
Type: "Use the save_conversation tool"
You should see RefBase tools appear in the available tools list
If you see
save_conversation,search_bugs, etc. - it's working! ✅
🔧 Other MCP-Compatible IDEs
For any MCP-compatible IDE:
Server Command:
refbase-mcpArguments:
["start"]Port:
3000(default)Environment Variables:
REFBASE_API_URL=https://refbase.dev/apiMCP_SERVER_PORT=3000
Step 3: Test Your Setup
Method 1: Ask AI Assistant to Use Tools
Start a conversation in your IDE
Type this exact message:
"Please use the save_conversation tool to save our current conversation to RefBase. Use my API key: refb_your_actual_api_key_here"The AI should automatically use the RefBase tools and save the conversation
Method 2: Manual Tool Usage If your IDE shows tools directly, look for these RefBase tools:
save_conversation- Save current chatsearch_conversations- Find past chatssave_bug- Log a bugsearch_bugs- Find existing bugssave_feature- Store a solutionsearch_features- Find implementations
Method 3: Test the Tools Simply ask your AI assistant to use RefBase tools:
📝 "Save this conversation to RefBase with the title 'Testing MCP integration'"
🐛 "Log a bug: Login button not working on mobile"
🔍 "Search RefBase for React hooks conversations"
Step 4: Verify It's Working
Go to RefBase webapp
Check your saved items:
Conversations tab - should see saved chats
Bugs tab - should see logged bugs
Features tab - should see saved solutions
If you see your saved items there, it's working perfectly! ✅
📁 IMPORTANT: Directory Guide
🤔 Confused about where to run commands? Here's the breakdown:
refbase-mcp Directory (This Project)
Location: D:\AI\Cursor projects\refbase-mcp\
Purpose: Install and configure the MCP server
Commands to run here:
npm install && npm run build # Install MCP server npm start # Start MCP server (if needed)IDE Config: Point your IDE's MCP config to
path/to/refbase-mcp/dist/cli.js
Your Actual Project Directory (Where You Code)
Location: D:\MyApp\, C:\Projects\MyReactApp\, etc.
Purpose: Link your project to RefBase and use MCP tools
Commands to run here (via AI chat in IDE):
setup_project← Run this in YOUR projectsave_conversation,save_feature,save_bug
Rule: Open your IDE in YOUR project directory, then use MCP tools
💡 Summary: Install MCP once in refbase-mcp, then use it in every project you work on.
🚀 Project Setup (First Time Only)
⚠️ CRITICAL: Run setup_project in YOUR PROJECT directory, NOT in refbase-mcp!
After MCP is connected and working, set up your project:
Once you've confirmed MCP tools are working, use the project setup tool to create or link your workspace to RefBase:
In any IDE chat conversation, type:
"Please use the setup_project tool to create a new RefBase project for this workspace"The MCP tool will:
Auto-detect your project name, language, framework, and tech stack
Present you with setup options
Choose your setup option:
create_new- Create a brand new RefBase projectlink_existing- Link to an existing RefBase projectconfigure_manual- Manually set project detailsskip- Skip setup for now
Benefits after setup:
All MCP tools automatically know your project context
Better search results when finding similar conversations/bugs/features
Automatic project categorization and tech stack detection
💡 One-time setup: This only needs to be done once per project. After setup, your workspace is permanently linked to RefBase.
🔗 How to Link to Existing RefBase Project
Need to connect your current workspace to an existing RefBase project? Follow these steps:
Step 1: Get Your Project ID from RefBase Webapp
Visit RefBase.dev and sign in
Go to your project dashboard - you'll see all your projects listed
Find the project you want to link to
Click the 3 dots menu (⋯) next to the project name
Select "Copy Project ID" from the dropdown menu
The Project ID format looks like:
ffef03c1-0046-43bc-9c9b-5f0b8617b323
Save this ID - you'll need it in the next step
Step 2: Run Project Setup with Existing Project ID
Open your IDE in the project directory you want to link (NOT in refbase-mcp)
Start a conversation with your AI assistant
Run the setup command with your Project ID:
"Use the setup_project tool with action 'link_existing' and existingProjectId 'ffef03c1-0046-43bc-9c9b-5f0b8617b323'"Replace the example ID with your actual Project ID from Step 1
Step 3: Verify the Connection
Look for success message:
🔗 Successfully linked to existing RefBase projectTest with a save tool: Try
save_conversationorsave_featureCheck RefBase webapp: Your saved items should now appear in the linked project
Step 4: Troubleshooting
If linking fails:
✅ Double-check Project ID - Make sure it's copied correctly
✅ Verify project access - Ensure you own or have access to the project
✅ Check workspace directory - Make sure you're in YOUR project, not refbase-mcp
✅ Try again - Run
setup_projectagain with the correct ID
After successful linking:
All
save_conversation,save_bug,save_featurewill be associated with your projectNo more NULL project_id issues!
Items appear properly in RefBase project dashboard
💡 Pro Tip: Maximum Export Quality
For the best conversation exports with maximum technical context:
Ask AI to create a comprehensive summary first:
"Please create a detailed technical report summarizing all the work we did in this conversation, including: - Problems encountered and solutions implemented - Code changes made and files modified - Error debugging steps and fixes applied - Implementation approaches and decisions made - Any patterns or best practices discovered"Then export the summary:
"Now please use the save_conversation tool to let AI summarize and export this technical report to RefBase"
Why this works better:
AI creates a structured, comprehensive technical summary
Captures implementation details often missing from raw conversations
Includes debugging context, error resolution steps, and decision-making process
Results in much higher quality knowledge base entries
Makes future AI searches more effective with better context
🎯 Result: You get detailed technical reports instead of raw chat logs, making your RefBase knowledge base far more valuable for future reference and AI context feeding!
Manual Server Start (Alternative) (not tested yet)
If IDE integration doesn't work, you can run the server manually:
# Start the MCP server directly
refbase-mcp start
# Or with custom configuration
refbase-mcp start --port 3000 --config ./my-config.json
# Development mode with hot reload
npm run devAvailable MCP Tools
🚨 IMPORTANT: Project Setup Required First!
Before using any save tools, you MUST link your workspace to a RefBase project:
Option 1: Link to Existing Project (Recommended)
Get your Project ID from RefBase webapp:
Go to your project dashboard at refbase.dev
Find your project and click the 3 dots menu (⋯) next to the project name
Select "Copy Project ID" or find it in project settings
Run setup: Use the
setup_projecttool withlink_existingaction and paste your Project ID
Option 2: Create New Project
Use the setup_project tool with create_new action to create a fresh project.
⚠️ Without this setup, conversations/bugs/features will be saved with NULL project_id and won't appear in your project dashboard!
🛠️ Available Tools
All tools are automatically authenticated through your MCP configuration - just call them directly in your IDE!
Conversation Tools
save_conversation- Save your current AI conversation to RefBase for future referencesearch_conversations- Find similar past conversations by keywords or tagsget_conversation- Retrieve a specific conversation by ID
Bug Tracking Tools
save_bug- Log a new bug with symptoms, severity, and contextsearch_bugs- Find existing bugs by symptoms or keywordsupdate_bug_status- Mark bugs as resolved, in-progress, etc.get_bug_details- Get full details about a specific bug
Feature & Solution Tools
save_feature- Store working code implementations and solutionssearch_features- Find existing implementations for similar featuresget_feature_implementation- Retrieve detailed implementation code
Project Management Tools
setup_project- REQUIRED FIRST: Link your workspace to a RefBase projectget_project_context- Get relevant project information and patternssearch_similar_projects- Find projects with similar technology stacksget_project_patterns- Extract common coding patterns from your project
Development
Setup
git clone <repository>
cd refbase-mcp
npm install
npm run build
cp .env.example .env
npm startScripts
npm run dev # Development with hot reload
npm run build # Build TypeScript
npm run test # Run tests
npm run lint # Lint code
npm run format # Format codeTesting
npm test # Run all tests
npm run test:watch # Watch modeTroubleshooting
Connection Issues
Error: "refbase-mcp is not recognized as an internal or external command"
Cause: You're using local development setup but config points to global command
Solution: Update your IDE config to use
"command": "node"and"args": ["path/to/dist/cli.js"]
Error: "MCP error -32000: Connection closed"
Cause: Wrong file path or using
index.jsinstead ofcli.jsSolutions:
Use
dist/cli.jsnotdist/index.jsCheck your file path is correct
Run
npm run buildto ensuredist/cli.jsexistsTry using forward slashes:
D:/path/to/fileinstead ofD:\\path\\to\\file
Error: API authentication failures
Cause: Missing or incorrect API key
Solutions:
Add
REFBASE_API_KEYto your IDE environment variablesVerify your API key format:
refb_xxxxx...Check the API key is valid at RefBase.dev
IDE shows "Reconnecting to server" repeatedly
Cause: MCP server crashes on startup
Solutions:
Check the MCP server logs for error details
Verify all required environment variables are set
Try running manually:
node dist/cli.jsto see startup errors
Project Setup Issues
Error: "Conversations/bugs/features saved with NULL project_id"
Cause: Haven't run
setup_projectto link workspace to RefBase projectSolution:
Get Project ID: Go to refbase.dev → Project Dashboard → Click 3 dots menu (⋯) next to project name → Copy Project ID
Link project: Use
setup_projecttool withlink_existingaction and paste your Project IDAlternative: Use
setup_projectwithcreate_newto create a new project
Error: "Items don't appear in RefBase project dashboard"
Cause: Items saved without project association (project_id = NULL)
Solution: Follow project setup steps above, then items will be properly linked to your project
Testing Your Setup
Quick Test Commands:
Manual server test:
cd refbase-mcp && node dist/cli.jsCheck if built: Look for
dist/cli.jsfileIDE tool test: In IDE chat, type "Use the save_conversation tool"
Expected Behavior:
MCP server starts silently (no "listening on port" message)
IDE shows RefBase tools:
save_conversation,search_bugs, etc.Tools accept your API key and communicate with RefBase.dev
Configuration Reference
See .env.example for all available configuration options.
License
Apache 2.0
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DasMonkey/refbase-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server