Help & Guides

Connect with Claude Code

Use your Syncpen documents as a knowledge base for Claude Code

Connect Claude Code to Syncpen and use your documents as a knowledge base. Claude can search, read, create, update, and organize your documents — move and nest folders, file documents, and clean up — right from the terminal.

What is Claude Code?

Claude Code is Anthropic's official CLI tool that brings Claude AI to your terminal. It can help with coding tasks, answer questions, and access external tools through the Model Context Protocol (MCP).

Step 1: Generate an API Key

  1. Go to Settings → API Keys
  2. Toggle "Enable API Access" to on
  3. Click "Create Key" and give it a name (e.g., "Claude Code - MacBook")
  4. Important: Copy your API key immediately. You won't be able to see it again!

Step 2: Configure Claude Code

Add Syncpen to your Claude Code configuration. This uses syncpen-mcp, our official MCP server package. Edit your MCP configuration file at ~/.mcp.json (or use project-level .mcp.json):

{
  "mcpServers": {
    "syncpen": {
      "command": "npx",
      "args": ["-y", "syncpen-mcp"],
      "env": {
        "SYNCPEN_API_KEY": "sp_your_api_key_here"
      }
    }
  }
}

Replace sp_your_api_key_here with your API key from Step 1. The npx command automatically downloads and runs the package.

Step 3: Restart Claude Code

After saving the configuration, restart Claude Code for the changes to take effect. You should see "syncpen" listed when you run /mcp.

Cloud clients: connect over the hosted URL

The npx setup above runs the MCP server locally — perfect for Claude Code and Claude Desktop. Clients that let you set an auth token — Cursor, Claude Code's HTTP transport, or any client via the mcp-remote bridge — can point at Syncpen's hosted endpoint with your API key as an Authorization header:

{
  "mcpServers": {
    "syncpen": {
      "url": "https://www.syncpen.io/api/mcp-server/mcp",
      "headers": {
        "Authorization": "Bearer sp_your_api_key_here"
      }
    }
  }
}

MCP server URL: https://www.syncpen.io/api/mcp-server/mcp. Your key's scopes apply here too — a read-only key can read but not write or publish.

claude.ai, Claude Desktop, and Cowork have a one-click connector with no token field — they use OAuth instead. Add a custom connector, paste the same URL, sign in, and approve. No key to copy; access is granted on consent, and the same least-privilege scopes apply.

Using Syncpen with Claude Code

Once connected, you can ask Claude to:

  • Search documents: "Search my Syncpen for documents about authentication"
  • Read documents: "Read my Syncpen document titled 'API Design Notes'"
  • List folders: "List my Syncpen folders"
  • Browse documents: "What documents do I have in my 'Projects' folder?"

Available Tools

ToolDescription
syncpen_searchSearch documents by title
syncpen_readRead a document's content as markdown
syncpen_list_foldersList all your folders
syncpen_list_documentsList documents, optionally by folder
syncpen_createCreate a new document with optional content
syncpen_updateUpdate an existing document's title or content
syncpen_create_folderCreate a folder (nest up to 5 levels)
syncpen_rename_folderRename a folder
syncpen_move_folderMove or nest a folder under another
syncpen_move_documentMove a document between folders
syncpen_delete_documentDelete a document (moved to trash)
syncpen_delete_folderDelete a folder and its contents (moved to trash)

Creating Documents

Claude Code can also create new documents in your Syncpen account:

  • Quick notes: "Create a Syncpen document called 'Meeting Notes' with today's action items"
  • Save code snippets: "Save this code to a new Syncpen document in my Code folder"
  • Generate documentation: "Create a README for this project and save it to Syncpen"

Tips

  • Organize with folders: Ask Claude to create, rename, nest, and move folders, and to file documents into them — e.g. "set up a folder structure for this project and move my drafts in"
  • Tidy up safely: Claude can delete documents and folders you no longer need — everything goes to trash, so a mistaken delete is recoverable
  • Reference existing docs: Claude can read your existing documents and use them as context when creating new ones
  • Iterative workflow: Create a document, work on your code, then update it with your progress

Troubleshooting

"Invalid or missing API key" error
Make sure your API key is correct and that API access is still enabled in your API Keys settings.
Claude doesn't see the Syncpen tools
Restart Claude Code after updating your settings. Run /mcp to verify the server is connected.
"Access denied" when reading a document
You can only access documents you own or that have been shared with you.

Need help? If you run into issues, check that your API key is valid, the MCP server is built correctly, and the path in your configuration is correct.