{"id":27521156,"url":"https://github.com/martinm85/mcp-server-graph-api","last_synced_at":"2026-04-15T07:31:00.190Z","repository":{"id":288077956,"uuid":"966066805","full_name":"MartinM85/mcp-server-graph-api","owner":"MartinM85","description":"Model-context-protocol (MCP) server for the Microsoft Graph API in C#","archived":false,"fork":false,"pushed_at":"2025-04-15T12:13:50.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T13:25:24.190Z","etag":null,"topics":["claude-3-7-sonnet","claude-ai","graph-api","mcp","mcp-server","microsoft-graph-api","microsoft-graph-sdk"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MartinM85.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-14T10:56:06.000Z","updated_at":"2025-04-15T12:16:06.000Z","dependencies_parsed_at":"2025-04-15T13:35:40.577Z","dependency_job_id":null,"html_url":"https://github.com/MartinM85/mcp-server-graph-api","commit_stats":null,"previous_names":["martinm85/mcp-server-graph-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinM85%2Fmcp-server-graph-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinM85%2Fmcp-server-graph-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinM85%2Fmcp-server-graph-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinM85%2Fmcp-server-graph-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MartinM85","download_url":"https://codeload.github.com/MartinM85/mcp-server-graph-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249458907,"owners_count":21275794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-3-7-sonnet","claude-ai","graph-api","mcp","mcp-server","microsoft-graph-api","microsoft-graph-sdk"],"created_at":"2025-04-18T07:59:11.920Z","updated_at":"2025-10-30T05:36:09.051Z","avatar_url":"https://github.com/MartinM85.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCP Server for the Microsoft Graph Api\nModel-context-protocol (MCP) server for the Microsoft Graph API in C#.\n\n## Prerequisites\n\n### Entra ID application\n\nRegister a new Entra ID application, add and grant at least the `User.Read.All` application permission and create a new client secret.\n\nYou can grant also another permissions, it depends on what you want to ask AI about your tenant through the Microsoft Graph API.\n\n### Claude Desktop app\n\nI'm using the [Claude Desktop app](https://claude.ai/download), but I think you can use any other MCP clients, including GitHub Copilot if they allow to add local MCP server.\n\n## MCP server\n\nOpen and build the solution.\n\n### MCP server configuration\n\nOpen the `claude_desktop_config.json` file. On Windows, the file should be located in **\\%APPDATA%\\Claude\\\\** folder.\n\nAdd the MCP Server. Under the `args` section, specify the path to project folder. Don't forget to set the details about the Entra ID application like tenant id, client id and client secret under the `env` section.\n\nBy default, Microsoft Graph global service is used. You can change it by modifying the `NATIONAL_CLOUD` environment variable.\n\nPossible values for the `NATIONAL_CLOUD` are:\n\n- **Global**: https://graph.microsoft.com - Microsoft Graph global service\n- **US_GOV**: https://graph.microsoft.us - Microsoft Graph for US Government L4\n- **US_GOV_DOD**: https://dod-graph.microsoft.us - Microsoft Graph for US Government L5 (DOD)\n- **China**: https://microsoftgraph.chinacloudapi.cn - Microsoft Graph China operated by 21Vianet\n- **Germany**: https://graph.microsoft.de - Microsoft Graph for Germany\n\n```\n{\n    \"mcpServers\": {\n        \"graphApi\": {\n            \"command\": \"dotnet\",\n            \"args\": [\n                \"run\",\n                \"--project\",\n                \"path/to/folder/with/console_project\",\n                \"--no-build\"\n            ],\n            \"env\": {\n                \"TENANT_ID\": \"\u003ctenant_id\u003e\",\n                \"CLIENT_ID\": \"\u003cclient_id\u003e\",\n                \"CLIENT_SECRET\": \"\u003cclient_secret\u003e\",\n                \"NATIONAL_CLOUD\": \"Global\"\n            }\n        }\n    }\n}\n```\n\n## Run MCP server\n\nWhen you open Claude Desktop app, the MCP server should be automatically discovered and run. You can start new chat.\n\nIf Claude Desktop app was already open, you need to close (quit it in system tray) and reopen it.\n\nIn case of any issues, you can check logs in **\\%APPDATA%\\Claude\\\\logs**.\n\n## MCP Client\n\nThe MCP client allows you to connect the MCP server.\n\nTools exposed by the MCP server can be invoked either by Claude AI (via Anthropic Claude API) or by any model deployed to Azure OpenAI Service.\n\nYou need to set the Anthropic API key in the `AnthropicService.GetAnthropicApiKey()` method.\n\n```\nprivate static string GetAnthropicApiKey()\n{\n    return \"\u003canthropic-api-key\u003e\";\n}\n```\n\nFor Azure OpenAI Service, you need to \n- **API key**: set either the `AZURE_OPENAI_API_KEY` environment variable or specify the key in the `AzureOpenAIServiceGetOpenAIApiKey()` method\n- **Azure OpenAI endpoint**: set either the `AZURE_OPENAI_ENDPOINT` environment variable or specify the endpoint in the `AzureOpenAIService.GetOpenAIEndpoint()` method\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinm85%2Fmcp-server-graph-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinm85%2Fmcp-server-graph-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinm85%2Fmcp-server-graph-api/lists"}