Skip to main content
Glama
Pinboard MCP Server

Pinboard MCP Server

by rossshannon

Servidor MCP de Pinboard

CI Python 3.10+

Acceso de solo lectura a los marcadores de Pinboard.in para LLM a través del Protocolo de Contexto de Modelo (MCP).

Descripción general

Este servidor proporciona a los LLM la capacidad de buscar, filtrar y recuperar metadatos de marcadores de Pinboard.in en tiempo de inferencia. Construido sobre FastMCP 2.0, ofrece cuatro herramientas principales para la interacción con marcadores, respetando los límites de velocidad de Pinboard e implementando un almacenamiento en caché inteligente.

Related MCP server: Raindrop.io MCP Server

Características

  • Acceso de solo lectura a los marcadores de Pinboard

  • Cinco herramientas MCP: search_bookmarks, search_bookmarks_extended, list_recent_bookmarks, list_bookmarks_by_tags, list_tags

  • Almacenamiento en caché inteligente con caché LRU y anulación automática mediante el endpoint posts/update

  • Limitación de velocidad que respeta la directriz de 3 segundos de Pinboard entre llamadas a la API

  • Mapeo de campos que convierte los nombres de campos heredados de Pinboard a otros intuitivos (description→title, extended→notes)

  • Pruebas exhaustivas con bancos de pruebas de integración y validación de CI

Instalación

Vía pip (recomendado)

pip install pinboard-bookmarks-mcp-server

Desde el código fuente

git clone https://github.com/rossshannon/pinboard-bookmarks-mcp-server.git
cd pinboard-bookmarks-mcp-server
pip install -e .

Inicio rápido

  1. Obtén tu token de API de Pinboard en https://pinboard.in/settings/password

  2. Establece la variable de entorno:

    export PINBOARD_TOKEN="username:1234567890ABCDEF"
  3. Inicia el servidor:

    pinboard-mcp-server
  4. Verifica que funciona:

    # Test help command (works without token)
    pinboard-mcp-server --help
    
    # Server should show "Starting MCP server" when run with token

Uso con Claude Desktop

Añade esta configuración a tus ajustes de Claude Desktop:

{
  "mcpServers": {
    "pinboard": {
      "command": "pinboard-mcp-server",
      "env": {
        "PINBOARD_TOKEN": "your-username:your-token-here"
      }
    }
  }
}

Herramientas disponibles

1. search_bookmarks

Busca marcadores mediante una cadena de consulta en títulos, notas y etiquetas. Enfocado en resultados recientes con expansión automática.

Parámetros:

  • query (string): Consulta de búsqueda

  • limit (int, opcional): Resultados máximos (predeterminado: 20, máx: 100)

Ejemplo:

Search for "python testing" bookmarks

2. search_bookmarks_extended

Búsqueda extendida para obtener resultados históricos completos en títulos, notas y etiquetas.

Parámetros:

  • query (string): Consulta de búsqueda

  • days_back (int, opcional): Cuántos días atrás buscar (predeterminado: 365, máx: 730)

  • limit (int, opcional): Resultados máximos (predeterminado: 100, máx: 200)

Ejemplo:

Search the last 2 years for "kubernetes" bookmarks

3. list_recent_bookmarks

Lista los marcadores guardados en los últimos N días.

Parámetros:

  • days (int, opcional): Días hacia atrás (predeterminado: 7, máx: 30)

  • limit (int, opcional): Resultados máximos (predeterminado: 20, máx: 100)

Ejemplo:

Show me bookmarks from the last 3 days

4. list_bookmarks_by_tags

Lista TODOS los marcadores filtrados por etiquetas con un rango de fechas opcional. Es la forma más eficiente para el acceso histórico.

Parámetros:

  • tags (array): Lista de etiquetas para filtrar (1-3 etiquetas)

  • from_date (string, opcional): Fecha de inicio en formato ISO (YYYY-MM-DD)

  • to_date (string, opcional): Fecha de fin en formato ISO (YYYY-MM-DD)

  • limit (int, opcional): Resultados máximos (predeterminado: 100, máx: 200)

Ejemplo:

Find bookmarks tagged with "python" and "api" from January 2024

5. list_tags

Lista todas las etiquetas con sus recuentos de uso.

