ms365-mcp
ms365-mcp
작은 로컬 모델에 맞춰 설계된 Microsoft 365 MCP 서버입니다.
대부분의 MCP 서버는 큰 컨텍스트 윈도우를 가진 프론티어 모델을 위해 만들어져서, 벤더 API가 제공하는 모든 것을 노출하고 모델이 알아서 정리하도록 둡니다. 참조 Microsoft 365 서버는 Microsoft의 Graph OpenAPI 스펙에서 생성된 326개의 도구를 노출합니다.
그것은 8k 컨텍스트의 8B 모델에서는 작동하지 않습니다. 전체 도구 목록이 시스템 프롬프트에 들어가고, 모델은 스물다섯 개 도구를 지나면 어딘가에서 무작위로 선택하기 시작합니다. 이 서버는 반대 접근 방식을 취합니다:
손으로 작성한 열네 개 도구, 상한선은 스물 개로 고정. 도구 목록은 예산이지 기능 목록이 아닙니다.
작은 모델을 위해 작성된 설명, API 메타데이터에서 가져온 것이 아닙니다.
초안 우선. 정확히 하나의 도구만 다른 사람에게 전송할 수 있으며, 수신자 대신 초안 ID를 받고, 파괴적(destructive)으로 주석 처리됩니다.
모든 도구는 MCP
readOnlyHint및destructiveHint주석을 통해 자신의 효과를 선언하므로, 호스트가 도구 이름에서 추측하지 않고 분류할 수 있습니다.
Edge Harness를 위해 만들어졌으며, 모든 MCP 클라이언트에 유용합니다.
상태
초기 단계. 아직 사용할 수 없습니다. 계획은 열 개의 커밋입니다. 전체 순서와 각 결정의 근거는 docs/PLAN.md를 참조하세요.
스캐폴드, 라이선스, CI | 완료 |
stdio를 통한 MCP 프로토콜 | 완료 |
열네 개 도구 표면 | 선언됨, 핸들러는 스텁 |
로그인 | 시작 안 함 |
Microsoft Graph | 시작 안 함 |
Related MCP server: google-nice-mcp
도구 표면 확인하기
--list-tools는 아무것도 시작하지 않고 계정도 필요 없으므로, 아무것도 연결되기 전에 "호스트에게 무엇이 제공될까?"라는 질문에 답합니다:
.venv/bin/python -m ms365_mcp --list-tools기계가 읽을 수 있는 버전을 보려면 --json을 추가하세요.
read whoami Return the display name, email address and timezone…
read resolve_person Look up a person by name or partial name and return…
read list_messages List messages in a mail folder, newest first, as se…
write create_draft Create a draft message. This does NOT send anything…
! write send_draft Send a draft that already exists, by its id. This r…
...
14 tools, 6 that change something, 4 marked destructive (!)오늘날 핸들러는 스텁입니다: 호출하면 도구가 선언되었지만 구현되지 않았다는 문장을 반환합니다. 표면은 무엇이든 구축되기 전에 의도적으로 고정됩니다. 도구 이름, 설명, 효과 클래스는 호스트가 분류하고 모델이 프롬프트에 대해 학습하는 대상이므로, 나중에 변경하는 비용이 크기 때문입니다.
Edge Harness에서 사용하기
하네스는 이 서버를 stdio를 통한 하위 프로세스로 실행하므로, 자체 인터프리터로 실행되며 호스트와 의존성을 공유하지 않습니다. 이것은 우연이 아닙니다: 하네스에는 mcp/라는 로컬 패키지가 있고 PyPI의 공식 SDK도 mcp라고 불리므로, 이 서버를 하네스의 virtualenv에 설치하면 하네스 자체 패키지를 가리게 됩니다.
거기서의 레지스트리 항목은 ms365-own이며, Agent Lab 실행 옵션에서 Check를 누르면 모든 도구가 효과 클래스와 함께 나열됩니다. 열네 개 모두 declared로 분류되는데, 이는 하네스가 도구 이름에서 추측하는 대신 이 서버의 주석에서 가져왔다는 뜻이며, 항목에 재정의가 필요 없습니다.
하네스의 기본 초안 모드에서 send_draft는 보류되고 나머지 열세 개는 사용 가능하므로, 실행이 사람에게 도달할 수 없습니다.
보안
이 저장소는 공개되어 있으며 어떤 종류의 자격 증명도 보유하지 않습니다.
인증은 Microsoft 디바이스 코드 흐름을 사용합니다. 결과 토큰 캐시는 운영 체제의 구성 디렉터리에 소유자 전용 권한으로 기록되며, 이 저장소나 작업 트리에 절대 기록되지 않습니다. .gitignore는 어쨌든 토큰 및 캐시 파일 이름을 포함하며, pre-commit 훅은 자격 증명 형태의 문자열을 스테이징된 변경 사항에서 검사하므로, 실수로 커밋하는 것이 아니라 의도적인 노력이 있어야 커밋할 수 있습니다.
# pragma: allowlist secret으로 끝나는 줄은 훅에서 건너뜁니다. 이것은 이 저장소의 자체 테스트가 가짜 자격 증명을 포함할 수 있도록 존재하며, --no-verify와 달리 검토자가 diff에서 볼 수 있는 표시를 남깁니다. 확실히 가짜인 데이터에만 사용하세요.
개발
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/pytest -q클론당 한 번 비밀 스캔 훅을 활성화하세요:
git config core.hooksPath .githooks라이선스
MIT. LICENSE를 참조하세요.
Available Tools
14 toolscancel_eventCancel an eventADestructive
Cancel an event and notify every attendee. This CANNOT be undone. Read the event with get_event first and be sure it is the right one.
Inputs: event_id (required), message.
create_draftDraft a messageA
Create a draft message. This does NOT send anything: it leaves a draft a person can read and change. Get every recipient address from resolve_person first. Returns a draft id, which send_draft takes if the message is later approved.
Inputs: to (required), body (required), subject (required).
create_eventCreate an eventADestructive
Create a calendar event. If it has attendees, they are invited, which reaches real people, so get their addresses from resolve_person and check the slot with find_free_time first.
Inputs: end (required), start (required), subject (required), location, +1 more.
find_free_timeFind a free slotARead-only
Find open slots of a given length on a date, respecting existing events and working hours. Use this instead of reading the calendar and working out the gaps yourself, which is where arithmetic mistakes turn into double bookings.
Inputs: date (required), minutes.
get_eventRead an eventARead-only
Read one calendar event in full, including its body and the response status of each attendee, by the id list_events returned.
Inputs: event_id (required).
get_messageRead a messageARead-only
Read one message in full, including its body, by the id that list_messages returned. Read the message before replying to it or summarising it; a reply written from the subject line alone invents its own content.
Inputs: message_id (required).
list_eventsList calendar eventsARead-only
List calendar events between two dates, with subject, start, end, location, attendees and id. Dates are YYYY-MM-DD in the account's own timezone. Check the calendar before booking anything, so a new event does not land on top of an existing one.
Inputs: end_date (required), start_date (required).
list_foldersList mail foldersARead-only
List the mail folders on this account with their names and message counts. Use it when a task names a folder you have not seen, rather than guessing that it exists.
Inputs: no named parameters.
list_messagesList mailARead-only
List messages in a mail folder, newest first, as sender, subject, date and id. Bodies are not included; use get_message with an id to read one. Defaults to the inbox and to 10 messages.
Inputs: top, folder, search.
reply_draftDraft a replyA
Create a draft reply to an existing message, keeping its thread and recipients. Does NOT send. Read the message with get_message first, so the reply answers what was actually asked.
Inputs: body (required), message_id (required), reply_all.
resolve_personFind someone's addressARead-only
Look up a person by name or partial name and return their real email address. ALWAYS use this before addressing a message or inviting someone. Never type an email address you were not given. If this returns more than one person, ask which one rather than picking.
Inputs: name (required).
send_draftSend a draftADestructive
Send a draft that already exists, by its id. This reaches a real person and CANNOT be undone. There is deliberately no way to write and send in one step: create the draft, check it is right, then send it.
Inputs: draft_id (required).
update_eventChange an eventADestructive
Change the time, subject or location of an existing event. Attendees are notified. Only the fields you pass are changed. Read the event with get_event first, so you are not overwriting something you have not seen.
Inputs: event_id (required), end, start, subject, +1 more.
whoamiWho am IARead-only
Return the display name, email address and timezone of the signed-in account. Call this when the task says 'me', 'my' or 'I' and you need the actual address, rather than guessing it.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool targets a distinct resource and action: identity, people lookup, mail read/draft/send, and calendar read/find/write. The only close pair, create_draft and reply_draft, is clearly separated by new-vs-reply intent.
Almost all tools follow a consistent verb_noun pattern (list_messages, create_draft, cancel_event). The lone exception is whoami, which is a conventional single-word command but breaks the otherwise uniform pattern.
14 tools is a well-scoped size for a mail-plus-calendar server. Each tool covers a necessary step in reading, creating, and sending mail or managing calendar events, with no redundant utilities.
Calendar coverage is complete with list/get/find/create/update/cancel, and mail covers read, draft, reply-draft, and send. Minor gaps such as updating/deleting drafts or searching messages exist, but agents can work around them with the provided tools.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA production-ready MCP server that provides secure, delegated access to Microsoft 365 services including Email, SharePoint, OneDrive, and Calendar. It enables AI models to search messages, browse files, manage calendar events, and parse document contents using OAuth 2.1 authentication.MIT
- AlicenseAqualityDmaintenanceA read-only MCP server for Gmail and Drive with only 5 tools, designed to be friendly to small local LLMs by minimizing context usage and simplifying inputs.5MIT
- AlicenseBqualityFmaintenanceLightweight MCP server that enables AI agents to manage Microsoft Outlook email, calendar, and files using PKCE authentication with only a Client ID.46MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that exposes a Microsoft 365 mailbox via the Model Context Protocol, enabling AI assistants to search, read, and download emails and attachments, and optionally send mail.-