MCP Servers

Six FastMCP servers that expose Luna's memory, web tools, workspace, and cloud integrations to Claude Desktop and any MCP-compatible client.

Overview

Luna ships six Model Context Protocol servers built with FastMCP. Each server exposes a focused set of tools and resources that any MCP-compatible client — including Claude Desktop — can call.

ServerModuleWhat it exposes
luna-memorybackend.mcp.server_memoryList, search, and add facts; personality state resource.
luna-webbackend.mcp.server_webWeb search, fetch, deep research, dataset search.
luna-workspacebackend.mcp.server_workspaceList, read, and write files in the sandboxed workspace.
luna-githubbackend.mcp.server_githubRepos, issues, PRs, comments.
luna-googlebackend.mcp.server_googleGmail, Google Calendar, Drive, Tasks.
luna-microsoftbackend.mcp.server_microsoftOutlook, Microsoft Calendar, OneDrive, To Do.

Claude Desktop setup

Add any combination of Luna's MCP servers to your Claude Desktop config file. On Windows: %APPDATA%\Claude\claude_desktop_config.json. On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json.

claude_desktop_config.json — all six servers
{
  "mcpServers": {
    "luna-memory": {
      "command": "python",
      "args": ["-m", "backend.mcp.server_memory"],
      "cwd": "C:/path/to/Luna"
    },
    "luna-web": {
      "command": "python",
      "args": ["-m", "backend.mcp.server_web"],
      "cwd": "C:/path/to/Luna"
    },
    "luna-workspace": {
      "command": "python",
      "args": ["-m", "backend.mcp.server_workspace"],
      "cwd": "C:/path/to/Luna"
    },
    "luna-github": {
      "command": "python",
      "args": ["-m", "backend.mcp.server_github"],
      "cwd": "C:/path/to/Luna"
    },
    "luna-google": {
      "command": "python",
      "args": ["-m", "backend.mcp.server_google"],
      "cwd": "C:/path/to/Luna"
    },
    "luna-microsoft": {
      "command": "python",
      "args": ["-m", "backend.mcp.server_microsoft"],
      "cwd": "C:/path/to/Luna"
    }
  }
}
💡
You don't need to run all six. Add only the servers whose tools you want available in Claude Desktop.

luna-memory

Gives Claude Desktop read/write access to Luna's fact store and personality state.

Resources

URIReturns
memory://factsJSON array of the 100 most recent facts.
memory://personalityJSON object of the current personality state row.

Tools

ToolArgsDescription
list_factslimit?, category?List stored facts, optionally filtered by category.
search_factsquery, limit?Full-text search across fact content.
add_factcontent, category, importance?Store a new fact with optional importance (default 0.7).

Configuration

No extra env vars needed — reads Luna's SQLite database directly.

luna-web

Exposes Luna's web research stack to Claude Desktop.

Tools

ToolArgsDescription
web_searchqueryDuckDuckGo search — returns numbered results with snippets.
web_fetchurlFetch a URL and return readable text content.
web_researchquerySearch + fetch top sources → cited research context.
dataset_searchquerySearch Kaggle, UCI, Hugging Face, data.gov, NOAA, World Bank.

Configuration

No API key required — uses DuckDuckGo. Configure BRAVE_SEARCH_API_KEY in .env for higher-quality results.

luna-workspace

Sandboxed file access to Luna's workspace directory (data/workspace/). All paths are restricted to the workspace root — paths that escape are rejected.

Resources

URI templateReturns
workspace://{path}Content of the file at path relative to workspace root.

Tools

ToolArgsDescription
workspace_listpath?List files and directories. Empty path = workspace root.
workspace_readpathRead a text file from the workspace.
workspace_writepath, contentWrite or overwrite a text file. Parent dirs created automatically.

Configuration

.env
WORKSPACE_ROOT=data/workspace   # default — relative to Luna root

luna-github

GitHub integration via the GitHub REST API.

Tools

ToolArgsDescription
list_reposnoneYour repositories, sorted by last updated.
list_issuesrepo, state?Issues in a repo ("owner/repo" format).
create_issuerepo, title, body?Create a new issue.
list_prsrepo, state?Pull requests in a repo.
get_prrepo, numberFull PR details including diff.
add_commentrepo, issue_number, bodyComment on an issue or PR.

Configuration

.env
GITHUB_TOKEN=ghp_...   # Personal access token with repo scope

luna-google

Google Workspace integration — Gmail, Calendar, Drive, and Tasks.

Tools

ServiceToolDescription
Gmailgmail_searchSearch messages (Gmail query syntax).
Gmailgmail_sendSend email to a recipient.
Gmailgmail_readRead full message by ID.
Calendarcalendar_list_eventsEvents in a date range.
Calendarcalendar_create_eventCreate an event with title, start, end.
Drivedrive_listList files in Drive.
Drivedrive_readRead a Drive file by ID.
Taskstasks_listList task lists and tasks.
Taskstasks_createCreate a task.

Configuration

.env
GOOGLE_WORKSPACE_ACCESS_TOKEN=ya29...   # OAuth 2.0 access token
# or
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...

luna-microsoft

Microsoft 365 integration via Microsoft Graph — Outlook, Calendar, OneDrive, To Do.

Tools

ServiceToolDescription
Outlookoutlook_searchSearch Outlook messages.
Outlookoutlook_sendSend email via Outlook.
Calendarms_calendar_listList calendar events in a date range.
Calendarms_calendar_createCreate a calendar event.
OneDriveonedrive_listList files in OneDrive.
OneDriveonedrive_readRead a file from OneDrive.
To Dotodo_listList task lists and tasks.
To Dotodo_createCreate a task in a list.

Configuration

.env
MICROSOFT_WORKSPACE_ACCESS_TOKEN=eyJ0...   # Microsoft Graph OAuth token
# or
MICROSOFT_CLIENT_ID=...
MICROSOFT_CLIENT_SECRET=...
MICROSOFT_TENANT_ID=...

Running servers standalone

Each server can be run independently as a subprocess. Claude Desktop launches them automatically when configured; you can also run them manually for development or testing:

terminal
# From the Luna root directory:
python -m backend.mcp.server_memory
python -m backend.mcp.server_web
python -m backend.mcp.server_workspace
python -m backend.mcp.server_github
python -m backend.mcp.server_google
python -m backend.mcp.server_microsoft
📌
MCP servers communicate over stdio — they're not HTTP servers and don't bind a port. The FastMCP library handles the JSON-RPC transport automatically.

Adding a new MCP server

backend/mcp/server_example.py
from mcp.server.fastmcp import FastMCP

mcp = FastMCP("luna-example")

@mcp.tool()
def greet(name: str) -> str:
    """Say hello."""
    return f"Hello, {name}!"

@mcp.resource("example://hello")
def hello_resource() -> str:
    """A static greeting resource."""
    return "Hello from Luna!"

if __name__ == "__main__":
    mcp.run()

Add it to claude_desktop_config.json using the same pattern as the other servers. No registration in Luna's code is required — MCP servers are standalone processes.