Skip to main content

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:

  1. Locate your Claude configuration file
  2. Add the MCP server configuration
  3. Restart Claude
  4. 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
Creating the File

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"
}
}
}
}
Replace Your API Key

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:

  1. Quit Claude completely (not just close the window)
  2. Reopen Claude Desktop
  3. 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​

VariableDefaultDescription
MEMORY_API_KEYRequiredYour Tensorheart API key
MEMORY_API_BASE_URLhttps://api.tensorheart.comAPI endpoint
MEMORY_LOG_LEVELINFOLogging level (DEBUG, INFO, WARNING, ERROR)
MEMORY_TIMEOUT30.0Request timeout in seconds
MEMORY_MAX_RETRIES3Max retries for failed requests
MEMORY_DEFAULT_QUERY_THRESHOLD0.5Default relevance threshold for queries
MEMORY_DEFAULT_MAX_MEMORIES10Default 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:

  1. Check the configuration file location - Make sure you edited the right file
  2. Verify JSON syntax - Use a JSON validator to check for errors
  3. Check logs - Look for MCP server logs in ~/.memory/mcp_server.log
  4. Verify Python - Run python -m mcp_server manually to check for errors

Authentication Errors​

If you see authentication errors:

  1. Check your API key - Make sure it's correct and starts with mk_
  2. Verify key is active - Check the API Keys dashboard
  3. Check permissions - Ensure your API key has read/write permissions

Tools Not Appearing​

If the MCP server loads but tools don't appear:

  1. Restart Claude completely (quit and reopen)
  2. Check Claude version - Ensure you have the latest version
  3. Review server logs - Check ~/.memory/mcp_server.log for errors

Next Steps​

Now that your MCP server is configured, learn about: