Skip to content

MCP Setup

Claude Desktop

Add this to your claude_desktop_config.json:

Config location: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "papersmith": {
      "command": "papersmith",
      "args": [
        "mcp-server",
        "--transport", "stdio",
        "--output-dir", "C:/Users/YourName/Documents/PapersmithOutputs"
      ]
    }
  }
}

Config location: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "papersmith": {
      "command": "papersmith",
      "args": [
        "mcp-server",
        "--transport", "stdio",
        "--output-dir", "/Users/YourName/Documents/PapersmithOutputs"
      ]
    }
  }
}

Config location: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "papersmith": {
      "command": "papersmith",
      "args": [
        "mcp-server",
        "--transport", "stdio",
        "--output-dir", "/home/YourName/Documents/PapersmithOutputs"
      ]
    }
  }
}

After editing the config, restart Claude Desktop.

Cursor

  1. Go to SettingsFeaturesMCP
  2. Click + Add New MCP Server
  3. Name: papersmith
  4. Type: command
  5. Command: papersmith mcp-server --transport stdio

Custom Output Directory

The --output-dir option controls where saved documents are written. This is critical for sandboxed environments where the MCP server's filesystem may be isolated.

papersmith mcp-server --transport stdio --output-dir /path/to/output

You can also set it via environment variable:

export PAPERSMITH_OUTPUT_DIR=/path/to/output
papersmith mcp-server --transport stdio

Tip

Without --output-dir, files default to your ~/Documents folder on Windows/macOS or the current directory on Linux.

Verifying the Connection

After restarting Claude Desktop, you should see papersmith listed in the MCP tools panel (bottom-right of the chat window). Try asking:

"Create a simple document with a heading and some text using papersmith"

Claude should call create_document, add_heading, add_text, and save_document automatically.

Troubleshooting

"Unexpected token" error on startup

All output to stdout must be valid JSON-RPC. If you see JSON parse errors, ensure no print() statements are writing to stdout in your papersmith installation.

Files save but can't be opened

The MCP server may be running in a sandboxed filesystem. Use --output-dir to point to a directory on your actual filesystem.

Command not found

If papersmith is not in your PATH, use the full Python module path:

{
  "command": "python",
  "args": ["-m", "papersmith.cli.main", "mcp-server", "--transport", "stdio"]
}