📦
Fastmcp Issue Demo
No description available
0 installs
Trust: 30 — Low
Devtools
Ask AI about Fastmcp Issue Demo
Powered by Claude · Grounded in docs
I know everything about Fastmcp Issue Demo. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
fastmcp-issue-demo
This repository is a minimal example to reproduce an input_schema property key related error occurring in FastMCP (an OpenAPI-based MCP server).
Purpose
- Reproduces a property key rule error that occurs when using a specific OpenAPI spec structure in FastMCP.
- Intended for issue reporting and community inquiries.
Features
- Minimal FastMCP server example
- Uses a Notion Postman converted to OpenAPI
- Reproduces property key rule error
Installation & Setup
1. Create Notion OAuth Integration
- Notion Integrations page visit
- Click "Create new integration".
- Fill in the integration name and other required info.
- Set the Redirect URI to
http://localhost:8000/callback(this must match your.envsetting). - After creation, copy the Client ID and Client Secret.
2. Clone the repository
git clone https://github.com/yourusername/fastmcp-issue-demo.git
cd fastmcp-issue-demo
3. Create and activate virtual environment
python -m venv .venv
# Linux/macOS
source .venv/bin/activate
# Windows
.venv\Scripts\activate
4. Install dependencies
pip install -r requirements.txt
5. Create .env file
- Create a
.envfile by referring to.env.example.
6. Get Notion Token
cd oauth
uvicorn oauth_server:app --host localhost --reload
- Proceed with OAuth authentication in your browser, get the token, and copy it.
6. Apply Token
- In the
mcp/mcp_server.pyfile, find the following section:
client = httpx.AsyncClient(
base_url="https://api.notion.com",
headers={
"Authorization": "Bearer <your_token>",
"Notion-Version": "2022-06-28"
}
)
- Replace
<your_token>with the copied token.
7. Run Server
cd mcp
python mcp_client.py mcp_server.py
- Enter any chat message.
Expected Outcome and Problem Situation
- The server should start normally, but the following error occurs:
Error: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': "tools.8.custom.input_schema.properties: Property keys should match pattern '^[a-zA-Z0-9_.-]{1,64}$'"}}
tools.8==retrieveAPage- Thus, it was identified that a specific OpenAPI spec structure is problematic, but I wasn't able to pinpoint what exactly was wrong despite careful examination.
- When using notion_openapi_fixed.json (with the retrieveAPage part removed), the server works normally.
- You can confirm normal operation by changing the filename in
mcp/mcp_server.pyas follows and re-running:
with open("./json/notion_openapi_fixed.json", "r", encoding="utf-8") as f:
openapi_spec = json.load(f)
Environment
- Python 3.10 or higher recommended
- fastmcp version: Latest version
Security Precautions
- Sensitive information such as API tokens and Client Secrets must be separated into a
.envfile and strictly added to.gitignore. - This repository is for issue reproduction/reporting purposes only, not for production use.