Ejemplo:

What are my most used tags?

Configuración

Variables de entorno

  • PINBOARD_TOKEN (obligatorio): Tu token de API de Pinboard en formato username:token

Limitación de velocidad

El servidor aplica automáticamente un retraso de 3 segundos entre llamadas a la API de Pinboard para respetar sus directrices. Las respuestas cacheadas se devuelven inmediatamente.

Estrategia de caché

  • Caché de consultas: Caché LRU con 1000 entradas para resultados de búsqueda

  • Caché de marcadores: Lista completa de marcadores cacheada durante 1 hora

  • Anulación de caché: Utiliza el endpoint posts/update para detectar cambios

  • Caché de etiquetas: Lista de etiquetas cacheada hasta que se actualice manualmente

Pruebas

El proyecto incluye una cobertura de pruebas exhaustiva con múltiples estrategias:

Ejecutar todas las pruebas

# Activate virtual environment first
source ~/.venvs/pinboard-bookmarks-mcp-server/bin/activate

# Run all tests with coverage
pytest --cov=src --cov-report=term-missing

Pruebas de API real

# Set your Pinboard token
export PINBOARD_TOKEN="username:token"

# Run debug utility to test search functionality (development only)
PINBOARD_TOKEN="username:token" python tests/debug_bookmarks.py

Pruebas de API simulada (Mock)

# Run comprehensive test suite (development only)
python -m pytest tests/ -v

Desarrollo

Configuración

# Clone and setup
git clone https://github.com/rossshannon/pinboard-bookmarks-mcp-server.git
cd pinboard-bookmarks-mcp-server

# Quick development setup
./scripts/dev-setup.sh

Calidad del código

# Activate environment
source ~/.venvs/pinboard-bookmarks-mcp-server/bin/activate

# Linting and formatting
ruff check src/ tests/
ruff format src/ tests/

# Type checking
mypy src/

# Run tests
pytest -v

# Build package
./scripts/build.sh

Arquitectura

  • FastMCP 2.0: Estructura MCP con abstracción de herramientas y servidor FastAPI asíncrono

  • pinboard.py: Envoltorio del cliente de la API de Pinboard con gestión de errores

  • Pydantic: Validación de datos y serialización con JSON Schema

  • ThreadPoolExecutor: Conecta el MCP asíncrono con la biblioteca síncrona pinboard.py

  • Caché LRU: Almacenamiento en memoria con anulación inteligente

Archivos clave

  • src/pinboard_mcp_server/main.py - Punto de entrada del servidor MCP e implementaciones de herramientas

  • src/pinboard_mcp_server/client.py - Cliente de la API de Pinboard con caché

  • src/pinboard_mcp_server/models.py - Modelos de datos Pydantic

  • tests/ - Suite de pruebas completa

  • tests/debug_bookmarks.py - Utilidad de depuración para probar la funcionalidad de búsqueda

  • docs/TEST_HARNESS.md - Documentación para los bancos de pruebas

Rendimiento

  • Tiempo de respuesta P50: <250ms (respuestas cacheadas)

  • Tiempo de respuesta P95: <600ms (caché fría)

  • Limitación de velocidad: intervalos de 3 segundos entre llamadas a la API

  • Ratio de aciertos de caché: >90% para patrones de uso típicos

Seguridad

  • Los tokens de API nunca se registran ni se exponen en mensajes de error

  • Acceso de solo lectura a los datos de Pinboard

  • Validación de entrada en todos los parámetros de las herramientas

  • Manejo seguro de variables de entorno

Solución de problemas

Problemas comunes

"PINBOARD_TOKEN environment variable is required"

  • Asegúrate de haber configurado tu token: export PINBOARD_TOKEN="username:token"

  • Obtén tu token en https://pinboard.in/settings/password

  • El formato del token debe ser: username:1234567890ABCDEF

"Command not found: pinboard-mcp-server"

  • Asegúrate de haber instalado el paquete: pip install pinboard-bookmarks-mcp-server

  • Comprueba que tu entorno de Python esté activado

  • Intenta reinstalar: pip uninstall pinboard-bookmarks-mcp-server && pip install pinboard-bookmarks-mcp-server

