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.
| Server | Module | What it exposes |
|---|---|---|
luna-memory | backend.mcp.server_memory | List, search, and add facts; personality state resource. |
luna-web | backend.mcp.server_web | Web search, fetch, deep research, dataset search. |
luna-workspace | backend.mcp.server_workspace | List, read, and write files in the sandboxed workspace. |
luna-github | backend.mcp.server_github | Repos, issues, PRs, comments. |
luna-google | backend.mcp.server_google | Gmail, Google Calendar, Drive, Tasks. |
luna-microsoft | backend.mcp.server_microsoft | Outlook, 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.
{
"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"
}
}
}luna-memory
Gives Claude Desktop read/write access to Luna's fact store and personality state.
Resources
| URI | Returns |
|---|---|
memory://facts | JSON array of the 100 most recent facts. |
memory://personality | JSON object of the current personality state row. |
Tools
| Tool | Args | Description |
|---|---|---|
list_facts | limit?, category? | List stored facts, optionally filtered by category. |
search_facts | query, limit? | Full-text search across fact content. |
add_fact | content, 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
| Tool | Args | Description |
|---|---|---|
web_search | query | DuckDuckGo search — returns numbered results with snippets. |
web_fetch | url | Fetch a URL and return readable text content. |
web_research | query | Search + fetch top sources → cited research context. |
dataset_search | query | Search 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 template | Returns |
|---|---|
workspace://{path} | Content of the file at path relative to workspace root. |
Tools
| Tool | Args | Description |
|---|---|---|
workspace_list | path? | List files and directories. Empty path = workspace root. |
workspace_read | path | Read a text file from the workspace. |
workspace_write | path, content | Write or overwrite a text file. Parent dirs created automatically. |
Configuration
WORKSPACE_ROOT=data/workspace # default — relative to Luna rootluna-github
GitHub integration via the GitHub REST API.
Tools
| Tool | Args | Description |
|---|---|---|
list_repos | none | Your repositories, sorted by last updated. |
list_issues | repo, state? | Issues in a repo ("owner/repo" format). |
create_issue | repo, title, body? | Create a new issue. |
list_prs | repo, state? | Pull requests in a repo. |
get_pr | repo, number | Full PR details including diff. |
add_comment | repo, issue_number, body | Comment on an issue or PR. |
Configuration
GITHUB_TOKEN=ghp_... # Personal access token with repo scopeluna-google
Google Workspace integration — Gmail, Calendar, Drive, and Tasks.
Tools
| Service | Tool | Description |
|---|---|---|
| Gmail | gmail_search | Search messages (Gmail query syntax). |
| Gmail | gmail_send | Send email to a recipient. |
| Gmail | gmail_read | Read full message by ID. |
| Calendar | calendar_list_events | Events in a date range. |
| Calendar | calendar_create_event | Create an event with title, start, end. |
| Drive | drive_list | List files in Drive. |
| Drive | drive_read | Read a Drive file by ID. |
| Tasks | tasks_list | List task lists and tasks. |
| Tasks | tasks_create | Create a task. |
Configuration
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
| Service | Tool | Description |
|---|---|---|
| Outlook | outlook_search | Search Outlook messages. |
| Outlook | outlook_send | Send email via Outlook. |
| Calendar | ms_calendar_list | List calendar events in a date range. |
| Calendar | ms_calendar_create | Create a calendar event. |
| OneDrive | onedrive_list | List files in OneDrive. |
| OneDrive | onedrive_read | Read a file from OneDrive. |
| To Do | todo_list | List task lists and tasks. |
| To Do | todo_create | Create a task in a list. |
Configuration
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:
# 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_microsoftAdding a new MCP server
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.