Configuration
Configure Claude Desktop or Claude Code to use the Tensorheart Memory MCP Server.
Quick Setup
Setting up the MCP server takes just a few minutes:
- Locate your Claude configuration file
- Add the MCP server configuration
- Restart Claude
- Verify it's working
Step 1: Locate Configuration File
The location of the Claude configuration file depends on your operating system:
macOS
~/Library/Application Support/Claude/claude_desktop_config.json
Windows
%APPDATA%\Claude\claude_desktop_config.json
Linux
~/.config/Claude/claude_desktop_config.json
If the file doesn't exist, create it. Make sure to create the parent directories if they don't exist.
Step 2: Add MCP Configuration
Open the configuration file and add the following:
{
"mcpServers": {
"tensorheart-memory": {
"command": "python",
"args": ["-m", "mcp_server"],
"env": {
"MEMORY_API_KEY": "your_api_key_here",
"MEMORY_API_BASE_URL": "https://api.tensorheart.com"
}
}
}
}
Make sure to replace your_api_key_here with your actual API key from the Tensorheart Dashboard.
If You Already Have Other MCP Servers
If you already have MCP servers configured, just add the tensorheart-memory entry to your existing mcpServers object:
{
"mcpServers": {
"existing-server": {
"command": "...",
"args": ["..."]
},
"tensorheart-memory": {
"command": "python",
"args": ["-m", "mcp_server"],
"env": {
"MEMORY_API_KEY": "your_api_key_here",
"MEMORY_API_BASE_URL": "https://api.tensorheart.com"
}
}
}
}
Step 3: Restart Claude
After saving the configuration file:
- Quit Claude completely (not just close the window)
- Reopen Claude Desktop
- The MCP server will start automatically
Step 4: Verify It's Working
Try these commands in Claude:
Test 1: Create a Memory
Claude, remember that I prefer TypeScript over JavaScript.
Claude should respond with confirmation that the memory was created.
Test 2: Query Memories
Claude, what programming language do I prefer?
Claude should recall the information you just saved.
Test 3: List Tools
In Claude Desktop, you can check if the MCP server loaded by looking for memory-related tools in the tools panel.
Advanced Configuration
Custom Settings
You can customize the MCP server behavior with additional environment variables:
{
"mcpServers": {
"tensorheart-memory": {
"command": "python",
"args": ["-m", "mcp_server"],
"env": {
"MEMORY_API_KEY": "your_api_key_here",
"MEMORY_API_BASE_URL": "https://api.tensorheart.com",
"MEMORY_LOG_LEVEL": "INFO",
"MEMORY_TIMEOUT": "30.0",
"MEMORY_MAX_RETRIES": "3"
}
}
}
}
Configuration Options
| Variable | Default | Description |
|---|---|---|
MEMORY_API_KEY | Required | Your Tensorheart API key |
MEMORY_API_BASE_URL | https://api.tensorheart.com | API endpoint |
MEMORY_LOG_LEVEL | INFO | Logging level (DEBUG, INFO, WARNING, ERROR) |
MEMORY_TIMEOUT | 30.0 | Request timeout in seconds |
MEMORY_MAX_RETRIES | 3 | Max retries for failed requests |
MEMORY_DEFAULT_QUERY_THRESHOLD | 0.5 | Default relevance threshold for queries |
MEMORY_DEFAULT_MAX_MEMORIES | 10 | Default max memories to return |
Using a Specific Python Version
If you have multiple Python versions installed:
{
"mcpServers": {
"tensorheart-memory": {
"command": "/usr/local/bin/python3.11",
"args": ["-m", "mcp_server"],
"env": {
"MEMORY_API_KEY": "your_api_key_here"
}
}
}
}
Development vs Production
You can set up different configurations for testing and production:
{
"mcpServers": {
"tensorheart-memory-dev": {
"command": "python",
"args": ["-m", "mcp_server"],
"env": {
"MEMORY_API_KEY": "mk_test_...",
"MEMORY_API_BASE_URL": "https://api.test.tensorheart.com"
}
},
"tensorheart-memory": {
"command": "python",
"args": ["-m", "mcp_server"],
"env": {
"MEMORY_API_KEY": "mk_live_...",
"MEMORY_API_BASE_URL": "https://api.tensorheart.com"
}
}
}
}
Troubleshooting
MCP Server Not Loading
If Claude doesn't show memory tools:
- Check the configuration file location - Make sure you edited the right file
- Verify JSON syntax - Use a JSON validator to check for errors
- Check logs - Look for MCP server logs in
~/.memory/mcp_server.log - Verify Python - Run
python -m mcp_servermanually to check for errors
Authentication Errors
If you see authentication errors:
- Check your API key - Make sure it's correct and starts with
mk_ - Verify key is active - Check the API Keys dashboard
- Check permissions - Ensure your API key has read/write permissions
Tools Not Appearing
If the MCP server loads but tools don't appear:
- Restart Claude completely (quit and reopen)
- Check Claude version - Ensure you have the latest version
- Review server logs - Check
~/.memory/mcp_server.logfor errors
Next Steps
Now that your MCP server is configured, learn about:
- Available Tools - What Claude can do with your memories
- Examples - Common use cases and workflows
- Troubleshooting - Solutions to common issues