El servidor inicia pero Claude Desktop no puede conectar

  • Verifica la configuración de MCP en los ajustes de Claude Desktop

  • Comprueba que la ruta del command sea correcta: pinboard-mcp-server

  • Asegúrate de que PINBOARD_TOKEN esté configurado en la sección env

Errores de "Permission denied" o "Access denied"

  • Verifica que tu token de Pinboard sea válido y esté activo

  • Comprueba que tienes conexión a internet para llegar a pinboard.in

  • Prueba tu token manualmente en https://pinboard.in/api/v1/posts/recent

Contribución

  1. Haz un fork del repositorio

  2. Crea una rama de funcionalidad (git checkout -b feature/amazing-feature)

  3. Realiza tus cambios con pruebas

  4. Asegúrate de que todas las pruebas pasen y el código esté formateado

  5. Envía una solicitud de extracción (pull request)

Licencia

Licencia MIT - consulta el archivo LICENSE para más detalles.

Available Tools

5 tools
list_bookmarks_by_tagsA

List ALL bookmarks filtered by tags and optional date range.

Args:
    tags: List of tags to filter by (1-3 tags)
    from_date: Start date in ISO format (YYYY-MM-DD), optional
    to_date: End date in ISO format (YYYY-MM-DD), optional
    limit: Maximum number of results to return (1-200, default 100)

Note: Gets ALL bookmarks with specified tags, regardless of age.
Very efficient for tag-based searches. Provides generous data for analysis.
NameRequiredDescriptionDefault
tagsYes
from_dateNo
to_dateNo
limitNo

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions efficiency and generous data but lacks details on ordering, pagination behavior, rate limits, or potential side effects. As a read operation, the safety profile is implicitly clear, but more behavioral context would be beneficial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with a clear purpose line followed by a structured Args section. Every sentence adds value, and it is front-loaded with the main action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description does not describe return format or structure, only vaguely stating 'generous data for analysis.' For a tool with 4 parameters, more detail on output (e.g., list of bookmark objects) would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, yet the description fully explains each parameter: tags (1-3 tags), from_date/to_date (ISO format, optional), limit (1-200, default 100). This adds essential meaning beyond the schema titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List ALL bookmarks filtered by tags and optional date range,' specifying the verb (list) and resource (bookmarks) with filtering context. This distinguishes it from siblings like list_recent_bookmarks and search_bookmarks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description notes that it gets all bookmarks regardless of age and is efficient for tag-based searches, implying when to use. However, it does not explicitly state when not to use or compare to alternatives like search_bookmarks for full-text searches.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_recent_bookmarksA

List bookmarks saved in the last N days.

Args:
    days: Number of days to look back (1-30, default 7)
    limit: Maximum number of results to return (1-100, default 20)
NameRequiredDescriptionDefault
daysNo
limitNo

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes input parameters and default behavior. Without annotations, it adequately indicates a read-only operation listing bookmarks, though no mention of authorization or side effects is needed for this simple list.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise two-line summary followed by clear parameter descriptions in Args format. No extraneous content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a simple list tool with two parameters. Missing output schema description, but the format is standard and expectable. Could mention ordering (e.g., by date).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds meaning beyond the schema: 'days' is explained as lookback period, 'limit' as max results. Schema has no descriptions, so the description compensates effectively.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states action (list), resource (bookmarks), and time constraint (last N days). Distinguishes from sibling tools like list_bookmarks_by_tags and search_bookmarks by its specific scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implicitly tells when to use (when needing recent bookmarks). Does not explicitly mention when not to use or alternatives like search_bookmarks for more complex queries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tagsA

List all tags with their usage counts.

NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, placing the burden on the description. The description states that the tool lists tags with counts but does not disclose whether it is read-only, potential ordering, or pagination behavior. However, for a simple 0-parameter list, the description is minimally adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that is front-loaded with the verb and resource. Every word is necessary and there is no superfluous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters, no output schema, and a straightforward purpose, the description is largely complete. It specifies what is returned (tags with usage counts). A minor improvement would be to mention ordering or that the list includes all tags, but overall sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters, and schema description coverage is 100%. The description does not need to add parameter semantics since there are none. The baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: listing all tags along with their usage counts. It uses a specific verb ('list') and resource ('tags'), differentiating it from sibling tools which deal with bookmarks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly indicates when to use this tool (when you need a list of all tags and their usage counts). No explicit when-not or alternatives are provided, but the sibling tools have distinctly different purposes, so confusion is unlikely.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_bookmarksA

