Optare v1.0 is now available. Get started →
SDKs
MCP Server

MCP Server

The Optare MCP Server (@optare/mcp-server) enables AI agents like Claude to interact with Optare ID.

What is MCP?

Model Context Protocol (MCP) (opens in a new tab) is a standard for connecting AI models to external tools and data sources.

With the Optare MCP Server, AI agents can:

  • Authenticate users
  • Check permissions
  • Manage organizations
  • Query user data

Installation

NPM

npm install @optare/mcp-server

Docker

docker pull optare/mcp-server

Configuration

Environment Variables

OPTARE_DOMAIN=https://id.optare.one
OPTARE_API_KEY=your_api_key

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "optare": {
      "command": "npx",
      "args": ["@optare/mcp-server"],
      "env": {
        "OPTARE_DOMAIN": "https://id.optare.one",
        "OPTARE_API_KEY": "your_api_key"
      }
    }
  }
}

Available Tools

Authentication

ToolDescription
get_current_userGet authenticated user info
verify_tokenValidate an access token
check_permissionCheck if user has permission

Users

ToolDescription
list_usersList users in organization
get_userGet user by ID
search_usersSearch by email/name

Organizations

ToolDescription
list_organizationsList all organizations
get_organizationGet org details
list_membersList org members

Licenses

ToolDescription
check_licenseCheck feature access
get_entitlementsList all entitlements

Example Usage

In Claude

User: "Who are the admins in Acme organization?"

Claude: I'll check the members of Acme organization.

[Uses list_members tool with org_id="acme"]

The admins in Acme organization are:
- John Doe (john@acme.com)
- Jane Smith (jane@acme.com)

Programmatic

import { OptareMCPServer } from '@optare/mcp-server';
 
const server = new OptareMCPServer({
  domain: process.env.OPTARE_DOMAIN!,
  apiKey: process.env.OPTARE_API_KEY!,
});
 
// Start SSE mode for web
await server.startSSE(3000);
 
// Or stdio mode for Claude Desktop
await server.startStdio();

Resources

The MCP server also provides resources:

ResourceURI
User profileoptare://users/{userId}
Organizationoptare://orgs/{orgId}
Subscriptionoptare://subscriptions/{subId}

Security

  • API key is required for all operations
  • Operations are scoped to API key permissions
  • Audit logs track all MCP operations

Next Steps