@nu-agent/mcp-server
v0.3.0
Published
MCP (Model Context Protocol) server for [Nu Agent](https://nu-agent.com). Access your Nu Agent conversations from any MCP-compatible client like Claude Code, Claude Desktop, Cursor, and more.
Readme
@nu-agent/mcp-server
MCP (Model Context Protocol) server for Nu Agent. Access your Nu Agent conversations from any MCP-compatible client like Claude Code, Claude Desktop, Cursor, and more.
Installation
npm install -g @nu-agent/mcp-serverAuthentication
Option 1: OAuth Login (recommended)
nu-agent-mcp loginThis opens your browser for Google/Microsoft OAuth. Credentials are saved to ~/.nu-agent/credentials.json.
# Use a specific provider
nu-agent-mcp login --provider microsoft
# Point to a different API (e.g., local development)
nu-agent-mcp login --api-url http://localhost:3001Option 2: API Key
Set the NU_AGENT_API_KEY environment variable. You can create API keys from Settings > API Keys in the Nu Agent web app.
export NU_AGENT_API_KEY=nua_your_api_key_hereOption 3: Config File
Create ~/.nu-agent/config.json:
{
"apiKey": "nua_your_api_key_here"
}Priority order: Environment variable > OAuth credentials > Config file.
Configuration
Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"nu-agent": {
"command": "nu-agent-mcp",
"env": {
"NU_AGENT_API_KEY": "nua_your_api_key_here"
}
}
}
}Or if you've already logged in via OAuth, simply:
{
"mcpServers": {
"nu-agent": {
"command": "nu-agent-mcp"
}
}
}Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"nu-agent": {
"command": "nu-agent-mcp",
"env": {
"NU_AGENT_API_KEY": "nua_your_api_key_here"
}
}
}
}Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| NU_AGENT_API_KEY | API key for authentication | — |
| NU_AGENT_API_URL | API base URL | https://api.nu-agent.com |
Tools
list-conversations
List your chat conversations with optional filtering.
| Parameter | Type | Description |
|-----------|------|-------------|
| scopeType | global | project | department | Filter by scope |
| scopeId | string (UUID) | Filter by project or department ID |
| limit | number (1-100) | Number of results (default: 20) |
| includeShared | boolean | Include shared conversations (default: false) |
get-conversation-context
Get a conversation summary with the first N and last M messages — ideal for understanding context without loading everything.
| Parameter | Type | Description |
|-----------|------|-------------|
| conversationId | string (UUID) | Required. Conversation ID |
| firstMessages | number (1-50) | Messages from the start (default: 5) |
| lastMessages | number (1-50) | Messages from the end (default: 10) |
get-conversation-messages
Get paginated messages from a conversation.
| Parameter | Type | Description |
|-----------|------|-------------|
| conversationId | string (UUID) | Required. Conversation ID |
| limit | number (1-100) | Number of messages (default: 50) |
| cursor | string | Pagination cursor for next page |
Resources
The server also exposes MCP resources for direct reference:
nuagent://conversations— List of recent conversationsnuagent://conversations/{conversationId}— Context summary for a specific conversation
Development
# From the monorepo root
pnpm --filter @nu-agent/mcp-server build
pnpm --filter @nu-agent/mcp-server dev # watch mode
# Run locally
node packages/mcp-server/dist/index.js login --api-url http://localhost:3001License
MIT