Search bookmarks by query string across titles, notes, and tags (recent focus).

Args:
    query: Search query to match against bookmark titles, notes, and tags
    limit: Maximum number of results to return (1-100, default 20)

Note: Searches recent bookmarks first, expands automatically if needed.
For comprehensive historical search, use search_bookmarks_extended.
NameRequiredDescriptionDefault
queryYes
limitNo

TDQS

A4.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. The description discloses behavioral traits: prioritizes recent bookmarks and automatically expands search if needed. This adds value beyond a simple search description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Compact two-sentence description plus a note. First sentence states purpose, then args, then behavioral note. Every sentence is essential, no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With only 2 simple params, no output schema, and no annotations, the description fully covers purpose, input semantics, behavioral nuance (recent focus, expansion), and usage alternatives. No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has only titles/types with 0% description coverage. The description adds full meaning: query matches against titles, notes, tags; limit is max results (1-100, default 20), fully compensating for the schema's lack of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it searches bookmarks by query across titles, notes, and tags, and explicitly differentiates from sibling search_bookmarks_extended via 'recent focus' and 'comprehensive historical search'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Searches recent bookmarks first' and provides alternative 'For comprehensive historical search, use search_bookmarks_extended', giving clear when-to-use and when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_bookmarks_extendedA

Extended search for comprehensive historical results across titles, notes, and tags.

Args:
    query: Search query to match against bookmark titles, notes, and tags
    days_back: How many days back to search (1-730, default 365 = 1 year)
    limit: Maximum number of results to return (1-200, default 100)

Note: Provides comprehensive results while being mindful of server load.
Use tag-based searches for most efficient access to historical bookmarks.
NameRequiredDescriptionDefault
queryYes
days_backNo
limitNo

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It describes the search scope and parameter ranges but lacks details on ordering, pagination, side effects, or read-only behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with a clear purpose statement, an Args block, and a practical note. No extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 3 parameters and no output schema, the description covers purpose, parameter details, and a usage tip. It lacks output format or error handling, but is fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description adds meaning by clarifying that 'query' matches against titles, notes, and tags, and specifies valid ranges for 'days_back' and 'limit'. This goes beyond the schema's default and type information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Extended search for comprehensive historical results across titles, notes, and tags.' This clearly identifies the tool as a comprehensive search variant, distinguishing it from simpler siblings like 'search_bookmarks'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides guidance to use tag-based searches for efficiency and mentions being mindful of server load. However, it does not explicitly compare with 'search_bookmarks' or state when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updates
    • First observedlist_bookmarks_by_tags
    • First observedlist_recent_bookmarks
    • First observedlist_tags
    • First observedsearch_bookmarks
    • First observedsearch_bookmarks_extended

TDQS

A4.1/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a distinct purpose: listing by tags, recent bookmarks, tag counts, and two search variants differentiated by scope (recent vs. historical). Minimal overlap.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern: 'list_' for listing and 'search_' for searching, with descriptive suffixes. No style mixing.

Tool Count4/5

5 tools for a bookmark server is a reasonable count, though the set lacks write operations like add/delete. Still well-scoped for a query-focused service.

Completeness2/5

The tool set covers only read and search operations. Missing essential CRUD actions (create, update, delete bookmarks), which are typical for bookmark management.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables users to access and manage their Pinboard bookmarks directly through Claude Desktop. Supports retrieving, adding, and updating bookmarks with date filtering, tagging, and bookmark analysis capabilities.
    10
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to access and manage Raindrop.io bookmarks, collections, tags, and highlights through the Model Context Protocol. Supports CRUD operations, advanced search, file uploads, and bulk editing of bookmarks.
    103 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to save and search bookmarks using OpenAI's RAG capabilities for intelligent bookmark management and retrieval.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables language models to access and manage Raindrop.io bookmarks, collections, tags, and highlights through the Model Context Protocol.
    24 npm
    MIT