Metadata-Version: 2.4
Name: paper-scoring-mcp
Version: 0.1.0
Summary: MCP server for the Paper Scoring core
Project-URL: Repository, https://github.com/maikeruSan/paper-scoring-mcp
Author: Paper Scoring contributors
License: MIT License
        
        Copyright (c) 2026 Paper Scoring contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: mcp<3,>=2.1.1
Requires-Dist: paper-scoring-connectors<0.2.0,>=0.1.0
Requires-Dist: paper-scoring-core<0.2.0,>=0.1.0
Requires-Dist: pydantic<3,>=2.11
Requires-Dist: python-dotenv<2,>=1.1
Provides-Extra: all
Requires-Dist: paper-scoring-connectors[all]<0.2.0,>=0.1.0; extra == 'all'
Provides-Extra: ollama
Requires-Dist: paper-scoring-connectors[ollama]<0.2.0,>=0.1.0; extra == 'ollama'
Provides-Extra: openai
Requires-Dist: paper-scoring-connectors[openai]<0.2.0,>=0.1.0; extra == 'openai'
Provides-Extra: openalex
Requires-Dist: paper-scoring-connectors[openalex]<0.2.0,>=0.1.0; extra == 'openalex'
Provides-Extra: security
Requires-Dist: bandit[toml]<2,>=1.8; extra == 'security'
Requires-Dist: detect-secrets<2,>=1.5; extra == 'security'
Requires-Dist: pip-audit<3,>=2.9; extra == 'security'
Provides-Extra: test
Requires-Dist: build<2,>=1.3; extra == 'test'
Requires-Dist: coverage[toml]<8,>=7.10; extra == 'test'
Requires-Dist: mypy<2,>=1.18; extra == 'test'
Requires-Dist: pytest-asyncio<2,>=1.1; extra == 'test'
Requires-Dist: pytest<10,>=9.0.3; extra == 'test'
Requires-Dist: ruff<1,>=0.12; extra == 'test'
Requires-Dist: twine<7,>=6.2; extra == 'test'
Description-Content-Type: text/markdown

# Paper Scoring MCP

MCP v2 transport adapter for `paper-scoring-core`. It accepts normalized paper
content, invokes an explicitly configured assessment connector, and returns the
versioned core `ScoreResult` schema.

## Install

Choose the provider extra needed at runtime:

```shell
python -m pip install "paper-scoring-mcp[openai]==0.1.0"
```

On Windows, the equivalent command is:

```powershell
py -m pip install "paper-scoring-mcp[openai]==0.1.0"
```

The `ollama`, `openalex`, and `all` extras are also available. Dependencies
between Paper Scoring repositories are normal PyPI requirements; no Git or
filesystem dependency is embedded in the distribution.

## Runtime configuration

Configuration is read only when the executable starts. Importing the package
does not read `.env` or process environment values. Pass a UTF-8 file explicitly
when dotenv injection is wanted:

```shell
paper-scoring-mcp --env-file .env --transport stdio
```

Existing process values take precedence over values in the file. The
`--env-file` loader accepts only the keys shown in `.env.example`, which
prevents an accidental dotenv file from changing unrelated process behavior.
Never commit a populated `.env` file.

## Transports

STDIO is suitable for local agent clients and keeps diagnostic logging on
stderr so stdout remains an MCP protocol channel:

```shell
paper-scoring-mcp --env-file .env --transport stdio
```

Streamable HTTP exposes the MCP endpoint at `/mcp`:

```shell
paper-scoring-mcp --env-file .env --transport streamable-http \
  --host 127.0.0.1 --port 8000
```

PowerShell uses the same executable without shell-specific syntax:

```powershell
paper-scoring-mcp --env-file .env --transport streamable-http --host 127.0.0.1 --port 8000
```

DNS-rebinding protection is always enabled. A wildcard bind accepts only
loopback Host values by default. For a deliberate reverse-proxy deployment,
repeat `--allowed-host` and `--allowed-origin` with the exact public values.
The server does not provide authentication, so keep it on loopback or place it
behind an authenticated reverse proxy.

The server exposes `health`, `get_scoring_contract`, and `score_paper`.
`source_url` is treated as paper metadata; the MCP adapter never fetches a URL
or accepts a local filesystem path.

## Docker Compose

Docker Compose injects the selected environment file at container start. The
published port is loopback-only, the root filesystem is read-only, Linux
capabilities are dropped, and the image runs as an unprivileged user.
Runtime Python dependencies are exported from `uv.lock`, hash-verified, and
installed from public PyPI during the image build.

```shell
cp .env.example .env
docker compose up --build
```

To select a different runtime file without copying it into the image:

```shell
PAPER_SCORING_ENV_FILE=/absolute/path/runtime.env docker compose up --build
```

In PowerShell:

```powershell
$env:PAPER_SCORING_ENV_FILE = "C:\\secure\\paper-scoring.env"
docker compose up --build
```
