home / mcp / claude mcp server

Claude MCP Server

MCP server enabling Microsoft Graph access through Claude for structured Graph API calls.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jbagent-test1": {
      "url": "http://localhost:3000/api/graph",
      "headers": {
        "AZURE_CLIENT_ID": "YOUR_CLIENT_ID",
        "AZURE_TENANT_ID": "YOUR_TENANT_ID",
        "AZURE_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
      }
    }
  }
}

You can use an MCP server to securely proxy Microsoft Graph API calls through Claude, enabling natural language agents to query organizational data without exposing credentials or raw API details. This setup lets you authorizable Graph requests, manage access with Azure AD, and extend capabilities with Claude-driven workflows.

How to use

Use the MCP server together with the Claude application to perform Graph API operations from natural language prompts. Start the MCP server first, then start the Claude application. Your Claude prompts can request data such as user lists, group details, or directory information, and the MCP server handles authentication and calls to Microsoft Graph.

Key capabilities you can leverage include invoking Graph API endpoints through the Claude interface, using a dedicated endpoint to run Graph queries, and optionally analyzing organizational data with a specialized Claude route. Ensure your authentication credentials are valid and that your Azure AD app has the required Graph permissions.

When you issue a request through Claude for Graph data, the MCP server validates your user context, translates the request into a Graph API call, and returns the results. You can tailor responses by adjusting the Claude system prompt and by adding domain-specific context to improve relevance.

How to install

# Prerequisites
- Node.js installed (>= 14.x)
- npm installed (comes with Node.js)

# Phase 1: MCP server setup
# 1) Install and run the MCP server
npm install
npm start

# The MCP server exposes Graph API endpoints at http://localhost:3000/api/graph
# 2) Test the MCP server using the test client or curl
node test-client.js

# Or directly call the Graph endpoint
curl -X POST http://localhost:3000/api/graph \
  -H "Content-Type: application/json" \
  -H "X-User-ID: default-user" \
  -d '{"endpoint": "/users", "method": "GET", "queryParams": {"$top": 5}, "allData": false}'

# Phase 2: Claude integration
# 3) Install and run the Claude application
cd claude-app
npm install
npm start

# 4) Test the Claude integration
curl -X POST http://localhost:4000/api/chat \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"role": "user", "content": "How many users are in our organization?"}]}'

Additional sections

Configuration covers both the MCP server and the Claude application. The MCP server uses Azure AD credentials to access Graph API. The Claude application requires an Anthropic API key and the MCP server URL to connect.

Security considerations include authenticating every Graph API request, enforcing authorization via user context, protecting data shared with Claude, and enabling audit logging for Graph API activity. Implement role-based access control and data retention policies as part of your deployment.

Troubleshooting tips: verify Azure AD credentials, ensure network connectivity, use the test client to confirm MCP connectivity, format JSON correctly, and check Azure permissions if Graph errors appear. For Claude API issues, verify the Anthropic API key and request formatting.

Available tools

GraphEndpoint

Endpoint for querying Microsoft Graph API via MCP with authorized user context.

ChatEndpoint

Claude integration endpoint to process chat messages with Graph capabilities.

AnalyzeOrganization

Specialized endpoint for organizational analysis using Graph data.