Skip to main content
Glama
owenwangmar

fja-mcp

by owenwangmar

FJA-MCP

A reference implementation of the Flourishing-Justice-Autonomy (FJA) alignment framework, exposed as an MCP server.

What is FJA?

FJA is a normative AI-alignment framework that extends the HHH (Harmless-Helpful-Honest) triad to:

  • Flourishing: Support human well-being, pluralistic cultural perspectives, and access to knowledge.

  • Justice: Ensure fairness, non-discrimination, and equitable treatment.

  • Autonomy: Respect user choice, consent, and self-determination.

Related MCP server: arifosmcp

Install

pip install -e .

Run the MCP server

fja-mcp-server

or with the official MCP CLI:

mcp run server.py -t stdio
mcp dev server.py          # opens MCP Inspector

Run examples

python examples/cultural_diet.py
python examples/medical_autonomy.py
python examples/hiring_fairness.py

LLM fine-tuning + FJA evaluation demo

This example loads distilgpt2 (81M parameters), evaluates its FJA metrics, fine-tunes it on a tiny FJA-aligned dataset, and re-evaluates.

pip install torch transformers datasets accelerate
python examples/llm_fja_demo.py

Use the MCP client

fja-mcp-client

or

python -m fja_mcp.mcp_client

Run tests

pytest

License

MIT

Available Tools

2 tools
compare_outputsC

Compare two candidate responses and recommend the one more aligned with FJA.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes
response_aYes
response_bYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.8/5.0
Behavior2/5

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

There are no annotations, so the description must carry the full burden of explaining behavior. It states the core function but does not disclose details such as whether the operation is read-only, how the recommendation is formatted, or what 'FJA' means, leaving significant behavioral ambiguity.

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, focused sentence that conveys the essential purpose without unnecessary words. It is well-structured and front-loaded.

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

Completeness2/5

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

For a tool with three parameters, no annotations, and a sibling that could be confused, the description is too minimal. It lacks context about FJA, parameter roles, when to use it, and what the output format is, despite having an output schema present.

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

Parameters2/5

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

The schema provides 0% description coverage for the three parameters. The description only hints at the roles of response_a and response_b ('two candidate responses') but does not explain the 'prompt' parameter or clarify how each parameter contributes to the comparison.

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

Purpose4/5

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

The description clearly states a specific action ('Compare two candidate responses and recommend the one more aligned with FJA') with identifiable resources (two candidate responses). It is clear but does not explicitly differentiate from the sibling tool 'evaluate_output', so it misses the top score.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus the sibling 'evaluate_output'. The description gives no context for when this comparison is appropriate or what alternatives exist.

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

evaluate_outputC

Evaluate an LLM response using FJA criteria.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes
responseYes
user_contextNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.3/5.0
Behavior1/5

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

No annotations are provided, so the description must disclose behavioral traits, but it does not. It does not explain what FJA criteria are, what the output looks like, whether the operation is read-only, or any side effects. The single sentence offers no behavioral transparency beyond the bare action.

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

Conciseness3/5

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

The description is one short sentence with no filler, which is concise, but it is under-specified for a tool with three parameters and a specific evaluation framework. It lacks structure or elaboration, though it is front-loaded with the core purpose.

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

Completeness2/5

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

Despite the presence of an output schema, the description is incomplete for practical use. It does not explain the FJA criteria or provide any usage context, such as what the evaluation result contains or when this tool is appropriate. The sibling tool further underscores the lack of contextual guidance.

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

Parameters1/5

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

With 0% schema description coverage and no parameter details in the description, the agent receives no semantic context for 'prompt,' 'response,' or 'user_context.' The description fails to explain how these parameters relate to the FJA criteria, leaving the agent to guess parameter meaning.

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

Purpose4/5

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

The description clearly states the tool evaluates an LLM response, using the verb 'evaluate' with a specific resource. It references 'FJA criteria,' which adds specificity, though the acronym is unexplained. It is distinguishable from the sibling 'compare_outputs' in that this evaluates a single response rather than comparing two.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There is no mention of 'compare_outputs' or any exclusions/prerequisites. The only implied usage is tautological—use it when you need to evaluate a response—which does not help an agent select between sibling tools.

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. 2 tool updatesv0.1.0
    • First observedcompare_outputs
    • First observedevaluate_output

TDQS

B3/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one evaluates a single response, the other compares two responses. There is no overlap in functionality, and an agent can easily select the appropriate tool based on whether it needs a single evaluation or a comparison.

Naming Consistency5/5

Both tool names follow a consistent verb_noun pattern: evaluate_output and compare_outputs. The naming is predictable and aligns with their functions, making it easy to infer behavior from the name.

Tool Count3/5

With only two tools, the server feels minimal but covers the core evaluation and comparison tasks. However, it is on the thin side for a dedicated server, and additional tools like batch evaluation or criteria management could round it out.

Completeness4/5

The server provides essential single and comparative evaluation capabilities, which are the primary use cases. Minor gaps exist, such as lacking a tool to retrieve or modify FJA criteria, but these are not critical for basic evaluation workflows.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    Constitutional MCP server enforcing 13 Floors of governance for AI agents, providing tools for session anchoring, reasoning, safety critique, and audit logging.
    AGPL 3.0
  • F
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables agents to evaluate LLMs daily through capability benchmarks and value alignment tests, providing tools to list models, get almanac, judge dilemmas, match user values, and score models.
    1
    -
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that audits LLM-as-judge evaluations, detecting judge drift across runs, measuring bias through controlled probes, and comparing judge agreement with human raters.
    6
    MIT