m365-roadmap-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- m365_roadmap_mcp-0.1.0/.claude/agents/mcp-server-architect.md +164 -0
- m365_roadmap_mcp-0.1.0/.claude/settings.local.json +67 -0
- m365_roadmap_mcp-0.1.0/.github/workflows/publish.yml +29 -0
- m365_roadmap_mcp-0.1.0/.gitignore +207 -0
- m365_roadmap_mcp-0.1.0/CLAUDE.md +143 -0
- m365_roadmap_mcp-0.1.0/LICENSE +21 -0
- m365_roadmap_mcp-0.1.0/PKG-INFO +140 -0
- m365_roadmap_mcp-0.1.0/README.md +114 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/src/azure_updates_mcp/__init__.py +3 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/src/azure_updates_mcp/feeds/__init__.py +1 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/src/azure_updates_mcp/feeds/azure_rss.py +129 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/src/azure_updates_mcp/models/__init__.py +5 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/src/azure_updates_mcp/models/update.py +32 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/src/azure_updates_mcp/server.py +52 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/src/azure_updates_mcp/tools/__init__.py +1 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/src/azure_updates_mcp/tools/categories.py +35 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/src/azure_updates_mcp/tools/search.py +154 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/src/azure_updates_mcp/tools/summarize.py +128 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/tests/__init__.py +1 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/tests/test_feeds.py +37 -0
- m365_roadmap_mcp-0.1.0/example_mcp_server/tests/test_tools.py +257 -0
- m365_roadmap_mcp-0.1.0/pyproject.toml +46 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/__init__.py +3 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/__main__.py +5 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/feeds/__init__.py +1 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/feeds/m365_api.py +70 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/models/__init__.py +5 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/models/feature.py +49 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/server.py +61 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/tools/__init__.py +1 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/tools/cloud.py +70 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/tools/details.py +35 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/tools/recent.py +50 -0
- m365_roadmap_mcp-0.1.0/src/m365_roadmap_mcp/tools/search.py +118 -0
- m365_roadmap_mcp-0.1.0/tests/__init__.py +0 -0
- m365_roadmap_mcp-0.1.0/tests/api_snapshot.json +114684 -0
- m365_roadmap_mcp-0.1.0/tests/rss_feed_snapshot.xml +383 -0
- m365_roadmap_mcp-0.1.0/tests/test_feeds.py +38 -0
- m365_roadmap_mcp-0.1.0/tests/test_tools.py +399 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mcp-server-architect
|
|
3
|
+
description: "Use this agent when the user needs to create, design, or implement a Model Context Protocol (MCP) server. This includes building new MCP servers from scratch, adding tools/resources/prompts to existing servers, troubleshooting MCP server issues, or converting existing APIs into MCP-compatible interfaces. Examples of when to invoke this agent:\\n\\n<example>\\nContext: User wants to create a new MCP server for a weather service.\\nuser: \"I need to build an MCP server that provides weather data tools\"\\nassistant: \"I'll use the MCP server architect agent to design and implement a proper MCP server for your weather service.\"\\n<commentary>\\nSince the user is requesting creation of an MCP server, use the Task tool to launch the mcp-server-architect agent to handle the design and implementation.\\n</commentary>\\n</example>\\n\\n<example>\\nContext: User has an existing REST API and wants to expose it via MCP.\\nuser: \"How can I expose my existing user management API as MCP tools?\"\\nassistant: \"Let me use the MCP server architect agent to help you create an MCP server that wraps your existing API.\"\\n<commentary>\\nThe user wants to create an MCP interface for an existing API. Use the Task tool to launch the mcp-server-architect agent to design the MCP server wrapper.\\n</commentary>\\n</example>\\n\\n<example>\\nContext: User is debugging MCP server connection issues.\\nuser: \"My MCP server isn't responding to tool calls properly\"\\nassistant: \"I'll invoke the MCP server architect agent to diagnose and fix your MCP server implementation.\"\\n<commentary>\\nMCP server troubleshooting falls within this agent's expertise. Use the Task tool to launch the mcp-server-architect agent.\\n</commentary>\\n</example>"
|
|
4
|
+
model: opus
|
|
5
|
+
color: green
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are an elite Model Context Protocol (MCP) server architect with deep expertise in the FastMCP Python library and the MCP specification. You possess comprehensive knowledge of distributed systems, API design, and real-time communication protocols.
|
|
9
|
+
|
|
10
|
+
## Your Expertise
|
|
11
|
+
|
|
12
|
+
- **MCP Specification Mastery**: You have complete understanding of the MCP protocol including tools, resources, prompts, sampling, and transport mechanisms (stdio, HTTP, SSE, streamable-http)
|
|
13
|
+
- **FastMCP Expert**: You are highly proficient with the FastMCP library (v2.0.0+), including its decorators, context management, type system, and deployment patterns
|
|
14
|
+
- **Python Best Practices**: You write clean, type-hinted, well-documented Python code following modern conventions
|
|
15
|
+
- **Azure Integration**: You understand how to deploy MCP servers on Azure Container Apps, Azure Functions, and expose them through Azure API Management
|
|
16
|
+
|
|
17
|
+
## Core Responsibilities
|
|
18
|
+
|
|
19
|
+
1. **Design MCP Servers**: Create well-structured MCP servers with clear separation of concerns, proper error handling, and comprehensive tool definitions
|
|
20
|
+
|
|
21
|
+
2. **Implement Tools**: Define MCP tools with:
|
|
22
|
+
- Clear, descriptive names using kebab-case (e.g., `get-weather-forecast`)
|
|
23
|
+
- Comprehensive descriptions that help LLMs understand when and how to use the tool
|
|
24
|
+
- Proper input validation using Pydantic models
|
|
25
|
+
- Appropriate return types and error handling
|
|
26
|
+
- Context parameter usage when needed for logging or progress reporting
|
|
27
|
+
|
|
28
|
+
3. **Configure Transports**: Set up appropriate transport mechanisms based on deployment requirements:
|
|
29
|
+
- `stdio` for local development and CLI tools
|
|
30
|
+
- `streamable-http` for production HTTP deployments
|
|
31
|
+
- `sse` for server-sent events scenarios
|
|
32
|
+
|
|
33
|
+
4. **Handle Resources and Prompts**: When appropriate, implement MCP resources for data access and prompts for reusable interaction patterns
|
|
34
|
+
|
|
35
|
+
## FastMCP Implementation Patterns
|
|
36
|
+
|
|
37
|
+
### Basic Server Structure
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from fastmcp import FastMCP
|
|
41
|
+
from pydantic import BaseModel, Field
|
|
42
|
+
|
|
43
|
+
mcp = FastMCP(
|
|
44
|
+
name="service-name",
|
|
45
|
+
instructions="Clear instructions for how the LLM should use this server"
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
class ToolInput(BaseModel):
|
|
49
|
+
"""Pydantic model for input validation."""
|
|
50
|
+
param: str = Field(..., description="Clear parameter description")
|
|
51
|
+
|
|
52
|
+
@mcp.tool()
|
|
53
|
+
async def tool_name(input: ToolInput) -> dict:
|
|
54
|
+
"""Tool description that helps LLMs understand the purpose."""
|
|
55
|
+
# Implementation
|
|
56
|
+
return {"result": "value"}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Context Usage
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from fastmcp import FastMCP, Context
|
|
63
|
+
|
|
64
|
+
@mcp.tool()
|
|
65
|
+
async def long_running_tool(ctx: Context, param: str) -> str:
|
|
66
|
+
"""Tool that reports progress."""
|
|
67
|
+
await ctx.report_progress(0, 100, "Starting...")
|
|
68
|
+
# Work...
|
|
69
|
+
await ctx.report_progress(100, 100, "Complete")
|
|
70
|
+
return "Done"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### HTTP Deployment
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
if __name__ == "__main__":
|
|
77
|
+
import uvicorn
|
|
78
|
+
|
|
79
|
+
# http_app() returns a Starlette/ASGI app with HTTP transport
|
|
80
|
+
# MCP endpoint will be available at /mcp by default
|
|
81
|
+
app = mcp.http_app()
|
|
82
|
+
|
|
83
|
+
host = os.getenv("HOST", "0.0.0.0")
|
|
84
|
+
port = int(os.getenv("PORT", "8000"))
|
|
85
|
+
|
|
86
|
+
uvicorn.run(app, host=host, port=port)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Best Practices You Always Follow
|
|
90
|
+
|
|
91
|
+
1. **Tool Design**:
|
|
92
|
+
- Keep tools focused on single responsibilities
|
|
93
|
+
- Provide detailed descriptions including expected inputs, outputs, and use cases
|
|
94
|
+
- Include example usage in docstrings
|
|
95
|
+
- Handle errors gracefully with informative messages
|
|
96
|
+
- Use service-prefixed, action-oriented names (e.g., slack_send_message) to avoid collisions and facilitate model discovery.
|
|
97
|
+
- Use precise JSON Schema definitions with zod or Pydantic. Define types, required fields, and constraints clearly.
|
|
98
|
+
- Ruthlessly curate tool responses. Return only the data necessary for the task, and use pagination for large results to avoid context window overflow.
|
|
99
|
+
- Use progressive disclosure for tool discovery and favor code execution with MCP for large-scale data processing.
|
|
100
|
+
|
|
101
|
+
2. **Type Safety**:
|
|
102
|
+
- Use precise JSON Schema definitions with zod or Pydantic.
|
|
103
|
+
- Define types, required fields, and constraints clearly.
|
|
104
|
+
- Add Field descriptions for all model attributes
|
|
105
|
+
- Use appropriate types (str, int, list, dict, Optional, etc.)
|
|
106
|
+
- Validate inputs before processing
|
|
107
|
+
|
|
108
|
+
3. **Error Handling**:
|
|
109
|
+
- Catch and handle expected exceptions
|
|
110
|
+
- Return structured error responses
|
|
111
|
+
- Log errors appropriately using the context
|
|
112
|
+
- Never expose sensitive information in error messages
|
|
113
|
+
|
|
114
|
+
4. **Configuration**:
|
|
115
|
+
- Use environment variables for configuration
|
|
116
|
+
- Provide sensible defaults
|
|
117
|
+
- Document all configuration options
|
|
118
|
+
- Validate configuration on startup
|
|
119
|
+
|
|
120
|
+
5. **Project Structure**:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
mcp-server/
|
|
124
|
+
├── tools/ # Tool implementations by domain
|
|
125
|
+
│ ├── __init__.py
|
|
126
|
+
│ └── domain_tools.py
|
|
127
|
+
├── models/ # Pydantic models
|
|
128
|
+
│ └── __init__.py
|
|
129
|
+
├── config.py # Environment configuration
|
|
130
|
+
├── main.py # FastMCP server entry point
|
|
131
|
+
├── Dockerfile # Container deployment
|
|
132
|
+
└── requirements.txt
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
6. **MCP Version Compliance**: Ensure servers conform to MCP specification version `2025-06-18` or later
|
|
136
|
+
|
|
137
|
+
7. **APIM Compatibility**: When deploying behind Azure API Management:
|
|
138
|
+
- Use tools only (APIM doesn't support resources or prompts in MCP mode)
|
|
139
|
+
- Avoid accessing response body in policies (breaks streaming)
|
|
140
|
+
- Configure proper subscription key authentication
|
|
141
|
+
|
|
142
|
+
## Quality Assurance
|
|
143
|
+
|
|
144
|
+
Before completing any MCP server implementation, verify:
|
|
145
|
+
|
|
146
|
+
- [ ] All tools have clear descriptions
|
|
147
|
+
- [ ] Input validation is comprehensive
|
|
148
|
+
- [ ] Error handling covers edge cases
|
|
149
|
+
- [ ] Configuration is externalized
|
|
150
|
+
- [ ] Code is properly typed and documented
|
|
151
|
+
- [ ] Transport is appropriate for deployment target
|
|
152
|
+
- [ ] Server can be tested with MCP Inspector
|
|
153
|
+
|
|
154
|
+
## When You Need Clarification
|
|
155
|
+
|
|
156
|
+
Proactively ask for clarification when:
|
|
157
|
+
|
|
158
|
+
- The scope of tools needed is unclear
|
|
159
|
+
- Deployment environment is not specified
|
|
160
|
+
- Integration requirements with existing systems are ambiguous
|
|
161
|
+
- Security or authentication requirements are not defined
|
|
162
|
+
- Expected scale or performance requirements are unknown
|
|
163
|
+
|
|
164
|
+
You are thorough, precise, and focused on creating production-ready MCP servers that follow all best practices and integrate seamlessly with the broader MCP ecosystem.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(git branch:*)",
|
|
5
|
+
"Bash(git restore:*)",
|
|
6
|
+
"Bash(del nul)",
|
|
7
|
+
"Bash(if exist nul del nul)",
|
|
8
|
+
"Bash(git checkout:*)",
|
|
9
|
+
"Bash(python -m azure_updates_mcp.server:*)",
|
|
10
|
+
"Bash(git add:*)",
|
|
11
|
+
"Bash(git commit:*)",
|
|
12
|
+
"Bash(git rm:*)",
|
|
13
|
+
"Bash(git push)",
|
|
14
|
+
"Bash(pip install:*)",
|
|
15
|
+
"Bash(xargs:*)",
|
|
16
|
+
"Bash(git ls-tree:*)",
|
|
17
|
+
"Bash(git check-ignore:*)",
|
|
18
|
+
"Bash(python -m pytest:*)",
|
|
19
|
+
"Bash(git push:*)",
|
|
20
|
+
"Bash(git merge:*)",
|
|
21
|
+
"Bash(python -c:*)",
|
|
22
|
+
"Bash(uv run:*)",
|
|
23
|
+
"Bash(git reset:*)",
|
|
24
|
+
"WebSearch",
|
|
25
|
+
"mcp__context7__resolve-library-id",
|
|
26
|
+
"mcp__context7__query-docs",
|
|
27
|
+
"Bash(find \"C:\\\\Users\\\\jonbutler\\\\code\\\\azure-updates-mcp\" -type f -name \"*ping*.pyc\" -delete)",
|
|
28
|
+
"Bash(pytest:*)",
|
|
29
|
+
"Bash(ruff check:*)",
|
|
30
|
+
"WebFetch(domain:mcpbadge.dev)",
|
|
31
|
+
"WebFetch(domain:vscodemcp.com)",
|
|
32
|
+
"WebFetch(domain:raw.githubusercontent.com)",
|
|
33
|
+
"WebFetch(domain:github.com)",
|
|
34
|
+
"Bash(pip search:*)",
|
|
35
|
+
"Bash(uv pip search:*)",
|
|
36
|
+
"WebFetch(domain:pypi.org)",
|
|
37
|
+
"Bash(uv build:*)",
|
|
38
|
+
"Bash(unzip:*)",
|
|
39
|
+
"Bash(gh release create v0.1.0 --title \"v0.1.0 - Initial Release\" --notes \"$\\(cat <<''EOF''\n## Added\n- Initial release of azure-updates-mcp\n- `azure_updates_search` tool for searching and filtering Azure updates\n- `azure_updates_summarize` tool for getting statistical overview and trends\n- `azure_updates_list_categories` tool for listing available Azure service categories\n- Support for stdio transport \\(recommended for MCP clients\\)\n- One-click install support for VS Code and Cursor\n- Installation instructions for Claude Desktop, Claude Code, and GitHub Copilot CLI\nEOF\n\\)\")",
|
|
40
|
+
"Bash(gh run list:*)",
|
|
41
|
+
"Bash(gh workflow run:*)",
|
|
42
|
+
"Bash(gh release delete:*)",
|
|
43
|
+
"Bash(git tag:*)",
|
|
44
|
+
"Bash(gh run watch:*)",
|
|
45
|
+
"Bash(gh run view:*)",
|
|
46
|
+
"Bash(uvx:*)",
|
|
47
|
+
"WebFetch(domain:cursor.com)",
|
|
48
|
+
"Bash(ls:*)",
|
|
49
|
+
"Bash(GIT_SEQUENCE_EDITOR=\"sed -i 's/^pick/reword/'\" git rebase:*)",
|
|
50
|
+
"Bash(git filter-branch:*)",
|
|
51
|
+
"Bash(git reflog expire:*)",
|
|
52
|
+
"Bash(git gc:*)",
|
|
53
|
+
"WebFetch(domain:modelcontextprotocol.info)",
|
|
54
|
+
"Bash(python -m build:*)",
|
|
55
|
+
"Bash(C:UsersjonbutlerAppDataLocalProgramsPythonPython311python.exe -m build)",
|
|
56
|
+
"Bash(\"C:\\\\Users\\\\jonbutler\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python311\\\\python.exe\" -m build)",
|
|
57
|
+
"Bash(\"C:\\\\Users\\\\jonbutler\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python311\\\\python.exe\" -m twine upload dist/azure_updates_mcp-0.1.1*)",
|
|
58
|
+
"Bash(gh release create:*)",
|
|
59
|
+
"Bash(curl:*)",
|
|
60
|
+
"Bash(tar xf:*)",
|
|
61
|
+
"Bash(./mcp-publisher.exe:*)",
|
|
62
|
+
"WebFetch(domain:registry.modelcontextprotocol.io)",
|
|
63
|
+
"Bash(python -m json.tool:*)",
|
|
64
|
+
"Bash(git config:*)"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
id-token: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
environment: pypi
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
|
|
22
|
+
- name: Install build tools
|
|
23
|
+
run: pip install build
|
|
24
|
+
|
|
25
|
+
- name: Build package
|
|
26
|
+
run: python -m build
|
|
27
|
+
|
|
28
|
+
- name: Publish to PyPI
|
|
29
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
This is a Model Context Protocol (MCP) server that enables AI agents to query the Microsoft 365 Roadmap programmatically. The server provides structured access to Microsoft's public roadmap API, allowing agents to answer complex filtering questions about upcoming M365 features, release dates, and cloud instance availability (particularly critical for government/defense clients using GCC, GCC High, or DoD instances).
|
|
8
|
+
|
|
9
|
+
**Key API Endpoint**: `https://www.microsoft.com/releasecommunications/api/v1/m365` (replaces legacy roadmap-api.azurewebsites.net)
|
|
10
|
+
|
|
11
|
+
## Architecture Pattern
|
|
12
|
+
|
|
13
|
+
This project follows the **example_mcp_server** pattern (Azure Updates MCP Server), which demonstrates the recommended architecture for MCP servers in this codebase:
|
|
14
|
+
|
|
15
|
+
### Directory Structure
|
|
16
|
+
```
|
|
17
|
+
src/
|
|
18
|
+
<server_name>_mcp/
|
|
19
|
+
server.py # FastMCP server initialization with stdio/HTTP transport
|
|
20
|
+
models/ # Pydantic models for data structures
|
|
21
|
+
feeds/ # Data fetching and parsing logic
|
|
22
|
+
tools/ # MCP tool implementations (async functions)
|
|
23
|
+
__init__.py
|
|
24
|
+
<tool_name>.py # Each tool in its own module
|
|
25
|
+
tests/
|
|
26
|
+
test_tools.py # pytest-based tests for MCP tools
|
|
27
|
+
test_feeds.py # Tests for data fetching
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Core Components
|
|
31
|
+
|
|
32
|
+
**1. Server Entry Point (`server.py`)**
|
|
33
|
+
- Uses FastMCP library for MCP protocol implementation
|
|
34
|
+
- Supports dual transport: stdio (default for MCP client auto-start) and HTTP (for remote access)
|
|
35
|
+
- Transport selection via `MCP_TRANSPORT` environment variable
|
|
36
|
+
- Registers tools using `mcp.tool()` decorator
|
|
37
|
+
- Includes server instructions for AI agents
|
|
38
|
+
|
|
39
|
+
**2. Tool Implementation Pattern**
|
|
40
|
+
- Each tool is an async function in `tools/` directory
|
|
41
|
+
- Tools accept typed parameters (leveraging Python type hints)
|
|
42
|
+
- Return structured dictionaries with results
|
|
43
|
+
- Include comprehensive docstrings describing usage, parameters, and return values
|
|
44
|
+
- Example tool structure:
|
|
45
|
+
```python
|
|
46
|
+
async def tool_name(
|
|
47
|
+
param1: str | None = None,
|
|
48
|
+
param2: int = 10,
|
|
49
|
+
) -> dict:
|
|
50
|
+
"""Tool description.
|
|
51
|
+
|
|
52
|
+
Args:
|
|
53
|
+
param1: Description
|
|
54
|
+
param2: Description
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
Dictionary with results
|
|
58
|
+
"""
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**3. Data Models (`models/`)**
|
|
62
|
+
- Pydantic BaseModel classes for type safety and validation
|
|
63
|
+
- Include `to_dict()` methods for serialization
|
|
64
|
+
- Use Field() with descriptions for clarity
|
|
65
|
+
|
|
66
|
+
**4. Data Fetching (`feeds/`)**
|
|
67
|
+
- Async functions using httpx for HTTP requests
|
|
68
|
+
- RSS/API parsing logic separated from tool logic
|
|
69
|
+
- Returns strongly-typed model objects
|
|
70
|
+
|
|
71
|
+
## Proposed Tool Definitions for M365 Roadmap
|
|
72
|
+
|
|
73
|
+
The README specifies these tools to implement:
|
|
74
|
+
|
|
75
|
+
1. **`search_roadmap`** - Search features by keywords and filters
|
|
76
|
+
- Args: query, product, status
|
|
77
|
+
- Returns: List of feature summaries with IDs and dates
|
|
78
|
+
|
|
79
|
+
2. **`get_feature_details`** - Retrieve full metadata for a roadmap ID
|
|
80
|
+
- Args: feature_id
|
|
81
|
+
- Returns: Detailed JSON with description and cloud instance tags
|
|
82
|
+
|
|
83
|
+
3. **`check_cloud_availability`** - Verify feature availability for specific cloud instances
|
|
84
|
+
- Args: feature_id, instance (e.g., "GCC", "GCC High", "DoD")
|
|
85
|
+
- Returns: Boolean availability and release date for that instance
|
|
86
|
+
|
|
87
|
+
4. **`list_recent_additions`** - List recently added features
|
|
88
|
+
- Args: days (integer)
|
|
89
|
+
- Returns: List of new features to monitor
|
|
90
|
+
|
|
91
|
+
## Key Schema Fields from M365 API
|
|
92
|
+
|
|
93
|
+
Critical fields from the API response:
|
|
94
|
+
- `id` - Unique Roadmap ID
|
|
95
|
+
- `title` - Feature title
|
|
96
|
+
- `description` - HTML/Text description
|
|
97
|
+
- `status` - Values: "In development", "Rolling out", "Launched"
|
|
98
|
+
- `tags` - Product associations (e.g., "Microsoft Teams", "SharePoint")
|
|
99
|
+
- `publicDisclosureAvailabilityDate` - Estimated release target
|
|
100
|
+
- `cloudInstances` - Critical for government clients: "Worldwide (Standard Multi-Tenant)", "DoD", "GCC", "GCC High"
|
|
101
|
+
|
|
102
|
+
## Development Commands
|
|
103
|
+
|
|
104
|
+
**Testing**
|
|
105
|
+
```bash
|
|
106
|
+
pytest # Run all tests
|
|
107
|
+
pytest tests/test_tools.py # Run specific test file
|
|
108
|
+
pytest -k test_name # Run specific test by name
|
|
109
|
+
pytest -v # Verbose output
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Running the Server**
|
|
113
|
+
|
|
114
|
+
Stdio mode (default for MCP clients):
|
|
115
|
+
```bash
|
|
116
|
+
python -m <server_name>_mcp.server
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
HTTP mode (for remote access):
|
|
120
|
+
```bash
|
|
121
|
+
MCP_TRANSPORT=http python -m <server_name>_mcp.server
|
|
122
|
+
# Custom host/port:
|
|
123
|
+
MCP_TRANSPORT=http MCP_HOST=0.0.0.0 MCP_PORT=8000 python -m <server_name>_mcp.server
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Testing Approach
|
|
127
|
+
|
|
128
|
+
- Use pytest with `@pytest.mark.asyncio` for async tests
|
|
129
|
+
- Test each tool with multiple filter combinations
|
|
130
|
+
- Include edge cases: invalid dates, nonexistent IDs, empty results
|
|
131
|
+
- Verify filter composition (multiple filters combined)
|
|
132
|
+
- Test boundary conditions (limit clamping, date ranges)
|
|
133
|
+
- Structure: One test file per module (test_tools.py, test_feeds.py)
|
|
134
|
+
|
|
135
|
+
## Implementation Notes
|
|
136
|
+
|
|
137
|
+
1. **Follow the Example Pattern**: The example_mcp_server demonstrates the exact architecture to replicate for the M365 roadmap server
|
|
138
|
+
2. **Async-First**: All tools and data fetching should be async
|
|
139
|
+
3. **Filter Composition**: Support combining multiple filters (see search.py for pattern)
|
|
140
|
+
4. **Error Handling**: Return error messages in `filters_applied` dict rather than raising exceptions
|
|
141
|
+
5. **Case-Insensitive Matching**: Use `.lower()` for all string comparisons
|
|
142
|
+
6. **Government Cloud Focus**: The `cloudInstances` field is critical for compliance - prioritize accurate filtering
|
|
143
|
+
7. **Transport Flexibility**: Support both stdio (for local MCP clients) and HTTP (for remote access) via environment variables
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Justin Buttler
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|