Add test_credentials.py for Penpot API credential verification and project listing

- Introduced a new script, `test_credentials.py`, to verify Penpot API credentials and list associated projects.
- The script loads environment variables, checks for required credentials, and attempts to authenticate with the Penpot API.
- Added functionality to fetch and display project details and files, including error handling for authentication and project retrieval.
- Updated `PenpotAPI` class to include a User-Agent header and improved error handling during profile retrieval.
- Minor adjustments in import order across various modules for consistency.
This commit is contained in:
chema
2025-06-29 18:22:23 +02:00
parent 0d4d34904c
commit cc9d0312e3
9 changed files with 122 additions and 22 deletions

View File

@@ -5,13 +5,14 @@ This module defines the MCP server with resources and tools for interacting with
the Penpot design platform.
"""
import argparse
import hashlib
import json
import os
import re
import argparse
import sys
from typing import List, Optional, Dict
from typing import Dict, List, Optional
from mcp.server.fastmcp import FastMCP, Image
from penpot_mcp.api.penpot_api import PenpotAPI